Changed page 0 with title page

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent 1525be32bc
commit 4e7dac2f60
  1. 6
      src/document/UBDocumentController.cpp
  2. 4
      src/gui/UBDocumentNavigator.cpp
  3. 2
      src/gui/UBPageNavigationWidget.cpp
  4. 5
      src/gui/UBTeacherGuideWidget.cpp

@ -1624,7 +1624,11 @@ void UBDocumentController::refreshDocumentThumbnailsView(UBDocumentContainer*)
} }
items << pixmapItem; items << pixmapItem;
labels << tr("Page %1").arg(pageFromSceneIndex(i)); int pageIndex = pageFromSceneIndex(i);
if(pageIndex)
labels << tr("Page %1").arg(pageIndex);
else
labels << tr("Title page");
itemsPath.append(QUrl::fromLocalFile(proxy->persistencePath() + QString("/pages/%1").arg(UBDocumentContainer::pageFromSceneIndex(i)))); itemsPath.append(QUrl::fromLocalFile(proxy->persistencePath() + QString("/pages/%1").arg(UBDocumentContainer::pageFromSceneIndex(i))));
} }

@ -86,7 +86,9 @@ void UBDocumentNavigator::generateThumbnails(UBDocumentContainer* source)
{ {
const QPixmap* pix = source->pageAt(i); const QPixmap* pix = source->pageAt(i);
UBSceneThumbnailNavigPixmap* pixmapItem = new UBSceneThumbnailNavigPixmap(*pix, source->selectedDocument(), i); UBSceneThumbnailNavigPixmap* pixmapItem = new UBSceneThumbnailNavigPixmap(*pix, source->selectedDocument(), i);
UBThumbnailTextItem *labelItem = new UBThumbnailTextItem(tr("Page %0").arg(UBDocumentContainer::pageFromSceneIndex(i))); int pageIndex = UBDocumentContainer::pageFromSceneIndex(i);
QString label = pageIndex == 0 ? tr("Title page") : tr("Page %0").arg(pageIndex);
UBThumbnailTextItem *labelItem = new UBThumbnailTextItem(label);
UBImgTextThumbnailElement thumbWithText(pixmapItem, labelItem); UBImgTextThumbnailElement thumbWithText(pixmapItem, labelItem);
thumbWithText.setBorder(border()); thumbWithText.setBorder(border());

@ -74,8 +74,6 @@ UBPageNavigationWidget::UBPageNavigationWidget(QWidget *parent, const char *name
mTimeFormat = mTimeFormat.remove(":s"); mTimeFormat = mTimeFormat.remove(":s");
mTimerID = startTimer(1000); mTimerID = startTimer(1000);
//connect(mNavigator, SIGNAL(changeCurrentPage()), this, SLOT(changeCurrentPage()));
//connect(UBApplication::boardController, SIGNAL(setDocOnPageNavigator(UBDocumentProxy*)), this, SLOT(onSetDocOnPageNavigator(UBDocumentProxy*)));
} }
/** /**

@ -135,7 +135,6 @@ UBTeacherGuideEditionWidget::UBTeacherGuideEditionWidget(QWidget *parent, const
if(UBSettings::settings()->teacherGuideLessonPagesActivated->get().toBool()){ if(UBSettings::settings()->teacherGuideLessonPagesActivated->get().toBool()){
UBSvgSubsetAdaptor::addElementToBeStored(QString("teacherGuide"),this); UBSvgSubsetAdaptor::addElementToBeStored(QString("teacherGuide"),this);
//connect(UBApplication::boardController,SIGNAL(activeDocumentChanged()),this,SLOT(onActiveDocumentChanged()));
connect(UBApplication::boardController,SIGNAL(documentSet(UBDocumentProxy*)),this,SLOT(onActiveDocumentChanged())); connect(UBApplication::boardController,SIGNAL(documentSet(UBDocumentProxy*)),this,SLOT(onActiveDocumentChanged()));
} }
} }
@ -198,7 +197,7 @@ QVector<tIDataStorage*> UBTeacherGuideEditionWidget::save(int pageIndex)
tIDataStorage* data = new tIDataStorage(); tIDataStorage* data = new tIDataStorage();
data->name = "teacherGuide"; data->name = "teacherGuide";
data->type = eElementType_START; data->type = eElementType_START;
data->attributes.insert("version","1.50"); data->attributes.insert("version","2.00");
result << data; result << data;
data = new tIDataStorage(); data = new tIDataStorage();
@ -635,7 +634,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons
mpPageNumberLabel = new QLabel(this); mpPageNumberLabel = new QLabel(this);
mpPageNumberLabel->setAlignment(Qt::AlignRight); mpPageNumberLabel->setAlignment(Qt::AlignRight);
mpPageNumberLabel->setObjectName("UBTGPageNumberLabel"); mpPageNumberLabel->setObjectName("UBTGPageNumberLabel");
mpPageNumberLabel->setText(tr("Page 0")); mpPageNumberLabel->setText(tr("Title page"));
mpLayout->addWidget(mpPageNumberLabel); mpLayout->addWidget(mpPageNumberLabel);
mpButtonTitleLayout = new QHBoxLayout(0); mpButtonTitleLayout = new QHBoxLayout(0);

Loading…
Cancel
Save