Commit a6c6ee3f authored by Claudio Valerio's avatar Claudio Valerio

teacher guide could be completely removed from application

parent 05847f6c
...@@ -107,18 +107,18 @@ const QPixmap* UBThumbnailAdaptor::get(UBDocumentProxy* proxy, int pageIndex) ...@@ -107,18 +107,18 @@ const QPixmap* UBThumbnailAdaptor::get(UBDocumentProxy* proxy, int pageIndex)
void UBThumbnailAdaptor::updateDocumentToHandleZeroPage(UBDocumentProxy* proxy) void UBThumbnailAdaptor::updateDocumentToHandleZeroPage(UBDocumentProxy* proxy)
{ {
if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()){ if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()){
QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", 0); QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", 0);
QFile file(fileName); QFile file(fileName);
if(!file.exists()){ if(!file.exists()){
UBPersistenceManager::persistenceManager()->persistDocumentScene(proxy,new UBGraphicsScene(proxy),0); UBPersistenceManager::persistenceManager()->persistDocumentScene(proxy,new UBGraphicsScene(proxy),0);
} }
} }
} }
void UBThumbnailAdaptor::load(UBDocumentProxy* proxy, QList<const QPixmap*>& list) void UBThumbnailAdaptor::load(UBDocumentProxy* proxy, QList<const QPixmap*>& list)
{ {
updateDocumentToHandleZeroPage(proxy); updateDocumentToHandleZeroPage(proxy);
generateMissingThumbnails(proxy); generateMissingThumbnails(proxy);
foreach(const QPixmap* pm, list) foreach(const QPixmap* pm, list)
delete pm; delete pm;
...@@ -165,7 +165,7 @@ void UBThumbnailAdaptor::persistScene(UBDocumentProxy* proxy, UBGraphicsScene* p ...@@ -165,7 +165,7 @@ void UBThumbnailAdaptor::persistScene(UBDocumentProxy* proxy, UBGraphicsScene* p
pScene->render(&painter, imageRect, sceneRect, Qt::KeepAspectRatio); pScene->render(&painter, imageRect, sceneRect, Qt::KeepAspectRatio);
if(UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified()){ if(UBApplication::boardController->paletteManager()->teacherGuideDockWidget() && UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified()){
QPixmap toque(":images/toque.svg"); QPixmap toque(":images/toque.svg");
painter.setOpacity(0.6); painter.setOpacity(0.6);
painter.drawPixmap(QPoint(width - toque.width(),0),toque); painter.drawPixmap(QPoint(width - toque.width(),0),toque);
......
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