changed teacherbar with teacherGuide

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent f53d4b13f9
commit cb0f817b19
  1. 11
      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()
{ {
int currentPage = UBApplication::boardController->currentPage();
if(currentPage > 0){
cleanData();
qDebug() << UBSvgSubsetAdaptor::sTeacherGuideNode;
load(UBSvgSubsetAdaptor::sTeacherGuideNode); load(UBSvgSubsetAdaptor::sTeacherGuideNode);
mpPageNumberLabel->setText(tr("Page: %0").arg(UBApplication::boardController->currentPage())); mpPageNumberLabel->setText(tr("Page: %0").arg(currentPage));
UBDocumentProxy* documentProxy = UBApplication::boardController->activeDocument(); UBDocumentProxy* documentProxy = UBApplication::boardController->activeDocument();
if(mpDocumentTitle) if(mpDocumentTitle)
mpDocumentTitle->setText(documentProxy->metaData(UBSettings::sessionTitle).toString()); mpDocumentTitle->setText(documentProxy->metaData(UBSettings::sessionTitle).toString());
}
} }
void UBTeacherGuideEditionWidget::cleanData() void UBTeacherGuideEditionWidget::cleanData()

Loading…
Cancel
Save