diff --git a/src/gui/UBTeacherBarWidget.cpp b/src/gui/UBTeacherBarWidget.cpp index ea8348b1..c3986972 100644 --- a/src/gui/UBTeacherBarWidget.cpp +++ b/src/gui/UBTeacherBarWidget.cpp @@ -62,6 +62,7 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock mpTitleLabel->setAlignment(Qt::AlignRight); mpTitle = new QLineEdit(mpContainer); mpTitle->setObjectName("DockPaletteWidgetLineEdit"); + connect(mpTitle, SIGNAL(textChanged(const QString&)), this, SLOT(onTitleTextChanged(const QString&))); mpTitleLayout = new QHBoxLayout(); mpTitleLayout->addWidget(mpTitleLabel, 0); mpTitleLayout->addWidget(mpTitle, 1); @@ -95,6 +96,7 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock mpEquipmentLabel->setAlignment(Qt::AlignRight); mpEquipment = new QLineEdit(mpContainer); mpEquipment->setObjectName("DockPaletteWidgetLineEdit"); + connect(mpEquipment, SIGNAL(textChanged(const QString&)), this, SLOT(onEquipmentTextChanged(const QString&))); mpEquipmentLayout = new QHBoxLayout(); mpEquipmentLayout->addWidget(mpEquipmentLabel, 0); mpEquipmentLayout->addWidget(mpEquipment, 1); @@ -319,6 +321,16 @@ void UBTeacherBarWidget::loadContent() mpAction3->setStudentText(nextInfos.action3Student); } +void UBTeacherBarWidget::onTitleTextChanged(const QString& text) +{ + mpTitle->setToolTip(text); +} + +void UBTeacherBarWidget::onEquipmentTextChanged(const QString& text) +{ + mpEquipment->setToolTip(text); +} + UBTeacherStudentAction::UBTeacherStudentAction(int actionNumber, QWidget *parent, const char *name):QWidget(parent) , mpActionLabel(NULL) , mpTeacherLabel(NULL) diff --git a/src/gui/UBTeacherBarWidget.h b/src/gui/UBTeacherBarWidget.h index 555b6ef6..3f18bcbe 100644 --- a/src/gui/UBTeacherBarWidget.h +++ b/src/gui/UBTeacherBarWidget.h @@ -48,6 +48,8 @@ private slots: void saveContent(); void loadContent(); void onValueChanged(); + void onTitleTextChanged(const QString& text); + void onEquipmentTextChanged(const QString& text); private: void populateCombos();