fixed issue 663

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent 4e7dac2f60
commit d15d5805f7
  1. 7
      resources/customizations/teacherGuide/indexingParameters.xml
  2. 6
      src/adaptors/UBSvgSubsetAdaptor.cpp
  3. 10
      src/board/UBBoardController.cpp
  4. 2
      src/board/UBBoardPaletteManager.h
  5. 4
      src/core/UBApplicationController.cpp
  6. 14
      src/core/UBPersistenceManager.cpp
  7. 5
      src/gui/UBDockTeacherGuideWidget.cpp
  8. 2
      src/gui/UBDockTeacherGuideWidget.h
  9. 490
      src/gui/UBTeacherGuideWidget.cpp
  10. 5
      src/gui/UBTeacherGuideWidget.h

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<teacherGuide> <teacherGuide>
<gradeLevels> <gradeLevels>
<gradeLevel label="" baseLevel="Maternelle"/>
<gradeLevel label="Petite Section (3-4 ans)" baseLevel="Maternelle"/> <gradeLevel label="Petite Section (3-4 ans)" baseLevel="Maternelle"/>
<gradeLevel label="Moyenne Section (4-5 ans)" baseLevel="Maternelle"/> <gradeLevel label="Moyenne Section (4-5 ans)" baseLevel="Maternelle"/>
<gradeLevel label="Grande Section (5-6 ans)" baseLevel="Maternelle"/> <gradeLevel label="Grande Section (5-6 ans)" baseLevel="Maternelle"/>
@ -22,6 +23,7 @@
<gradeLevel label="Education Spécialisée" baseLevel="Enseignement Professionnel" /> <gradeLevel label="Education Spécialisée" baseLevel="Enseignement Professionnel" />
</gradeLevels> </gradeLevels>
<subjects baseLevel="Maternelle"> <subjects baseLevel="Maternelle">
<subject label="" />
<subject label="Percevoir, sentir, imaginer, créer" /> <subject label="Percevoir, sentir, imaginer, créer" />
<subject label="Découvrir l'écrit" /> <subject label="Découvrir l'écrit" />
<subject label="S'approprier le langage" /> <subject label="S'approprier le langage" />
@ -29,6 +31,7 @@
<subject label="Découvrir le monde" /> <subject label="Découvrir le monde" />
</subjects> </subjects>
<subjects baseLevel="Elémentaire"> <subjects baseLevel="Elémentaire">
<subject label="" />
<subject label="Pratiques artistiques" /> <subject label="Pratiques artistiques" />
<subject label="Pratiques artistiques - arts visuels" /> <subject label="Pratiques artistiques - arts visuels" />
<subject label="Pratiques artistiques - éducation musicale" /> <subject label="Pratiques artistiques - éducation musicale" />
@ -50,6 +53,7 @@
<subject label="TUIC" /> <subject label="TUIC" />
</subjects> </subjects>
<subjects baseLevel="Collège"> <subjects baseLevel="Collège">
<subject label="" />
<subject label="Pratiques artistiques" /> <subject label="Pratiques artistiques" />
<subject label="Pratiques artistiques - arts visuels" /> <subject label="Pratiques artistiques - arts visuels" />
<subject label="Pratiques artistiques - éducation musicale" /> <subject label="Pratiques artistiques - éducation musicale" />
@ -80,6 +84,7 @@
<subject label="Education aux médias" /> <subject label="Education aux médias" />
</subjects> </subjects>
<subjects baseLevel="Lycée"> <subjects baseLevel="Lycée">
<subject label="" />
<subject label="Enseignements artistiques" /> <subject label="Enseignements artistiques" />
<subject label="Agriculture" /> <subject label="Agriculture" />
<subject label="Arts" /> <subject label="Arts" />
@ -125,6 +130,7 @@
<subject label="Philosophie" /> <subject label="Philosophie" />
</subjects> </subjects>
<subjects baseLevel="Enseignement Professionnel"> <subjects baseLevel="Enseignement Professionnel">
<subject label="" />
<subject label="Enseignements artistiques" /> <subject label="Enseignements artistiques" />
<subject label="Agriculture" /> <subject label="Agriculture" />
<subject label="Arts" /> <subject label="Arts" />
@ -169,6 +175,7 @@
<subject label="Philosophie" /> <subject label="Philosophie" />
</subjects> </subjects>
<types> <types>
<type label="" />
<type label="Activité : Evaluation/Travail à la maison" /> <type label="Activité : Evaluation/Travail à la maison" />
<type label="Activité : Exercice" /> <type label="Activité : Exercice" />
<type label="Activité : Travaux Pratiques" /> <type label="Activité : Travaux Pratiques" />

