stored zero page informations

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent bd2feb05e6
commit c6e990454c
  1. 2
      src/adaptors/UBMetadataDcSubsetAdaptor.cpp
  2. 1
      src/document/UBDocumentController.cpp
  3. 106
      src/document/UBDocumentProxy.cpp
  4. 14
      src/document/UBDocumentProxy.h
  5. 16
      src/gui/UBTeacherGuideWidget.cpp
  6. 2
      src/gui/UBTeacherGuideWidget.h
  7. 1
      src/gui/UBTeacherGuideWidgetsTools.cpp

@ -118,7 +118,6 @@ void UBMetadataDcSubsetAdaptor::persist(UBDocumentProxy* proxy)
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionBranch,proxy->metaData(UBSettings::sessionBranch).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionType,proxy->metaData(UBSettings::sessionType).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionLicence,proxy->metaData(UBSettings::sessionLicence).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionAuthors,proxy->metaData(UBSettings::sessionAuthors).toString());
xmlWriter.writeEndElement(); //dc:Description
xmlWriter.writeEndElement(); //RDF
@ -299,7 +298,6 @@ QMap<QString, QVariant> UBMetadataDcSubsetAdaptor::load(QString pPath)
metadata.insert(UBSettings::documentDate, QVariant(date));
return metadata;
}

@ -12,6 +12,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "UBDocumentController.h"
#include <QtCore>

