Designer updated

This commit is contained in:
Arin Alexander 2018-05-24 14:31:10 +03:00
parent 86eb804e3a
commit 56e78f86ba
8 changed files with 9 additions and 9 deletions

View File

@ -8,6 +8,9 @@ contains(CONFIG,release) {
}
TEMPLATE = app
HEADERS += \
designersettingmanager.h
SOURCES += main.cpp \
designersettingmanager.cpp
@ -62,6 +65,5 @@ win32 {
}
}
HEADERS += \
designersettingmanager.h

View File

@ -1,4 +1,5 @@
#include "designersettingmanager.h"
#include <QMessageBox>
DesignerSettingManager::DesignerSettingManager(QObject *parent) : QObject(parent)
{
@ -33,6 +34,7 @@ QLocale::Language DesignerSettingManager::getCurrentDefaultLanguage()
void DesignerSettingManager::currentDefaulLanguageChanged(QLocale::Language language)
{
QMessageBox::information(0, tr("Warning") , tr("The language will change after the application is restarted"));
m_setting->beginGroup("ReportDesigner");
m_setting->setValue("DesignerLanguage", (int)language);
m_setting->endGroup();

View File

@ -13,8 +13,6 @@ public:
explicit DesignerSettingManager(QObject *parent = 0);
~DesignerSettingManager();
void setApplicationInstance(QApplication* application);
signals:
public slots:
void getAviableLanguages(QList<QLocale::Language>* languages);
QLocale::Language getCurrentDefaultLanguage();

View File

@ -9,8 +9,6 @@ int main(int argc, char *argv[])
QApplication a(argc, argv);
DesignerSettingManager manager;
QTranslator limeReportTranslator;
QTranslator qtTranslator;
QString translationPath = QApplication::applicationDirPath();

View File

@ -467,7 +467,7 @@ bool ReportDesignWidget::loadFromFile(const QString &fileName)
// m_scriptEditor->restoreState(editorState);
// emit loaded();
// m_dialogChanged = false;
// return true;
return true;
} else {
QMessageBox::critical(this,tr("Error"),tr("Wrong file format"));
return false;

View File

@ -981,7 +981,6 @@ QLocale::Language ReportEnginePrivate::currentDesignerLanguage()
void ReportEnginePrivate::setCurrentDesignerLanguage(QLocale::Language language)
{
m_currentDesignerLanguage = language;
QMessageBox::information(m_designerWindow, tr("Warning") ,tr("The language will change after the application is restarted"));
emit currentDefaulLanguageChanged(language);
}

View File

@ -150,7 +150,7 @@ void QObjectPropertyModel::translatePropertyName()
tr("watermark");
tr("keepTopSpace");
tr("printable");
tr("AllLines");
tr("variable");
}
void QObjectPropertyModel::clearObjectsList()

View File

@ -122,6 +122,7 @@ void FlagsPropItem::translateFlagsItem()
tr("BottomLine");
tr("LeftLine");
tr("RightLine");
tr("AllLines");
}
FlagPropItem::FlagPropItem(QObject* object, ObjectsList* objects, const QString &propName, const QString &displayName, const QVariant &value, ObjectPropItem* parent, bool readonly)