Commit 4e7dac2f authored by Claudio Valerio's avatar Claudio Valerio

Changed page 0 with title page

parent 1525be32
......@@ -1624,7 +1624,11 @@ void UBDocumentController::refreshDocumentThumbnailsView(UBDocumentContainer*)
}
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))));
}
......
......@@ -86,7 +86,9 @@ void UBDocumentNavigator::generateThumbnails(UBDocumentContainer* source)
{
const QPixmap* pix = source->pageAt(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);
thumbWithText.setBorder(border());
......
......@@ -74,8 +74,6 @@ UBPageNavigationWidget::UBPageNavigationWidget(QWidget *parent, const char *name
mTimeFormat = mTimeFormat.remove(":s");
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()){
UBSvgSubsetAdaptor::addElementToBeStored(QString("teacherGuide"),this);
//connect(UBApplication::boardController,SIGNAL(activeDocumentChanged()),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();
data->name = "teacherGuide";
data->type = eElementType_START;
data->attributes.insert("version","1.50");
data->attributes.insert("version","2.00");
result << data;
data = new tIDataStorage();
......@@ -635,7 +634,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons
mpPageNumberLabel = new QLabel(this);
mpPageNumberLabel->setAlignment(Qt::AlignRight);
mpPageNumberLabel->setObjectName("UBTGPageNumberLabel");
mpPageNumberLabel->setText(tr("Page 0"));
mpPageNumberLabel->setText(tr("Title page"));
mpLayout->addWidget(mpPageNumberLabel);
mpButtonTitleLayout = new QHBoxLayout(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment