|
|
@ -125,7 +125,7 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock |
|
|
|
connect(mpDuration, SIGNAL(currentIndexChanged(int)), this, SLOT(onValueChanged())); |
|
|
|
connect(mpDuration, SIGNAL(currentIndexChanged(int)), this, SLOT(onValueChanged())); |
|
|
|
connect(mpEquipment, SIGNAL(textChanged(QString)), this, SLOT(onValueChanged())); |
|
|
|
connect(mpEquipment, SIGNAL(textChanged(QString)), this, SLOT(onValueChanged())); |
|
|
|
connect(mpActivity, SIGNAL(currentIndexChanged(int)), this, SLOT(onValueChanged())); |
|
|
|
connect(mpActivity, SIGNAL(currentIndexChanged(int)), this, SLOT(onValueChanged())); |
|
|
|
connect(mpAction1->teacher(), SIGNAL(textChanged()), this, SLOT(onValueChanged())); |
|
|
|
connect(mpAction1->teacher(), SIGNAL(textChanged()), dynamic_cast<UBTeacherBarWidget*>(this), SLOT(onValueChanged())); |
|
|
|
connect(mpAction1->student(), SIGNAL(textChanged()), this, SLOT(onValueChanged())); |
|
|
|
connect(mpAction1->student(), SIGNAL(textChanged()), this, SLOT(onValueChanged())); |
|
|
|
connect(mpAction2->teacher(), SIGNAL(textChanged()), this, SLOT(onValueChanged())); |
|
|
|
connect(mpAction2->teacher(), SIGNAL(textChanged()), this, SLOT(onValueChanged())); |
|
|
|
connect(mpAction2->student(), SIGNAL(textChanged()), this, SLOT(onValueChanged())); |
|
|
|
connect(mpAction2->student(), SIGNAL(textChanged()), this, SLOT(onValueChanged())); |
|
|
@ -242,14 +242,17 @@ void UBTeacherBarWidget::populateCombos() |
|
|
|
QStringList qslPhasis; |
|
|
|
QStringList qslPhasis; |
|
|
|
qslPhasis << tr("") << tr("I discover") << tr("I experiment") << tr("I train myself") << tr("I play") << tr("I memorize"); |
|
|
|
qslPhasis << tr("") << tr("I discover") << tr("I experiment") << tr("I train myself") << tr("I play") << tr("I memorize"); |
|
|
|
mpPhasis->insertItems(0, qslPhasis); |
|
|
|
mpPhasis->insertItems(0, qslPhasis); |
|
|
|
|
|
|
|
mpPhasis->setCurrentIndex(0); |
|
|
|
|
|
|
|
|
|
|
|
QStringList qslDuration; |
|
|
|
QStringList qslDuration; |
|
|
|
qslDuration << tr("") << tr("Short") << tr("Middle") << tr("Long"); |
|
|
|
qslDuration << tr("") << tr("Short") << tr("Middle") << tr("Long"); |
|
|
|
mpDuration->insertItems(0, qslDuration); |
|
|
|
mpDuration->insertItems(0, qslDuration); |
|
|
|
|
|
|
|
mpDuration->setCurrentIndex(0); |
|
|
|
|
|
|
|
|
|
|
|
QStringList qslActivity; |
|
|
|
QStringList qslActivity; |
|
|
|
qslActivity << tr("") << tr("Alone") << tr("By Group") << tr("All together"); |
|
|
|
qslActivity << tr("") << tr("Alone") << tr("By Group") << tr("All together"); |
|
|
|
mpActivity->insertItems(0, qslActivity); |
|
|
|
mpActivity->insertItems(0, qslActivity); |
|
|
|
|
|
|
|
mpActivity->setCurrentIndex(0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBTeacherBarWidget::onValueChanged() |
|
|
|
void UBTeacherBarWidget::onValueChanged() |
|
|
@ -278,6 +281,39 @@ void UBTeacherBarWidget::onValueChanged() |
|
|
|
UBApplication::boardController->paletteManager()->refreshPalettes(); |
|
|
|
UBApplication::boardController->paletteManager()->refreshPalettes(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UBTeacherBarWidget::saveContent() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
sTeacherBarInfos infos; |
|
|
|
|
|
|
|
infos.title = mpTitle->text(); |
|
|
|
|
|
|
|
infos.phasis = mpPhasis->currentIndex(); |
|
|
|
|
|
|
|
infos.Duration = mpDuration->currentIndex(); |
|
|
|
|
|
|
|
infos.material = mpEquipment->text(); |
|
|
|
|
|
|
|
infos.activity = mpActivity->currentIndex(); |
|
|
|
|
|
|
|
infos.action1Master = mpAction1->teacherText(); |
|
|
|
|
|
|
|
infos.action1Student = mpAction1->studentText(); |
|
|
|
|
|
|
|
infos.action2Master = mpAction2->teacherText(); |
|
|
|
|
|
|
|
infos.action2Student = mpAction2->studentText(); |
|
|
|
|
|
|
|
infos.action3Master = mpAction3->teacherText(); |
|
|
|
|
|
|
|
infos.action3Student = mpAction3->studentText(); |
|
|
|
|
|
|
|
UBPersistenceManager::persistenceManager()->persistTeacherBar(UBApplication::boardController->activeDocument(), UBApplication::boardController->activeSceneIndex(), infos); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UBTeacherBarWidget::loadContent() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
sTeacherBarInfos nextInfos = UBPersistenceManager::persistenceManager()->getTeacherBarInfos(UBApplication::boardController->activeDocument(), UBApplication::boardController->activeSceneIndex()); |
|
|
|
|
|
|
|
mpTitle->setText(nextInfos.title); |
|
|
|
|
|
|
|
mpPhasis->setCurrentIndex(nextInfos.phasis); |
|
|
|
|
|
|
|
mpDuration->setCurrentIndex(nextInfos.Duration); |
|
|
|
|
|
|
|
mpEquipment->setText(nextInfos.material); |
|
|
|
|
|
|
|
mpActivity->setCurrentIndex(nextInfos.activity); |
|
|
|
|
|
|
|
mpAction1->setTeacherText(nextInfos.action1Master); |
|
|
|
|
|
|
|
mpAction1->setStudentText(nextInfos.action1Student); |
|
|
|
|
|
|
|
mpAction2->setTeacherText(nextInfos.action2Master); |
|
|
|
|
|
|
|
mpAction2->setStudentText(nextInfos.action2Student); |
|
|
|
|
|
|
|
mpAction3->setTeacherText(nextInfos.action3Master); |
|
|
|
|
|
|
|
mpAction3->setStudentText(nextInfos.action3Student); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UBTeacherStudentAction::UBTeacherStudentAction(int actionNumber, QWidget *parent, const char *name):QWidget(parent) |
|
|
|
UBTeacherStudentAction::UBTeacherStudentAction(int actionNumber, QWidget *parent, const char *name):QWidget(parent) |
|
|
|
, mpActionLabel(NULL) |
|
|
|
, mpActionLabel(NULL) |
|
|
|
, mpTeacherLabel(NULL) |
|
|
|
, mpTeacherLabel(NULL) |
|
|
|