changed teacherbar with teacherGuide

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent f53d4b13f9
commit cb0f817b19
  1. 19
      src/gui/UBTeacherGuideWidget.cpp

@ -194,7 +194,7 @@ QVector<tIDataStorage*> UBTeacherGuideEditionWidget::save()
QVector<tIDataStorage*> result; QVector<tIDataStorage*> result;
QMap<QString,QString> attributes; QMap<QString,QString> attributes;
tIDataStorage* data = new tIDataStorage(); tIDataStorage* data = new tIDataStorage();
data->name = "teacherBar"; data->name = "teacherGuide";
data->type = eElementType_START; data->type = eElementType_START;
data->attributes.insert("version","1.50"); data->attributes.insert("version","1.50");
result << data; result << data;
@ -228,7 +228,7 @@ QVector<tIDataStorage*> UBTeacherGuideEditionWidget::save()
} }
data = new tIDataStorage(); data = new tIDataStorage();
data->name = "teacherBar"; data->name = "teacherGuide";
data->type = eElementType_END; data->type = eElementType_END;
result << data; result << data;
return result; return result;
@ -236,11 +236,16 @@ QVector<tIDataStorage*> UBTeacherGuideEditionWidget::save()
void UBTeacherGuideEditionWidget::onActiveSceneChanged() void UBTeacherGuideEditionWidget::onActiveSceneChanged()
{ {
load(UBSvgSubsetAdaptor::sTeacherGuideNode); int currentPage = UBApplication::boardController->currentPage();
mpPageNumberLabel->setText(tr("Page: %0").arg(UBApplication::boardController->currentPage())); if(currentPage > 0){
UBDocumentProxy* documentProxy = UBApplication::boardController->activeDocument(); cleanData();
if(mpDocumentTitle) qDebug() << UBSvgSubsetAdaptor::sTeacherGuideNode;
mpDocumentTitle->setText(documentProxy->metaData(UBSettings::sessionTitle).toString()); load(UBSvgSubsetAdaptor::sTeacherGuideNode);
mpPageNumberLabel->setText(tr("Page: %0").arg(currentPage));
UBDocumentProxy* documentProxy = UBApplication::boardController->activeDocument();
if(mpDocumentTitle)
mpDocumentTitle->setText(documentProxy->metaData(UBSettings::sessionTitle).toString());
}
} }
void UBTeacherGuideEditionWidget::cleanData() void UBTeacherGuideEditionWidget::cleanData()

Loading…
Cancel
Save