diff --git a/resources/images/duration1.png b/resources/images/duration1.png index e05ffa8e..5f1f8355 100644 Binary files a/resources/images/duration1.png and b/resources/images/duration1.png differ diff --git a/resources/images/duration2.png b/resources/images/duration2.png index 29263f14..37dcb1ca 100644 Binary files a/resources/images/duration2.png and b/resources/images/duration2.png differ diff --git a/resources/images/duration3.png b/resources/images/duration3.png index 9280a642..9c61f7f8 100644 Binary files a/resources/images/duration3.png and b/resources/images/duration3.png differ diff --git a/resources/style.qss b/resources/style.qss index cfa6b41c..503822a7 100644 --- a/resources/style.qss +++ b/resources/style.qss @@ -4,7 +4,8 @@ QWidget#UBLibPathViewer, QWidget#UBTeacherStudentAction, QWidget#UBLibNavigatorWidget, QWidget#UBLibItemProperties, -QWidget#UBDownloadWidget +QWidget#UBDownloadWidget, +QWidget#UBWidgetList { background: #EEEEEE; border-radius: 10px; diff --git a/src/gui/UBTeacherBarWidget.cpp b/src/gui/UBTeacherBarWidget.cpp index bd0a20b0..5a62f301 100644 --- a/src/gui/UBTeacherBarWidget.cpp +++ b/src/gui/UBTeacherBarWidget.cpp @@ -32,6 +32,7 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock , mpDuration2(NULL) , mpDuration3(NULL) , mpDurationButtons(NULL) + , mpActions(NULL) { setObjectName(name); mName = "TeacherBarWidget"; @@ -84,9 +85,9 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock mpLayout->addLayout(mpDurationLayout); // Actions - mpAction1 = new UBTeacherStudentAction(1, mpContainer); - - mpLayout->addWidget(mpAction1); + mpActions = new UBWidgetList(this); + mpActions->setEmptyText(tr("Add actions")); + mpLayout->addWidget(mpActions); // Media mpDropMediaZone = new UBTeacherBarDropMediaZone(); @@ -98,8 +99,6 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(loadContent())); connect(UBApplication::mainWindow->actionQuit, SIGNAL(triggered()), this, SLOT(saveContent())); connect(mpTitle, SIGNAL(textChanged(QString)), this, SLOT(onValueChanged())); - connect(mpAction1->teacher(), SIGNAL(textChanged()), this, SLOT(onValueChanged())); - connect(mpAction1->student(), SIGNAL(textChanged()), this, SLOT(onValueChanged())); } UBTeacherBarWidget::~UBTeacherBarWidget() @@ -189,8 +188,6 @@ void UBTeacherBarWidget::saveContent() { sTeacherBarInfos infos; infos.title = mpTitle->text(); - infos.action1Master = mpAction1->teacherText(); - infos.action1Student = mpAction1->studentText(); UBPersistenceManager::persistenceManager()->persistTeacherBar(UBApplication::boardController->activeDocument(), UBApplication::boardController->activeSceneIndex(), infos); } @@ -198,8 +195,6 @@ void UBTeacherBarWidget::loadContent() { sTeacherBarInfos nextInfos = UBPersistenceManager::persistenceManager()->getTeacherBarInfos(UBApplication::boardController->activeDocument(), UBApplication::boardController->activeSceneIndex()); mpTitle->setText(nextInfos.title); - mpAction1->setTeacherText(nextInfos.action1Master); - mpAction1->setStudentText(nextInfos.action1Student); } void UBTeacherBarWidget::onTitleTextChanged(const QString& text) @@ -207,11 +202,6 @@ void UBTeacherBarWidget::onTitleTextChanged(const QString& text) mpTitle->setToolTip(text); } -void UBTeacherBarWidget::onEquipmentTextChanged(const QString& 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 a7abe72c..9ac35434 100644 --- a/src/gui/UBTeacherBarWidget.h +++ b/src/gui/UBTeacherBarWidget.h @@ -16,6 +16,7 @@ class UBMediaPlayer; #include "customWidgets/UBWidgetList.h" #include "UBDockPaletteWidget.h" +#include "customWidgets/UBWidgetList.h" #define LABEL_MINWIDHT 80 @@ -75,8 +76,7 @@ private slots: void saveContent(); void loadContent(); void onValueChanged(); - void onTitleTextChanged(const QString& text); - void onEquipmentTextChanged(const QString& text); + void onTitleTextChanged(const QString& text); private: void populateCombos(); @@ -95,6 +95,7 @@ private: QCheckBox* mpDuration2; QCheckBox* mpDuration3; QButtonGroup* mpDurationButtons; + UBWidgetList* mpActions; }; #endif // UBTEACHERBARWIDGET_H