@ -50,13 +50,15 @@ void UBDocumentProxy::init()
setDefaultDocumentSize(UBSettings::settings()->pageSize->get().toSize());
setSessionTitle("");
setSessionTarget("");
setSessionLicence("");
setSessionKeywords("");
setSessionLevel("");
setSessionTopic("");
setSessionAuthor("");
//teacherGuide metadata
setMetaData(UBSettings::sessionTitle,"");
setMetaData(UBSettings::sessionAuthors,"");
setMetaData(UBSettings::sessionGoals,"");
setMetaData(UBSettings::sessionKeywords,"");
setMetaData(UBSettings::sessionGradeLevel,"");
setMetaData(UBSettings::sessionBranch,"");
setMetaData(UBSettings::sessionType,"");
setMetaData(UBSettings::sessionLicence,"");
}
@ -204,96 +206,6 @@ void UBDocumentProxy::setUuid(const QUuid& uuid)
UBSettings::uniboardDocumentNamespaceUri + "/" + UBStringUtils::toCanonicalUuid(uuid));
}
QString UBDocumentProxy::sessionTitle() const
{
if(mMetaDatas.contains(UBSettings::sessionTitle))
return metaData(UBSettings::sessionTitle).toString();
else
return QString();
}
void UBDocumentProxy::setSessionTitle(const QString & sessionTitle)
{
setMetaData(UBSettings::sessionTitle,QVariant(sessionTitle));
}
QString UBDocumentProxy::sessionTarget() const
{
if(mMetaDatas.contains(UBSettings::sessionTarget))
return metaData(UBSettings::sessionTarget).toString();
else
return QString();
}
void UBDocumentProxy::setSessionTarget(const QString & sessionTarget)
{
setMetaData(UBSettings::sessionTarget,QVariant(sessionTarget));
}
QString UBDocumentProxy::sessionLicence() const
{
if(mMetaDatas.contains(UBSettings::sessionLicence))
return metaData(UBSettings::sessionLicence).toString();
else
return QString();
}
void UBDocumentProxy::setSessionLicence(const QString & sessionLicence)
{
setMetaData(UBSettings::sessionLicence,QVariant(sessionLicence));
}
void UBDocumentProxy::setSessionKeywords(const QString &kw)
{
setMetaData(UBSettings::sessionKeywords,QVariant(kw));
}
QString UBDocumentProxy::sessionKeywords()
{
if(mMetaDatas.contains(UBSettings::sessionKeywords))
return metaData(UBSettings::sessionKeywords).toString();
else
return QString();
}
void UBDocumentProxy::setSessionLevel(const QString &level)
{
setMetaData(UBSettings::sessionLevel,QVariant(level));
}
QString UBDocumentProxy::sessionLevel()
{
if(mMetaDatas.contains(UBSettings::sessionLevel))
return metaData(UBSettings::sessionLevel).toString();
else
return QString();
}
void UBDocumentProxy::setSessionTopic(const QString &topic)
{
setMetaData(UBSettings::sessionTopic,QVariant(topic));
}
QString UBDocumentProxy::sessionTopic()
{
if(mMetaDatas.contains(UBSettings::sessionTopic))
return metaData(UBSettings::sessionTopic).toString();
else
return QString();
}
void UBDocumentProxy::setSessionAuthor(const QString &authors)
{
setMetaData(UBSettings::sessionAuthors,QVariant(authors));
}
QString UBDocumentProxy::sessionAuthors()
{
if(mMetaDatas.contains(UBSettings::sessionAuthors))
return metaData(UBSettings::sessionAuthors).toString();
else
return QString();
}
QDateTime UBDocumentProxy::documentDate()
{

@ -45,20 +45,6 @@ class UBDocumentProxy : public QObject
QString name() const;
QString groupName() const;
QString sessionTitle() const;
void setSessionTitle(const QString& sessionTitle);
QString sessionTarget() const;
void setSessionTarget(const QString& sessionTarget);
QString sessionLicence() const;
void setSessionLicence(const QString& sessionLicence);
void setSessionKeywords(const QString& kw);
QString sessionKeywords();
void setSessionLevel(const QString& level);
QString sessionLevel();
void setSessionTopic(const QString& topic);
QString sessionTopic();
void setSessionAuthor(const QString& authors);
QString sessionAuthors();
QDateTime documentDate();
QDateTime lastUpdate();

@ -43,6 +43,15 @@
#define UBTG_SEPARATOR_FIXED_HEIGHT 3
typedef enum
{
eUBTGAddSubItemWidgetType_None,
eUBTGAddSubItemWidgetType_Action ,
eUBTGAddSubItemWidgetType_Media,
eUBTGAddSubItemWidgetType_Url
}eUBTGAddSubItemWidgetType;
/***************************************************************************
* class UBTeacherGuideEditionWidget *
@ -61,7 +70,6 @@ UBTeacherGuideEditionWidget::UBTeacherGuideEditionWidget(QWidget *parent, const
, mpAddAnActionItem(NULL)
, mpAddAMediaItem(NULL)
, mpAddALinkItem(NULL)
, mpTreeDelegate(NULL)
{
setObjectName(name);
@ -94,10 +102,7 @@ UBTeacherGuideEditionWidget::UBTeacherGuideEditionWidget(QWidget *parent, const
mpTreeWidget = new QTreeWidget(this);
mpLayout->addWidget(mpTreeWidget);
mpTreeDelegate = new UBTGWidgetTreeDelegate();
mpRootWidgetItem = mpTreeWidget->invisibleRootItem();
//mpTreeWidget->setItemDelegate(mpTreeDelegate);
mpTreeWidget->setRootIsDecorated(false);
mpTreeWidget->setIndentation(0);
mpTreeWidget->setDropIndicatorShown(false);
@ -131,7 +136,6 @@ UBTeacherGuideEditionWidget::~UBTeacherGuideEditionWidget()
DELETEPTR(mpAddAnActionItem);
DELETEPTR(mpAddAMediaItem);
DELETEPTR(mpAddALinkItem);
DELETEPTR(mpTreeDelegate);
DELETEPTR(mpTreeWidget)
DELETEPTR(mpLayout);
}
@ -755,7 +759,6 @@ void UBTeacherGuidePageZeroWidget::onActiveSceneChanged()
mpCreationLabel->setText(tr("Created the: ") + creationDate.toString(Qt::SystemLocaleShortDate));
QDateTime updatedDate = documentProxy->lastUpdate();
mpLastModifiedLabel->setText(tr("Updated the: ") + updatedDate.toString(Qt::SystemLocaleShortDate));
persistData();
loadData();
}
}
@ -768,7 +771,6 @@ void UBTeacherGuidePageZeroWidget::hideEvent ( QHideEvent * event )
void UBTeacherGuidePageZeroWidget::loadData()
{
UBDocumentProxy* documentProxy = UBApplication::boardController->activeDocument();
mpSessionTitle->setText(documentProxy->metaData(UBSettings::sessionTitle).toString());
mpAuthors->setText(documentProxy->metaData(UBSettings::sessionAuthors).toString());

@ -24,7 +24,6 @@ class QPushButton;
class UBDocumentProxy;
#include "UBTeacherGuideWidgetsTools.h"
#include "UBTGWidgetTreeDelegate.h"
typedef enum
{
@ -64,7 +63,6 @@ private:
UBAddItem* mpAddAnActionItem;
UBAddItem* mpAddAMediaItem;
UBAddItem* mpAddALinkItem;
UBTGWidgetTreeDelegate* mpTreeDelegate;
};

@ -24,7 +24,6 @@
#include <QApplication>
#include "UBTeacherGuideWidgetsTools.h"
#include "UBTGWidgetTreeDelegate.h"
#include "core/UBPersistenceManager.h"

Loading…
Cancel
Save