@ -45,6 +45,7 @@
#include "board/UBBoardView.h" #include "board/UBBoardView.h"
#include "board/UBBoardController.h" #include "board/UBBoardController.h"
#include "board/UBDrawingController.h" #include "board/UBDrawingController.h"
#include "board/UBBoardPaletteManager.h"
#include "frameworks/UBFileSystemUtils.h" #include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBStringUtils.h" #include "frameworks/UBStringUtils.h"
@ -54,6 +55,9 @@
#include "core/UBPersistenceManager.h" #include "core/UBPersistenceManager.h"
#include "core/UBApplication.h" #include "core/UBApplication.h"
#include "gui/UBTeacherGuideWidget.h"
#include "gui/UBDockTeacherGuideWidget.h"
#include "interfaces/IDataStorage.h" #include "interfaces/IDataStorage.h"
#include "document/UBDocumentContainer.h" #include "document/UBDocumentContainer.h"
@ -1142,7 +1146,7 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::writeSvgElement()
bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex) bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex)
{ {
if (mScene->isModified()) if (mScene->isModified() || (UBApplication::boardController->paletteManager()->teacherGuideDockWidget() && UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified()))
{ {
//Creating dom structure to store information //Creating dom structure to store information

@ -38,6 +38,9 @@
#include "gui/UBToolWidget.h" #include "gui/UBToolWidget.h"
#include "gui/UBKeyboardPalette.h" #include "gui/UBKeyboardPalette.h"
#include "gui/UBMagnifer.h" #include "gui/UBMagnifer.h"
#include "gui/UBDockPaletteWidget.h"
#include "gui/UBDockTeacherGuideWidget.h"
#include "gui/UBTeacherGuideWidget.h"
#include "domain/UBGraphicsPixmapItem.h" #include "domain/UBGraphicsPixmapItem.h"
#include "domain/UBGraphicsItemUndoCommand.h" #include "domain/UBGraphicsItemUndoCommand.h"
@ -1464,7 +1467,10 @@ void UBBoardController::lastWindowClosed()
{ {
if (!mCleanupDone) if (!mCleanupDone)
{ {
if (selectedDocument()->pageCount() == 1 && (!mActiveScene || mActiveScene->isEmpty())) bool teacherGuideModified = false;
if(UBApplication::boardController->paletteManager()->teacherGuideDockWidget())
teacherGuideModified = UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified();
if (selectedDocument()->pageCount() == 1 && (!mActiveScene || mActiveScene->isEmpty()) && !teacherGuideModified)
{ {
UBPersistenceManager::persistenceManager()->deleteDocument(selectedDocument()); UBPersistenceManager::persistenceManager()->deleteDocument(selectedDocument());
} }
@ -1591,7 +1597,7 @@ void UBBoardController::persistCurrentScene()
if(UBPersistenceManager::persistenceManager() if(UBPersistenceManager::persistenceManager()
&& selectedDocument() && mActiveScene && selectedDocument() && mActiveScene
&& (mActiveSceneIndex >= 0) && (mActiveSceneIndex >= 0)
&& mActiveScene->isModified()) && (mActiveScene->isModified() || (UBApplication::boardController->paletteManager()->teacherGuideDockWidget() && UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified())))
{ {
emit activeSceneWillBePersisted(); emit activeSceneWillBePersisted();

@ -69,6 +69,8 @@ class UBBoardPaletteManager : public QObject
void setCurrentWebToolsPalette(UBWebToolsPalette *palette) {mWebToolsCurrentPalette = palette;} void setCurrentWebToolsPalette(UBWebToolsPalette *palette) {mWebToolsCurrentPalette = palette;}
UBWebToolsPalette* mWebToolsCurrentPalette; UBWebToolsPalette* mWebToolsCurrentPalette;
UBDockTeacherGuideWidget* teacherGuideDockWidget() { return mpTeacherGuideWidget;}
void processPalettersWidget(UBDockPalette *paletter, eUBDockPaletteWidgetMode mode); void processPalettersWidget(UBDockPalette *paletter, eUBDockPaletteWidgetMode mode);
void changeMode(eUBDockPaletteWidgetMode newMode, bool isInit = false); void changeMode(eUBDockPaletteWidgetMode newMode, bool isInit = false);
void startDownloads(); void startDownloads();

@ -40,6 +40,8 @@
#include "gui/UBScreenMirror.h" #include "gui/UBScreenMirror.h"
#include "gui/UBMainWindow.h" #include "gui/UBMainWindow.h"
#include "gui/UBDockTeacherGuideWidget.h"
#include "gui/UBTeacherGuideWidget.h"
#include "domain/UBGraphicsPixmapItem.h" #include "domain/UBGraphicsPixmapItem.h"
#include "domain/UBW3CWidget.h" #include "domain/UBW3CWidget.h"
@ -419,7 +421,7 @@ void UBApplicationController::showDocument()
if (UBApplication::boardController) if (UBApplication::boardController)
{ {
if (UBApplication::boardController->activeScene()->isModified()) if (UBApplication::boardController->activeScene()->isModified() || (UBApplication::boardController->paletteManager()->teacherGuideDockWidget() && UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified()))
UBApplication::boardController->persistCurrentScene(); UBApplication::boardController->persistCurrentScene();
UBApplication::boardController->hide(); UBApplication::boardController->hide();
} }

@ -25,6 +25,9 @@
#include "core/UBSettings.h" #include "core/UBSettings.h"
#include "core/UBSetting.h" #include "core/UBSetting.h"
#include "gui/UBDockTeacherGuideWidget.h"
#include "gui/UBTeacherGuideWidget.h"
#include "document/UBDocumentProxy.h" #include "document/UBDocumentProxy.h"
#include "adaptors/UBExportPDF.h" #include "adaptors/UBExportPDF.h"
@ -33,6 +36,7 @@
#include "adaptors/UBMetadataDcSubsetAdaptor.h" #include "adaptors/UBMetadataDcSubsetAdaptor.h"
#include "board/UBBoardController.h" #include "board/UBBoardController.h"
#include "board/UBBoardPaletteManager.h"
#include "interfaces/IDataStorage.h" #include "interfaces/IDataStorage.h"
@ -591,7 +595,6 @@ UBGraphicsScene* UBPersistenceManager::loadDocumentScene(UBDocumentProxy* proxy,
} }
} }
void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy, UBGraphicsScene* pScene, const int pSceneIndex) void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy, UBGraphicsScene* pScene, const int pSceneIndex)
{ {
checkIfDocumentRepositoryExists(); checkIfDocumentRepositoryExists();
@ -603,10 +606,15 @@ void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy,
QDir dir(pDocumentProxy->persistencePath()); QDir dir(pDocumentProxy->persistencePath());
dir.mkpath(pDocumentProxy->persistencePath()); dir.mkpath(pDocumentProxy->persistencePath());
if (pDocumentProxy->isModified()) UBBoardPaletteManager* paletteManager = UBApplication::boardController->paletteManager();
bool teacherGuideModified = false;
if(paletteManager->teacherGuideDockWidget())
teacherGuideModified = paletteManager->teacherGuideDockWidget()->teacherGuideWidget()->isModified();
if (pDocumentProxy->isModified() || teacherGuideModified)
UBMetadataDcSubsetAdaptor::persist(pDocumentProxy); UBMetadataDcSubsetAdaptor::persist(pDocumentProxy);
if (pScene->isModified()) if (pScene->isModified() || teacherGuideModified)
{ {
UBSvgSubsetAdaptor::persistScene(pDocumentProxy, pScene, pSceneIndex); UBSvgSubsetAdaptor::persistScene(pDocumentProxy, pScene, pSceneIndex);

@ -44,3 +44,8 @@ UBDockTeacherGuideWidget::~UBDockTeacherGuideWidget()
DELETEPTR(mpTeacherGuideWidget); DELETEPTR(mpTeacherGuideWidget);
DELETEPTR(mpLayout); DELETEPTR(mpLayout);
} }
UBTeacherGuideWidget* UBDockTeacherGuideWidget::teacherGuideWidget()
{
return mpTeacherGuideWidget;
}

@ -31,6 +31,8 @@ public:
bool visibleInMode(eUBDockPaletteWidgetMode mode){ return mode == eUBDockPaletteWidget_BOARD; } bool visibleInMode(eUBDockPaletteWidgetMode mode){ return mode == eUBDockPaletteWidget_BOARD; }
UBTeacherGuideWidget* teacherGuideWidget();
private: private:
QVBoxLayout* mpLayout; QVBoxLayout* mpLayout;
UBTeacherGuideWidget* mpTeacherGuideWidget; UBTeacherGuideWidget* mpTeacherGuideWidget;

File diff suppressed because it is too large Load Diff

@ -50,6 +50,8 @@ public:
void load(QString element); void load(QString element);
QVector<tIDataStorage*> save(int pageIndex); QVector<tIDataStorage*> save(int pageIndex);
bool isModified();
public slots: public slots:
void onAddItemClicked(QTreeWidgetItem* widget, int column, QDomElement* element = 0); void onAddItemClicked(QTreeWidgetItem* widget, int column, QDomElement* element = 0);
void onActiveSceneChanged(); void onActiveSceneChanged();
@ -124,6 +126,7 @@ public:
~UBTeacherGuidePageZeroWidget(); ~UBTeacherGuidePageZeroWidget();
QVector<tUBGEElementNode*> getData(); QVector<tUBGEElementNode*> getData();
bool isModified();
public slots: public slots:
@ -198,6 +201,8 @@ public:
explicit UBTeacherGuideWidget(QWidget* parent = 0, const char* name="UBTeacherGuideWidget"); explicit UBTeacherGuideWidget(QWidget* parent = 0, const char* name="UBTeacherGuideWidget");
~UBTeacherGuideWidget(); ~UBTeacherGuideWidget();
bool isModified();
public slots: public slots:
void changeMode(); void changeMode();
void showPresentationMode(); void showPresentationMode();

Loading…
Cancel
Save