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. 494
      src/gui/UBTeacherGuideWidget.cpp
  10. 5
      src/gui/UBTeacherGuideWidget.h

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

@ -45,6 +45,7 @@
#include "board/UBBoardView.h"
#include "board/UBBoardController.h"
#include "board/UBDrawingController.h"
#include "board/UBBoardPaletteManager.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBStringUtils.h"
@ -54,6 +55,9 @@
#include "core/UBPersistenceManager.h"
#include "core/UBApplication.h"
#include "gui/UBTeacherGuideWidget.h"
#include "gui/UBDockTeacherGuideWidget.h"
#include "interfaces/IDataStorage.h"
#include "document/UBDocumentContainer.h"
@ -1142,7 +1146,7 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::writeSvgElement()
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

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

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

@ -40,6 +40,8 @@
#include "gui/UBScreenMirror.h"
#include "gui/UBMainWindow.h"
#include "gui/UBDockTeacherGuideWidget.h"
#include "gui/UBTeacherGuideWidget.h"
#include "domain/UBGraphicsPixmapItem.h"
#include "domain/UBW3CWidget.h"
@ -419,7 +421,7 @@ void UBApplicationController::showDocument()
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->hide();
}

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

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

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

File diff suppressed because it is too large Load Diff

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

Loading…
Cancel
Save