fixed some working issue on english

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent 76d5c99e21
commit f0734e7117
  1. 12
      src/adaptors/UBMetadataDcSubsetAdaptor.cpp
  2. 6
      src/core/UBSettings.cpp
  3. 4
      src/core/UBSettings.h
  4. 4
      src/document/UBDocumentProxy.cpp
  5. 116
      src/gui/UBTeacherGuideWidget.cpp
  6. 12
      src/gui/UBTeacherGuideWidget.h

@ -112,10 +112,10 @@ void UBMetadataDcSubsetAdaptor::persist(UBDocumentProxy* proxy)
// introduced in OpenSankore 1.40.00
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionTitle,proxy->metaData(UBSettings::sessionTitle).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionAuthors,proxy->metaData(UBSettings::sessionAuthors).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionGoals,proxy->metaData(UBSettings::sessionGoals).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionObjectives,proxy->metaData(UBSettings::sessionObjectives).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionKeywords,proxy->metaData(UBSettings::sessionKeywords).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionGradeLevel,proxy->metaData(UBSettings::sessionGradeLevel).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionBranch,proxy->metaData(UBSettings::sessionBranch).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionSubjects,proxy->metaData(UBSettings::sessionSubjects).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionType,proxy->metaData(UBSettings::sessionType).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionLicence,proxy->metaData(UBSettings::sessionLicence).toString());
@ -228,10 +228,10 @@ QMap<QString, QVariant> UBMetadataDcSubsetAdaptor::load(QString pPath)
{
metadata.insert(UBSettings::sessionAuthors, xml.readElementText());
}
else if (xml.name() == UBSettings::sessionGoals // introduced in OpenSankore 1.40.00
else if (xml.name() == UBSettings::sessionObjectives // introduced in OpenSankore 1.40.00
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri)
{
metadata.insert(UBSettings::sessionGoals, xml.readElementText());
metadata.insert(UBSettings::sessionObjectives, xml.readElementText());
}
else if (xml.name() == UBSettings::sessionKeywords // introduced in OpenSankore 1.40.00
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri)
@ -243,10 +243,10 @@ QMap<QString, QVariant> UBMetadataDcSubsetAdaptor::load(QString pPath)
{
metadata.insert(UBSettings::sessionGradeLevel, xml.readElementText());
}
else if (xml.name() == UBSettings::sessionBranch // introduced in OpenSankore 1.40.00
else if (xml.name() == UBSettings::sessionSubjects // introduced in OpenSankore 1.40.00
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri)
{
metadata.insert(UBSettings::sessionBranch, xml.readElementText());
metadata.insert(UBSettings::sessionSubjects, xml.readElementText());
}
else if (xml.name() == UBSettings::sessionType // introduced in OpenSankore 1.40.00
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri)

@ -38,10 +38,10 @@ QString UBSettings::documentVersion = QString("Version");
QString UBSettings::documentUpdatedAt = QString("UpdatedAt");
QString UBSettings::sessionTitle = QString("sessionTitle");
QString UBSettings::sessionAuthors = QString("sessionAuthors");
QString UBSettings::sessionGoals = QString("sessionGoals");
QString UBSettings::sessionObjectives = QString("sessionObjectives");
QString UBSettings::sessionKeywords = QString("sessionKeywords");
QString UBSettings::sessionGradeLevel = QString("sessionGradeLevel");
QString UBSettings::sessionBranch = QString("sessionBranch");
QString UBSettings::sessionSubjects = QString("sessionSubjects");
QString UBSettings::sessionType = QString("sessionType");
QString UBSettings::sessionLicence = QString("sessionLicence");
QString UBSettings::documentDate = QString("date");
@ -55,7 +55,7 @@ QString UBSettings::uniboardApplicationNamespaceUri = "http://uniboard.mnemis.co
const int UBSettings::sDefaultFontPixelSize = 36;
const char *UBSettings::sDefaultFontFamily = "Arial";
QString UBSettings::currentFileVersion = "4.5.0";
QString UBSettings::currentFileVersion = "4.6.0";
QColor UBSettings::crossDarkBackground = QColor(44, 44, 44, 200);
QColor UBSettings::crossLightBackground = QColor(165, 225, 255);

@ -156,10 +156,10 @@ class UBSettings : public QObject
static QString sessionTitle;
static QString sessionAuthors;
static QString sessionGoals;
static QString sessionObjectives;
static QString sessionKeywords;
static QString sessionGradeLevel;
static QString sessionBranch;
static QString sessionSubjects;
static QString sessionType;
static QString sessionLicence;

@ -53,10 +53,10 @@ void UBDocumentProxy::init()
//teacherGuide metadata
setMetaData(UBSettings::sessionTitle,"");
setMetaData(UBSettings::sessionAuthors,"");
setMetaData(UBSettings::sessionGoals,"");
setMetaData(UBSettings::sessionObjectives,"");
setMetaData(UBSettings::sessionKeywords,"");
setMetaData(UBSettings::sessionGradeLevel,"");
setMetaData(UBSettings::sessionBranch,"");
setMetaData(UBSettings::sessionSubjects,"");
setMetaData(UBSettings::sessionType,"");
setMetaData(UBSettings::sessionLicence,"");
}

@ -594,18 +594,18 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons
, mpSeparatorAuthors(NULL)
, mpCreationLabel(NULL)
, mpLastModifiedLabel(NULL)
, mpGoalsLabel(NULL)
, mpGoals(NULL)
, mpSeparatorGoals(NULL)
, mpObjectivesLabel(NULL)
, mpObjectives(NULL)
, mpSeparatorObjectives(NULL)
, mpIndexLabel(NULL)
, mpKeywordsLabel(NULL)
, mpKeywords(NULL)
, mpSchoolLevelItemLabel(NULL)
, mpSchoolLevelBox(NULL)
, mpSchoolLevelValueLabel(NULL)
, mpSchoolBranchItemLabel(NULL)
, mpSchoolBranchBox(NULL)
, mpSchoolBranchValueLabel(NULL)
, mpSchoolSubjectsItemLabel(NULL)
, mpSchoolSubjectsBox(NULL)
, mpSchoolSubjectsValueLabel(NULL)
, mpSchoolTypeItemLabel(NULL)
, mpSchoolTypeBox(NULL)
, mpSchoolTypeValueLabel(NULL)
@ -670,21 +670,21 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons
mpSeparatorAuthors->setObjectName("UBTGSeparator");
mpLayout->addWidget(mpSeparatorAuthors);
mpGoalsLabel = new QLabel(this);
mpGoalsLabel->setObjectName("UBTGZeroPageEditionModeTitle");
mpGoalsLabel->setText(tr("Goal(s)"));
mpGoalsLabel->setStyleSheet(chapterStyle);
mpLayout->addWidget(mpGoalsLabel);
mpObjectivesLabel = new QLabel(this);
mpObjectivesLabel->setObjectName("UBTGZeroPageEditionModeTitle");
mpObjectivesLabel->setText(tr("Objective(s)"));
mpObjectivesLabel->setStyleSheet(chapterStyle);
mpLayout->addWidget(mpObjectivesLabel);
mpGoals = new UBTGAdaptableText(0,this);
mpGoals->setObjectName("UBTGZeroPageInputText");
mpGoals->setPlaceHolderText(tr("Type goals here..."));
mpLayout->addWidget(mpGoals);
mpObjectives = new UBTGAdaptableText(0,this);
mpObjectives->setObjectName("UBTGZeroPageInputText");
mpObjectives->setPlaceHolderText(tr("Type objectives here..."));
mpLayout->addWidget(mpObjectives);
mpSeparatorGoals = new QFrame(this);
mpSeparatorGoals->setFixedHeight(UBTG_SEPARATOR_FIXED_HEIGHT);
mpSeparatorGoals->setObjectName("UBTGSeparator");
mpLayout->addWidget(mpSeparatorGoals);
mpSeparatorObjectives = new QFrame(this);
mpSeparatorObjectives->setFixedHeight(UBTG_SEPARATOR_FIXED_HEIGHT);
mpSeparatorObjectives->setObjectName("UBTGSeparator");
mpLayout->addWidget(mpSeparatorObjectives);
mpIndexLabel = new QLabel(this);
mpIndexLabel->setObjectName("UBTGZeroPageEditionModeTitle");
@ -713,16 +713,16 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons
mpSchoolLevelValueLabel = new QLabel(this);
mpLayout->addWidget(mpSchoolLevelValueLabel);
mpSchoolBranchItemLabel = new QLabel(this);
mpSchoolBranchItemLabel->setObjectName("UBTGZeroPageItemLabel");
mpSchoolBranchItemLabel->setText(tr("Branch:"));
mpSchoolBranchItemLabel->setStyleSheet(chapterStyle);
mpLayout->addWidget(mpSchoolBranchItemLabel);
mpSchoolBranchBox = new QComboBox(this);
mpSchoolBranchBox->setObjectName("DockPaletteWidgetComboBox");
mpLayout->addWidget(mpSchoolBranchBox);
mpSchoolBranchValueLabel = new QLabel(this);
mpLayout->addWidget(mpSchoolBranchValueLabel);
mpSchoolSubjectsItemLabel = new QLabel(this);
mpSchoolSubjectsItemLabel->setObjectName("UBTGZeroPageItemLabel");
mpSchoolSubjectsItemLabel->setText(tr("Subjects:"));
mpSchoolSubjectsItemLabel->setStyleSheet(chapterStyle);
mpLayout->addWidget(mpSchoolSubjectsItemLabel);
mpSchoolSubjectsBox = new QComboBox(this);
mpSchoolSubjectsBox->setObjectName("DockPaletteWidgetComboBox");
mpLayout->addWidget(mpSchoolSubjectsBox);
mpSchoolSubjectsValueLabel = new QLabel(this);
mpLayout->addWidget(mpSchoolSubjectsValueLabel);
mpSchoolTypeItemLabel = new QLabel(this);
mpSchoolTypeItemLabel->setObjectName("UBTGZeroPageItemLabel");
@ -771,16 +771,16 @@ UBTeacherGuidePageZeroWidget::~UBTeacherGuidePageZeroWidget()
DELETEPTR(mpSeparatorAuthors);
DELETEPTR(mpCreationLabel);
DELETEPTR(mpLastModifiedLabel);
DELETEPTR(mpGoalsLabel);
DELETEPTR(mpGoals);
DELETEPTR(mpSeparatorGoals);
DELETEPTR(mpObjectivesLabel);
DELETEPTR(mpObjectives);
DELETEPTR(mpSeparatorObjectives);
DELETEPTR(mpIndexLabel);
DELETEPTR(mpKeywordsLabel);
DELETEPTR(mpKeywords);
DELETEPTR(mpSchoolLevelItemLabel);
DELETEPTR(mpSchoolLevelBox);
DELETEPTR(mpSchoolBranchItemLabel);
DELETEPTR(mpSchoolBranchBox);
DELETEPTR(mpSchoolSubjectsItemLabel);
DELETEPTR(mpSchoolSubjectsBox);
DELETEPTR(mpSchoolTypeItemLabel);
DELETEPTR(mpSchoolTypeBox);
DELETEPTR(mpSeparatorIndex);
@ -853,15 +853,15 @@ void UBTeacherGuidePageZeroWidget::fillComboBoxes()
void UBTeacherGuidePageZeroWidget::onSchoolLevelChanged(QString schoolLevel)
{
QStringList subjects = mSubjects.value(mGradeLevelsMap.value(schoolLevel));
mpSchoolBranchBox->clear();
mpSchoolSubjectsBox->clear();
if(subjects.count()){
mpSchoolBranchItemLabel->setEnabled(true);
mpSchoolBranchBox->setEnabled(true);
mpSchoolBranchBox->addItems(subjects);
mpSchoolSubjectsItemLabel->setEnabled(true);
mpSchoolSubjectsBox->setEnabled(true);
mpSchoolSubjectsBox->addItems(subjects);
}
else{
mpSchoolBranchItemLabel->setDisabled(true);
mpSchoolBranchBox->setDisabled(true);
mpSchoolSubjectsItemLabel->setDisabled(true);
mpSchoolSubjectsBox->setDisabled(true);
}
}
@ -889,14 +889,14 @@ void UBTeacherGuidePageZeroWidget::loadData()
UBDocumentProxy* documentProxy = UBApplication::boardController->activeDocument();
mpSessionTitle->setText(documentProxy->metaData(UBSettings::sessionTitle).toString());
mpAuthors->setText(documentProxy->metaData(UBSettings::sessionAuthors).toString());
mpGoals->setText(documentProxy->metaData(UBSettings::sessionGoals).toString());
mpObjectives->setText(documentProxy->metaData(UBSettings::sessionObjectives).toString());
mpKeywords->setText(documentProxy->metaData(UBSettings::sessionKeywords).toString());
int currentIndex = mpSchoolLevelBox->findText(documentProxy->metaData(UBSettings::sessionGradeLevel).toString());
mpSchoolLevelBox->setCurrentIndex((currentIndex!=-1) ? currentIndex : 0);
currentIndex = mpSchoolBranchBox->findText(documentProxy->metaData(UBSettings::sessionBranch).toString());
mpSchoolBranchBox->setCurrentIndex((currentIndex!=-1) ? currentIndex : 0);
currentIndex = mpSchoolSubjectsBox->findText(documentProxy->metaData(UBSettings::sessionSubjects).toString());
mpSchoolSubjectsBox->setCurrentIndex((currentIndex!=-1) ? currentIndex : 0);
currentIndex = mpSchoolTypeBox->findText(documentProxy->metaData(UBSettings::sessionType).toString());
mpSchoolTypeBox->setCurrentIndex((currentIndex!=-1) ? currentIndex : 0);
@ -913,10 +913,10 @@ void UBTeacherGuidePageZeroWidget::persistData()
UBDocumentProxy* documentProxy = UBApplication::boardController->activeDocument();
documentProxy->setMetaData(UBSettings::sessionTitle,mpSessionTitle->text());
documentProxy->setMetaData(UBSettings::sessionAuthors, mpAuthors->text());
documentProxy->setMetaData(UBSettings::sessionGoals,mpGoals->text());
documentProxy->setMetaData(UBSettings::sessionObjectives,mpObjectives->text());
documentProxy->setMetaData(UBSettings::sessionKeywords,mpKeywords->text());
documentProxy->setMetaData(UBSettings::sessionGradeLevel,mpSchoolLevelBox->currentText());
documentProxy->setMetaData(UBSettings::sessionBranch,mpSchoolBranchBox->currentText());
documentProxy->setMetaData(UBSettings::sessionSubjects,mpSchoolSubjectsBox->currentText());
documentProxy->setMetaData(UBSettings::sessionType,mpSchoolTypeBox->currentText());
documentProxy->setMetaData(UBSettings::sessionLicence,mpLicenceBox->currentText());
}
@ -942,16 +942,16 @@ void UBTeacherGuidePageZeroWidget::switchToMode(tUBTGZeroPageMode mode)
mpAuthors->setReadOnly(false);
mpAuthors->setStyleSheet(inputStyleSheet);
mpAuthors->setTextColor(QColor(Qt::lightGray));
mpGoals->setReadOnly(false);
mpGoals->setStyleSheet(inputStyleSheet);
mpGoals->setTextColor(QColor(Qt::lightGray));
mpObjectives->setReadOnly(false);
mpObjectives->setStyleSheet(inputStyleSheet);
mpObjectives->setTextColor(QColor(Qt::lightGray));
mpKeywords->setReadOnly(false);
mpKeywords->setStyleSheet(inputStyleSheet);
mpKeywords->setTextColor(QColor(Qt::lightGray));
mpSchoolLevelValueLabel->hide();
mpSchoolLevelBox->show();
mpSchoolBranchValueLabel->hide();
mpSchoolBranchBox->show();
mpSchoolSubjectsValueLabel->hide();
mpSchoolSubjectsBox->show();
mpSchoolTypeValueLabel->hide();
mpSchoolTypeBox->show();
mpLicenceIcon->hide();
@ -969,18 +969,18 @@ void UBTeacherGuidePageZeroWidget::switchToMode(tUBTGZeroPageMode mode)
mpAuthors->setStyleSheet(inputStyleSheet);
mpAuthors->setTextColor(QColor(Qt::black));
mpAuthors->showText(mpAuthors->text());
mpGoals->setStyleSheet(inputStyleSheet);
mpGoals->setTextColor(QColor(Qt::black));
mpGoals->showText(mpGoals->text());
mpObjectives->setStyleSheet(inputStyleSheet);
mpObjectives->setTextColor(QColor(Qt::black));
mpObjectives->showText(mpObjectives->text());
mpKeywords->setStyleSheet(inputStyleSheet);
mpKeywords->setTextColor(QColor(Qt::black));
mpKeywords->showText(mpKeywords->text());
mpSchoolLevelValueLabel->setText(mpSchoolLevelBox->currentText());
mpSchoolLevelValueLabel->show();
mpSchoolLevelBox->hide();
mpSchoolBranchValueLabel->setText(mpSchoolBranchBox->currentText());
mpSchoolBranchValueLabel->show();
mpSchoolBranchBox->hide();
mpSchoolSubjectsValueLabel->setText(mpSchoolSubjectsBox->currentText());
mpSchoolSubjectsValueLabel->show();
mpSchoolSubjectsBox->hide();
mpSchoolTypeValueLabel->setText(mpSchoolTypeBox->currentText());
mpSchoolTypeValueLabel->show();
mpSchoolTypeBox->hide();
@ -1022,7 +1022,7 @@ QVector<tUBGEElementNode*> UBTeacherGuidePageZeroWidget::getData()
elementNode = new tUBGEElementNode();
elementNode->name = "goals";
elementNode->attributes.insert("value",mpGoals->text());
elementNode->attributes.insert("value",mpObjectives->text());
result << elementNode;
elementNode = new tUBGEElementNode();
@ -1037,7 +1037,7 @@ QVector<tUBGEElementNode*> UBTeacherGuidePageZeroWidget::getData()
elementNode = new tUBGEElementNode();
elementNode->name = "schoolBranch";
elementNode->attributes.insert("value",mpSchoolBranchBox->currentText());
elementNode->attributes.insert("value",mpSchoolSubjectsBox->currentText());
result << elementNode;
elementNode = new tUBGEElementNode();

@ -150,9 +150,9 @@ private:
QLabel* mpCreationLabel;
QLabel* mpLastModifiedLabel;
QLabel* mpGoalsLabel;
UBTGAdaptableText* mpGoals;
QFrame* mpSeparatorGoals;
QLabel* mpObjectivesLabel;
UBTGAdaptableText* mpObjectives;
QFrame* mpSeparatorObjectives;
QLabel* mpIndexLabel;
QLabel* mpKeywordsLabel;
@ -162,9 +162,9 @@ private:
QComboBox* mpSchoolLevelBox;
QLabel* mpSchoolLevelValueLabel;
QLabel* mpSchoolBranchItemLabel;
QComboBox* mpSchoolBranchBox;
QLabel* mpSchoolBranchValueLabel;
QLabel* mpSchoolSubjectsItemLabel;
QComboBox* mpSchoolSubjectsBox;
QLabel* mpSchoolSubjectsValueLabel;
QLabel* mpSchoolTypeItemLabel;
QComboBox* mpSchoolTypeBox;

Loading…
Cancel
Save