Calling dialog for creation an expression.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-07-24 15:06:53 +03:00
parent ba7a46c4b3
commit 5fa0badfc1
29 changed files with 246 additions and 193 deletions

View File

@ -41,7 +41,7 @@ DialogAboutTape::DialogAboutTape(QWidget *parent)
{ {
ui->setupUi(this); ui->setupUi(this);
//qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); //mApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
ui->label_Tape_Version->setText(QString("Tape %1").arg(APP_VERSION_STR)); ui->label_Tape_Version->setText(QString("Tape %1").arg(APP_VERSION_STR));
ui->labelBuildRevision->setText(tr("Build revision: %1").arg(BUILD_REVISION)); ui->labelBuildRevision->setText(tr("Build revision: %1").arg(BUILD_REVISION));

View File

@ -38,11 +38,10 @@
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
MApplication::MApplication(int &argc, char **argv) MApplication::MApplication(int &argc, char **argv)
:QApplication(argc, argv), :VAbstractApplication(argc, argv),
mainWindows(), mainWindows(),
localServer(nullptr), localServer(nullptr),
trVars(nullptr), trVars(nullptr)
settings(nullptr)
{ {
setApplicationDisplayName(VER_PRODUCTNAME_STR); setApplicationDisplayName(VER_PRODUCTNAME_STR);
setApplicationName(VER_INTERNALNAME_STR); setApplicationName(VER_INTERNALNAME_STR);
@ -138,7 +137,7 @@ void MApplication::InitOptions()
qDebug()<<"Command-line arguments:"<<this->arguments(); qDebug()<<"Command-line arguments:"<<this->arguments();
qDebug()<<"Process ID:"<<this->applicationPid(); qDebug()<<"Process ID:"<<this->applicationPid();
const QString checkedLocale = Settings()->GetLocale(); const QString checkedLocale = TapeSettings()->GetLocale();
qDebug()<<"Checked locale:"<<checkedLocale; qDebug()<<"Checked locale:"<<checkedLocale;
QTranslator *qtTranslator = new QTranslator(this); QTranslator *qtTranslator = new QTranslator(this);
@ -183,7 +182,7 @@ const VTranslateVars *MApplication::TrVars()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void MApplication::InitTrVars() void MApplication::InitTrVars()
{ {
trVars = new VTranslateVars(Settings()->GetOsSeparator()); trVars = new VTranslateVars(TapeSettings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -194,10 +193,10 @@ void MApplication::OpenSettings()
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VTapeSettings *MApplication::Settings() VTapeSettings *MApplication::TapeSettings()
{ {
SCASSERT(settings != nullptr); SCASSERT(settings != nullptr);
return settings; return qobject_cast<VTapeSettings *>(settings);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -29,11 +29,10 @@
#ifndef MAPPLICATION_H #ifndef MAPPLICATION_H
#define MAPPLICATION_H #define MAPPLICATION_H
#include <QApplication>
#include "../vpatterndb/vtranslatevars.h" #include "../vpatterndb/vtranslatevars.h"
#include "../vmisc/def.h" #include "../vmisc/def.h"
#include "../vmisc/vtapesettings.h" #include "../vmisc/vtapesettings.h"
#include "../vmisc/vabstractapplication.h"
class MApplication;// use in define class MApplication;// use in define
class TMainWindow; class TMainWindow;
@ -42,9 +41,9 @@ class QLocalServer;
#if defined(qApp) #if defined(qApp)
#undef qApp #undef qApp
#endif #endif
#define qApp (static_cast<MApplication*>(QApplication::instance())) #define qApp (static_cast<MApplication*>(VAbstractApplication::instance()))
class MApplication : public QApplication class MApplication : public VAbstractApplication
{ {
Q_OBJECT Q_OBJECT
@ -65,14 +64,11 @@ public:
virtual const VTranslateVars *TrVars(); virtual const VTranslateVars *TrVars();
void InitTrVars(); void InitTrVars();
void OpenSettings(); virtual void OpenSettings() Q_DECL_OVERRIDE;
VTapeSettings *Settings(); VTapeSettings *TapeSettings();
QString translationsPath() const; QString translationsPath() const;
template <typename T>
QString LocaleToString(const T &value);
public slots: public slots:
TMainWindow *NewMainWindow(); TMainWindow *NewMainWindow();
@ -86,22 +82,7 @@ private:
QLocalServer *localServer; QLocalServer *localServer;
VTranslateVars *trVars; VTranslateVars *trVars;
/**
* @brief settings pointer to settings. Help hide constructor creation settings. Make make code more readable.
*/
VTapeSettings *settings;
void Clean(); void Clean();
}; };
//---------------------------------------------------------------------------------------------------------------------
template <typename T>
inline QString MApplication::LocaleToString(const T &value)
{
QLocale loc;
qApp->Settings()->GetOsSeparator() ? loc = QLocale::system() : loc = QLocale(QLocale::C);
return loc.toString(value);
}
#endif // MAPPLICATION_H #endif // MAPPLICATION_H

View File

@ -141,6 +141,19 @@ CONFIG(debug, debug|release){
# Path to recource file. # Path to recource file.
win32:RC_FILE = share/resources/tape.rc win32:RC_FILE = share/resources/tape.rc
# When the GNU linker sees a library, it discards all symbols that it doesn't need.
# Add dependent library the first.
#VTools static library (depend on VWidgets, VMisc, VPatternDB)
unix|win32: LIBS += -L$$OUT_PWD/../../libs/vtools/$${DESTDIR}/ -lvtools
INCLUDEPATH += $$PWD/../../libs/vtools
INCLUDEPATH += $$OUT_PWD/../../libs/vtools/$${UI_DIR} # For UI files
DEPENDPATH += $$PWD/../../libs/vtools
win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vtools/$${DESTDIR}/vtools.lib
else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vtools/$${DESTDIR}/libvtools.a
#VWidgets static library #VWidgets static library
unix|win32: LIBS += -L$$OUT_PWD/../../libs/vwidgets/$${DESTDIR}/ -lvwidgets unix|win32: LIBS += -L$$OUT_PWD/../../libs/vwidgets/$${DESTDIR}/ -lvwidgets
@ -212,6 +225,14 @@ else:unix: LIBS += -L$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -lqmuparser
INCLUDEPATH += $${PWD}/../../libs/qmuparser INCLUDEPATH += $${PWD}/../../libs/qmuparser
DEPENDPATH += $${PWD}/../../libs/qmuparser DEPENDPATH += $${PWD}/../../libs/qmuparser
# VPropertyExplorer library
win32:CONFIG(release, debug|release): LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer
else:win32:CONFIG(debug, debug|release): LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer
else:unix: LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer
INCLUDEPATH += $${PWD}/../../libs/vpropertyexplorer
DEPENDPATH += $${PWD}/../../libs/vpropertyexplorer
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
# do nothing # do nothing
} else { } else {

View File

@ -28,12 +28,13 @@
#include "tmainwindow.h" #include "tmainwindow.h"
#include "ui_tmainwindow.h" #include "ui_tmainwindow.h"
#include "mapplication.h"
#include "dialogs/dialogabouttape.h" #include "dialogs/dialogabouttape.h"
#include "dialogs/dialognewmeasurements.h" #include "dialogs/dialognewmeasurements.h"
#include "../vpatterndb/calculator.h" #include "../vpatterndb/calculator.h"
#include "../ifc/ifcdef.h" #include "../ifc/ifcdef.h"
#include "../qmuparser/qmudef.h" #include "../qmuparser/qmudef.h"
#include "../vtools/dialogs/support/dialogeditwrongformula.h"
#include "mapplication.h" // Should be last because of definning qApp
#include <QFileDialog> #include <QFileDialog>
#include <QFileInfo> #include <QFileInfo>
@ -196,11 +197,11 @@ void TMainWindow::FileSaveAs()
{ {
if (mType == MeasurementsType::Individual) if (mType == MeasurementsType::Individual)
{ {
dir = qApp->Settings()->GetPathStandardMeasurements() + "/" + fName; dir = qApp->TapeSettings()->GetPathStandardMeasurements() + "/" + fName;
} }
else else
{ {
dir = qApp->Settings()->GetPathIndividualMeasurements() + "/" + fName; dir = qApp->TapeSettings()->GetPathIndividualMeasurements() + "/" + fName;
} }
} }
@ -477,6 +478,45 @@ void TMainWindow::MoveDown()
Controls(); // Buttons remove, up, down Controls(); // Buttons remove, up, down
} }
//---------------------------------------------------------------------------------------------------------------------
void TMainWindow::Fx()
{
const int row = ui->tableWidget->currentRow();
if (row == -1)
{
return;
}
QTableWidgetItem *nameField = ui->tableWidget->item(row, 0);
QSharedPointer<VMeasurement> meash = data->GetVariable<VMeasurement>(nameField->text());
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(meash->GetData(), NULL_ID, this);
dialog->setWindowTitle(tr("Edit measurement"));
QString text = ui->plainTextEditFormula->toPlainText();
text.replace("\n", " ");
dialog->SetFormula(text);
const QString postfix = VDomDocument::UnitsToStr(mUnit, true);//Show unit in dialog lable (cm, mm or inch)
dialog->setPostfix(postfix);
if (dialog->exec() == QDialog::Accepted)
{
m->SetMValue(nameField->text(), dialog->GetFormula());
MeasurementsWasSaved(false);
RefreshData();
ui->tableWidget->selectRow(row);
ui->tableWidget->resizeColumnsToContents();
ui->tableWidget->resizeRowsToContents();
ui->tableWidget->horizontalHeader()->setStretchLastSection(true);
}
delete dialog;
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void TMainWindow::AddCustom() void TMainWindow::AddCustom()
{ {
@ -726,13 +766,13 @@ void TMainWindow::SaveMValue()
return; return;
} }
QTableWidgetItem *nameField = ui->tableWidget->item(ui->tableWidget->currentRow(), 0); QTableWidgetItem *nameField = ui->tableWidget->item(row, 0);
// Replace line return character with spaces for calc if exist // Replace line return character with spaces for calc if exist
QString text = ui->plainTextEditFormula->toPlainText(); QString text = ui->plainTextEditFormula->toPlainText();
text.replace("\n", " "); text.replace("\n", " ");
QTableWidgetItem *formulaField = ui->tableWidget->item(ui->tableWidget->currentRow(), 2); QTableWidgetItem *formulaField = ui->tableWidget->item(row, 2);
if (formulaField->text() == text) if (formulaField->text() == text)
{ {
return; return;
@ -1016,6 +1056,8 @@ void TMainWindow::InitWindow()
this->formulaBaseHeight = ui->plainTextEditFormula->height(); this->formulaBaseHeight = ui->plainTextEditFormula->height();
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &TMainWindow::SaveMValue, connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &TMainWindow::SaveMValue,
Qt::UniqueConnection); Qt::UniqueConnection);
connect(ui->toolButtonExpr, &QToolButton::clicked, this, &TMainWindow::Fx);
} }
ui->actionAddCustom->setEnabled(true); ui->actionAddCustom->setEnabled(true);

View File

@ -75,6 +75,7 @@ private slots:
void Remove(); void Remove();
void MoveUp(); void MoveUp();
void MoveDown(); void MoveDown();
void Fx();
void AddCustom(); void AddCustom();
void AddKnown(); void AddKnown();

View File

@ -484,7 +484,7 @@ void VApplication::InitOptions()
qDebug()<<"Command-line arguments:"<<this->arguments(); qDebug()<<"Command-line arguments:"<<this->arguments();
qDebug()<<"Process ID:"<<this->applicationPid(); qDebug()<<"Process ID:"<<this->applicationPid();
const QString checkedLocale = Settings()->GetLocale(); const QString checkedLocale = ValentinaSettings()->GetLocale();
qDebug()<<"Checked locale:"<<checkedLocale; qDebug()<<"Checked locale:"<<checkedLocale;
QTranslator *qtTranslator = new QTranslator(this); QTranslator *qtTranslator = new QTranslator(this);
@ -576,7 +576,26 @@ const VTranslateVars *VApplication::TrVars()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VApplication::InitTrVars() void VApplication::InitTrVars()
{ {
trVars = new VTranslateVars(Settings()->GetOsSeparator()); trVars = new VTranslateVars(ValentinaSettings()->GetOsSeparator());
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief OpenSettings get acsses to application settings.
*
* Because we can create object in constructor we open file separately.
*/
void VApplication::OpenSettings()
{
settings = new VSettings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(),
QApplication::applicationName(), this);
}
//---------------------------------------------------------------------------------------------------------------------
VSettings *VApplication::ValentinaSettings()
{
SCASSERT(settings != nullptr);
return qobject_cast<VSettings *>(settings);
} }
#if defined(Q_OS_WIN) && defined(Q_CC_GNU) #if defined(Q_OS_WIN) && defined(Q_CC_GNU)

View File

@ -84,6 +84,9 @@ public:
void CollectReports() const; void CollectReports() const;
#endif // defined(Q_OS_WIN) && defined(Q_CC_GNU) #endif // defined(Q_OS_WIN) && defined(Q_CC_GNU)
virtual void OpenSettings() Q_DECL_OVERRIDE;
VSettings *ValentinaSettings();
private slots: private slots:
#if defined(Q_OS_WIN) && defined(Q_CC_GNU) #if defined(Q_OS_WIN) && defined(Q_CC_GNU)
void CleanGist() const; void CleanGist() const;

View File

@ -93,7 +93,7 @@ ConfigDialog::ConfigDialog(QWidget *parent) :
setWindowTitle(tr("Config Dialog")); setWindowTitle(tr("Config Dialog"));
this->setFixedSize(QSize(750, 550)); this->setFixedSize(QSize(750, 550));
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -157,7 +157,7 @@ void ConfigDialog::Apply()
default: default:
break; break;
} }
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
emit UpdateProperties(); emit UpdateProperties();
setResult(QDialog::Accepted); setResult(QDialog::Accepted);
} }

View File

@ -57,17 +57,17 @@ CommunityPage::CommunityPage(QWidget *parent):
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void CommunityPage::Apply() void CommunityPage::Apply()
{ {
qApp->Settings()->SetServer(this->server->text()); qApp->ValentinaSettings()->SetServer(this->server->text());
qApp->Settings()->SetServerSecure(this->secureComm->isChecked()); qApp->ValentinaSettings()->SetServerSecure(this->secureComm->isChecked());
qApp->Settings()->SetProxy(this->useProxy->isChecked()); qApp->ValentinaSettings()->SetProxy(this->useProxy->isChecked());
qApp->Settings()->SetProxyAddress(this->proxyAddress->text()); qApp->ValentinaSettings()->SetProxyAddress(this->proxyAddress->text());
qApp->Settings()->SetProxyPort(this->proxyPort->text()); qApp->ValentinaSettings()->SetProxyPort(this->proxyPort->text());
qApp->Settings()->SetProxyUser(this->proxyUser->text()); qApp->ValentinaSettings()->SetProxyUser(this->proxyUser->text());
qApp->Settings()->SetProxyPass(this->proxyPass->text()); qApp->ValentinaSettings()->SetProxyPass(this->proxyPass->text());
qApp->Settings()->SetUsername(this->username->text()); qApp->ValentinaSettings()->SetUsername(this->username->text());
qApp->Settings()->SetSavePassword(this->savePassword->isChecked()); qApp->ValentinaSettings()->SetSavePassword(this->savePassword->isChecked());
qApp->Settings()->SetUserPassword(this->userpassword->text()); qApp->ValentinaSettings()->SetUserPassword(this->userpassword->text());
} }
@ -102,9 +102,9 @@ QGroupBox *CommunityPage::ServerGroup()
QGroupBox *ServerGroup = new QGroupBox(tr("Server")); QGroupBox *ServerGroup = new QGroupBox(tr("Server"));
QFormLayout *serverLayout = new QFormLayout; QFormLayout *serverLayout = new QFormLayout;
CommunityPage::add_lineedit(&this->server, serverLayout, qApp->Settings()->GetServer(), tr("Server name/IP")); CommunityPage::add_lineedit(&this->server, serverLayout, qApp->ValentinaSettings()->GetServer(), tr("Server name/IP"));
CommunityPage::add_checkbox(&this->secureComm, serverLayout, qApp->Settings()->GetServerSecure(), CommunityPage::add_checkbox(&this->secureComm, serverLayout, qApp->ValentinaSettings()->GetServerSecure(),
tr("Secure connection")); tr("Secure connection"));
ServerGroup->setLayout(serverLayout); ServerGroup->setLayout(serverLayout);
@ -136,12 +136,12 @@ QGroupBox *CommunityPage::ProxyGroup()
QFormLayout *proxyLayout = new QFormLayout; QFormLayout *proxyLayout = new QFormLayout;
CommunityPage::add_checkbox(&this->useProxy, proxyLayout, qApp->Settings()->GetProxy(), tr("Use Proxy")); CommunityPage::add_checkbox(&this->useProxy, proxyLayout, qApp->ValentinaSettings()->GetProxy(), tr("Use Proxy"));
CommunityPage::add_lineedit(&this->proxyAddress, proxyLayout, qApp->Settings()->GetProxyAddress(), CommunityPage::add_lineedit(&this->proxyAddress, proxyLayout, qApp->ValentinaSettings()->GetProxyAddress(),
tr("Proxy address")); tr("Proxy address"));
CommunityPage::add_lineedit(&this->proxyPort, proxyLayout, qApp->Settings()->GetProxyPort(), tr("Proxy port")); CommunityPage::add_lineedit(&this->proxyPort, proxyLayout, qApp->ValentinaSettings()->GetProxyPort(), tr("Proxy port"));
CommunityPage::add_lineedit(&this->proxyUser, proxyLayout, qApp->Settings()->GetProxyUser(), tr("Proxy user")); CommunityPage::add_lineedit(&this->proxyUser, proxyLayout, qApp->ValentinaSettings()->GetProxyUser(), tr("Proxy user"));
CommunityPage::add_lineedit(&this->proxyPass, proxyLayout, qApp->Settings()->GetProxyPass(), tr("Proxy pass")); CommunityPage::add_lineedit(&this->proxyPass, proxyLayout, qApp->ValentinaSettings()->GetProxyPass(), tr("Proxy pass"));
connect(this->useProxy, &QCheckBox::stateChanged, this, &CommunityPage::ProxyCheckChanged); connect(this->useProxy, &QCheckBox::stateChanged, this, &CommunityPage::ProxyCheckChanged);
this->ProxyCheckChanged(); this->ProxyCheckChanged();
@ -156,10 +156,10 @@ QGroupBox *CommunityPage::UserGroup()
QGroupBox *userGroup = new QGroupBox(tr("User settings")); QGroupBox *userGroup = new QGroupBox(tr("User settings"));
QFormLayout *userLayout = new QFormLayout; QFormLayout *userLayout = new QFormLayout;
CommunityPage::add_lineedit(&this->username, userLayout, qApp->Settings()->GetUsername(), tr("User Name")); CommunityPage::add_lineedit(&this->username, userLayout, qApp->ValentinaSettings()->GetUsername(), tr("User Name"));
CommunityPage::add_checkbox(&this->savePassword, userLayout, qApp->Settings()->GetSavePassword(), CommunityPage::add_checkbox(&this->savePassword, userLayout, qApp->ValentinaSettings()->GetSavePassword(),
tr("Save password")); tr("Save password"));
CommunityPage::add_lineedit(&this->userpassword, userLayout, qApp->Settings()->GetUserPassword(), CommunityPage::add_lineedit(&this->userpassword, userLayout, qApp->ValentinaSettings()->GetUserPassword(),
tr("Password")); tr("Password"));
connect(this->savePassword, &QCheckBox::stateChanged, this, &CommunityPage::PasswordCheckChanged); connect(this->savePassword, &QCheckBox::stateChanged, this, &CommunityPage::PasswordCheckChanged);

View File

@ -67,23 +67,23 @@ ConfigurationPage::ConfigurationPage(QWidget *parent)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void ConfigurationPage::Apply() void ConfigurationPage::Apply()
{ {
qApp->Settings()->SetAutosaveState(autoSaveCheck->isChecked()); qApp->ValentinaSettings()->SetAutosaveState(autoSaveCheck->isChecked());
qApp->Settings()->SetAutosaveTime(autoTime->value()); qApp->ValentinaSettings()->SetAutosaveTime(autoTime->value());
QTimer *autoSaveTimer = qApp->getAutoSaveTimer(); QTimer *autoSaveTimer = qApp->getAutoSaveTimer();
SCASSERT(autoSaveTimer); SCASSERT(autoSaveTimer);
autoSaveCheck->isChecked() ? autoSaveTimer->start(autoTime->value()*60000) : autoSaveTimer->stop(); autoSaveCheck->isChecked() ? autoSaveTimer->start(autoTime->value()*60000) : autoSaveTimer->stop();
qApp->Settings()->SetOsSeparator(osOptionCheck->isChecked()); qApp->ValentinaSettings()->SetOsSeparator(osOptionCheck->isChecked());
qApp->Settings()->SetSendReportState(sendReportCheck->isChecked()); qApp->ValentinaSettings()->SetSendReportState(sendReportCheck->isChecked());
qApp->Settings()->SetConfirmItemDelete(askPointDeletionCheck->isChecked()); qApp->ValentinaSettings()->SetConfirmItemDelete(askPointDeletionCheck->isChecked());
qApp->Settings()->SetToolBarStyle(toolBarStyleCheck->isChecked()); qApp->ValentinaSettings()->SetToolBarStyle(toolBarStyleCheck->isChecked());
if (langChanged) if (langChanged)
{ {
const QString locale = qvariant_cast<QString>(langCombo->itemData(langCombo->currentIndex())); const QString locale = qvariant_cast<QString>(langCombo->itemData(langCombo->currentIndex()));
qApp->Settings()->SetLocale(locale); qApp->ValentinaSettings()->SetLocale(locale);
langChanged = false; langChanged = false;
const QString text = tr("Setup user interface language updated and will be used the next time start") + " " + const QString text = tr("Setup user interface language updated and will be used the next time start") + " " +
QApplication::applicationName(); QApplication::applicationName();
@ -92,7 +92,7 @@ void ConfigurationPage::Apply()
if (this->unitChanged) if (this->unitChanged)
{ {
const QString unit = qvariant_cast<QString>(this->unitCombo->itemData(this->unitCombo->currentIndex())); const QString unit = qvariant_cast<QString>(this->unitCombo->itemData(this->unitCombo->currentIndex()));
qApp->Settings()->SetUnit(unit); qApp->ValentinaSettings()->SetUnit(unit);
this->unitChanged = false; this->unitChanged = false;
const QString text = tr("Default unit updated and will be used the next pattern creation"); const QString text = tr("Default unit updated and will be used the next pattern creation");
QMessageBox::information(this, QApplication::applicationName(), text); QMessageBox::information(this, QApplication::applicationName(), text);
@ -100,7 +100,7 @@ void ConfigurationPage::Apply()
if (labelLangChanged) if (labelLangChanged)
{ {
const QString locale = qvariant_cast<QString>(labelCombo->itemData(labelCombo->currentIndex())); const QString locale = qvariant_cast<QString>(labelCombo->itemData(labelCombo->currentIndex()));
qApp->Settings()->SetLabelLanguage(locale); qApp->ValentinaSettings()->SetLabelLanguage(locale);
labelLangChanged = false; labelLangChanged = false;
} }
} }
@ -129,11 +129,11 @@ QGroupBox *ConfigurationPage::SaveGroup()
QGroupBox *saveGroup = new QGroupBox(tr("Save")); QGroupBox *saveGroup = new QGroupBox(tr("Save"));
autoSaveCheck = new QCheckBox(tr("Auto-save modified pattern")); autoSaveCheck = new QCheckBox(tr("Auto-save modified pattern"));
autoSaveCheck->setChecked(qApp->Settings()->GetAutosaveState()); autoSaveCheck->setChecked(qApp->ValentinaSettings()->GetAutosaveState());
autoTime = new QSpinBox(); autoTime = new QSpinBox();
autoTime->setRange(1, 60); autoTime->setRange(1, 60);
autoTime->setValue(qApp->Settings()->GetAutosaveTime()); autoTime->setValue(qApp->ValentinaSettings()->GetAutosaveTime());
autoTime->setSuffix(tr("min")); autoTime->setSuffix(tr("min"));
QHBoxLayout *autosaveLayout = new QHBoxLayout; QHBoxLayout *autosaveLayout = new QHBoxLayout;
@ -181,7 +181,7 @@ QGroupBox *ConfigurationPage::LangGroup()
} }
// set default translators and language checked // set default translators and language checked
qint32 index = langCombo->findData(qApp->Settings()->GetLocale()); qint32 index = langCombo->findData(qApp->ValentinaSettings()->GetLocale());
if (index != -1) if (index != -1)
{ {
langCombo->setCurrentIndex(index); langCombo->setCurrentIndex(index);
@ -197,7 +197,7 @@ QGroupBox *ConfigurationPage::LangGroup()
QLabel *separatorLabel = new QLabel(tr("Decimal separator parts")); QLabel *separatorLabel = new QLabel(tr("Decimal separator parts"));
osOptionCheck = new QCheckBox(tr("With OS options (%1)").arg(QLocale::system().decimalPoint().toLatin1())); osOptionCheck = new QCheckBox(tr("With OS options (%1)").arg(QLocale::system().decimalPoint().toLatin1()));
osOptionCheck->setChecked(qApp->Settings()->GetOsSeparator()); osOptionCheck->setChecked(qApp->ValentinaSettings()->GetOsSeparator());
QHBoxLayout *separatorLayout = new QHBoxLayout; QHBoxLayout *separatorLayout = new QHBoxLayout;
separatorLayout->addWidget(separatorLabel); separatorLayout->addWidget(separatorLabel);
@ -212,7 +212,7 @@ QGroupBox *ConfigurationPage::LangGroup()
this->unitCombo->addItem(tr("Inches"), "in"); this->unitCombo->addItem(tr("Inches"), "in");
// set default unit // set default unit
qint32 indexUnit = this->unitCombo->findData(qApp->Settings()->GetUnit()); qint32 indexUnit = this->unitCombo->findData(qApp->ValentinaSettings()->GetUnit());
if (indexUnit != -1) if (indexUnit != -1)
{ {
this->unitCombo->setCurrentIndex(indexUnit); this->unitCombo->setCurrentIndex(indexUnit);
@ -231,7 +231,7 @@ QGroupBox *ConfigurationPage::LangGroup()
SetLabelComboBox(VApplication::LabelLanguages()); SetLabelComboBox(VApplication::LabelLanguages());
index = labelCombo->findData(qApp->Settings()->GetLabelLanguage()); index = labelCombo->findData(qApp->ValentinaSettings()->GetLabelLanguage());
if (index != -1) if (index != -1)
{ {
labelCombo->setCurrentIndex(index); labelCombo->setCurrentIndex(index);
@ -261,7 +261,7 @@ QGroupBox *ConfigurationPage::SendGroup()
QGroupBox *sendGroup = new QGroupBox(tr("Send crash reports")); QGroupBox *sendGroup = new QGroupBox(tr("Send crash reports"));
sendReportCheck = new QCheckBox(tr("Send crash reports (recommended)")); sendReportCheck = new QCheckBox(tr("Send crash reports (recommended)"));
sendReportCheck->setChecked(qApp->Settings()->GetSendReportState()); sendReportCheck->setChecked(qApp->ValentinaSettings()->GetSendReportState());
QLabel *description = new QLabel(tr("After each crash Valentina collect information that may help us fix a " QLabel *description = new QLabel(tr("After each crash Valentina collect information that may help us fix a "
"problem. We do not collect any personal information. Find more about what " "problem. We do not collect any personal information. Find more about what "
@ -286,7 +286,7 @@ QGroupBox *ConfigurationPage::DrawGroup()
QGroupBox *drawGroup = new QGroupBox(tr("Pattern Editing")); QGroupBox *drawGroup = new QGroupBox(tr("Pattern Editing"));
askPointDeletionCheck = new QCheckBox(tr("Confirm item deletion")); askPointDeletionCheck = new QCheckBox(tr("Confirm item deletion"));
askPointDeletionCheck->setChecked(qApp->Settings()->GetConfirmItemDelete()); askPointDeletionCheck->setChecked(qApp->ValentinaSettings()->GetConfirmItemDelete());
QVBoxLayout *editLayout = new QVBoxLayout; QVBoxLayout *editLayout = new QVBoxLayout;
editLayout->addWidget(askPointDeletionCheck); editLayout->addWidget(askPointDeletionCheck);
@ -301,7 +301,7 @@ QGroupBox *ConfigurationPage::ToolBarGroup()
QGroupBox *toolBarGroup = new QGroupBox(tr("Toolbar")); QGroupBox *toolBarGroup = new QGroupBox(tr("Toolbar"));
toolBarStyleCheck = new QCheckBox(tr("The text appears under the icon. (recommended for beginners.)")); toolBarStyleCheck = new QCheckBox(tr("The text appears under the icon. (recommended for beginners.)"));
toolBarStyleCheck->setChecked(qApp->Settings()->GetToolBarStyle()); toolBarStyleCheck->setChecked(qApp->ValentinaSettings()->GetToolBarStyle());
QVBoxLayout *editLayout = new QVBoxLayout; QVBoxLayout *editLayout = new QVBoxLayout;
editLayout->addWidget(toolBarStyleCheck); editLayout->addWidget(toolBarStyleCheck);

View File

@ -62,10 +62,10 @@ PathPage::PathPage(QWidget *parent)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void PathPage::Apply() void PathPage::Apply()
{ {
qApp->Settings()->SetPathIndividualMeasurements(pathTable->item(0, 1)->text()); qApp->ValentinaSettings()->SetPathIndividualMeasurements(pathTable->item(0, 1)->text());
qApp->Settings()->SetPathStandardMeasurements(pathTable->item(1, 1)->text()); qApp->ValentinaSettings()->SetPathStandardMeasurements(pathTable->item(1, 1)->text());
qApp->Settings()->SetPathPattern(pathTable->item(2, 1)->text()); qApp->ValentinaSettings()->SetPathPattern(pathTable->item(2, 1)->text());
qApp->Settings()->SetPathLayout(pathTable->item(3, 1)->text()); qApp->ValentinaSettings()->SetPathLayout(pathTable->item(3, 1)->text());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -88,8 +88,8 @@ void PathPage::DefaultPath()
switch (row) switch (row)
{ {
case 1: // standard measurements case 1: // standard measurements
item->setText(qApp->Settings()->StandardTablesPath()); item->setText(qApp->ValentinaSettings()->StandardTablesPath());
item->setToolTip(qApp->Settings()->StandardTablesPath()); item->setToolTip(qApp->ValentinaSettings()->StandardTablesPath());
break; break;
case 0: // individual measurements case 0: // individual measurements
case 2: // pattern path case 2: // pattern path
@ -113,16 +113,16 @@ void PathPage::EditPath()
switch (row) switch (row)
{ {
case 0: // individual measurements case 0: // individual measurements
path = qApp->Settings()->GetPathIndividualMeasurements(); path = qApp->ValentinaSettings()->GetPathIndividualMeasurements();
break; break;
case 1: // standard measurements case 1: // standard measurements
path = qApp->Settings()->GetPathStandardMeasurements(); path = qApp->ValentinaSettings()->GetPathStandardMeasurements();
break; break;
case 2: // pattern path case 2: // pattern path
path = qApp->Settings()->GetPathPattern(); path = qApp->ValentinaSettings()->GetPathPattern();
break; break;
case 3: // layout path case 3: // layout path
path = qApp->Settings()->GetPathLayout(); path = qApp->ValentinaSettings()->GetPathLayout();
break; break;
default: default:
break; break;
@ -182,29 +182,29 @@ void PathPage::InitTable()
{ {
pathTable->setItem(0, 0, new QTableWidgetItem(tr("Individual measurements"))); pathTable->setItem(0, 0, new QTableWidgetItem(tr("Individual measurements")));
QTableWidgetItem *item = new QTableWidgetItem(qApp->Settings()->GetPathIndividualMeasurements()); QTableWidgetItem *item = new QTableWidgetItem(qApp->ValentinaSettings()->GetPathIndividualMeasurements());
item->setToolTip(qApp->Settings()->GetPathIndividualMeasurements()); item->setToolTip(qApp->ValentinaSettings()->GetPathIndividualMeasurements());
pathTable->setItem(0, 1, item); pathTable->setItem(0, 1, item);
} }
{ {
pathTable->setItem(1, 0, new QTableWidgetItem(tr("Standard measurements"))); pathTable->setItem(1, 0, new QTableWidgetItem(tr("Standard measurements")));
QTableWidgetItem *item = new QTableWidgetItem(qApp->Settings()->GetPathStandardMeasurements()); QTableWidgetItem *item = new QTableWidgetItem(qApp->ValentinaSettings()->GetPathStandardMeasurements());
item->setToolTip(qApp->Settings()->GetPathStandardMeasurements()); item->setToolTip(qApp->ValentinaSettings()->GetPathStandardMeasurements());
pathTable->setItem(1, 1, item); pathTable->setItem(1, 1, item);
} }
{ {
pathTable->setItem(2, 0, new QTableWidgetItem(tr("Patterns"))); pathTable->setItem(2, 0, new QTableWidgetItem(tr("Patterns")));
QTableWidgetItem *item = new QTableWidgetItem(qApp->Settings()->GetPathPattern()); QTableWidgetItem *item = new QTableWidgetItem(qApp->ValentinaSettings()->GetPathPattern());
item->setToolTip(qApp->Settings()->GetPathPattern()); item->setToolTip(qApp->ValentinaSettings()->GetPathPattern());
pathTable->setItem(2, 1, item); pathTable->setItem(2, 1, item);
} }
{ {
pathTable->setItem(3, 0, new QTableWidgetItem(tr("Layout"))); pathTable->setItem(3, 0, new QTableWidgetItem(tr("Layout")));
QTableWidgetItem *item = new QTableWidgetItem(qApp->Settings()->GetPathLayout()); QTableWidgetItem *item = new QTableWidgetItem(qApp->ValentinaSettings()->GetPathLayout());
item->setToolTip(qApp->Settings()->GetPathLayout()); item->setToolTip(qApp->ValentinaSettings()->GetPathLayout());
pathTable->setItem(3, 1, item); pathTable->setItem(3, 1, item);
} }

View File

@ -58,17 +58,17 @@ PatternPage::PatternPage(QWidget *parent):
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void PatternPage::Apply() void PatternPage::Apply()
{ {
qApp->Settings()->SetUser(userName->text()); qApp->ValentinaSettings()->SetUser(userName->text());
// Scene antialiasing // Scene antialiasing
qApp->Settings()->SetGraphicalOutput(graphOutputCheck->isChecked()); qApp->ValentinaSettings()->SetGraphicalOutput(graphOutputCheck->isChecked());
qApp->getSceneView()->setRenderHint(QPainter::Antialiasing, graphOutputCheck->isChecked()); qApp->getSceneView()->setRenderHint(QPainter::Antialiasing, graphOutputCheck->isChecked());
qApp->getSceneView()->setRenderHint(QPainter::SmoothPixmapTransform, graphOutputCheck->isChecked()); qApp->getSceneView()->setRenderHint(QPainter::SmoothPixmapTransform, graphOutputCheck->isChecked());
/* Maximum number of commands in undo stack may only be set when the undo stack is empty, since setting it on a /* Maximum number of commands in undo stack may only be set when the undo stack is empty, since setting it on a
* non-empty stack might delete the command at the current index. Calling setUndoLimit() on a non-empty stack * non-empty stack might delete the command at the current index. Calling setUndoLimit() on a non-empty stack
* prints a warning and does nothing.*/ * prints a warning and does nothing.*/
qApp->Settings()->SetUndoCount(undoCount->value()); qApp->ValentinaSettings()->SetUndoCount(undoCount->value());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -78,7 +78,7 @@ QGroupBox *PatternPage::UserGroup()
QLabel *nameLabel = new QLabel(tr("User name")); QLabel *nameLabel = new QLabel(tr("User name"));
userName = new QLineEdit; userName = new QLineEdit;
userName->setText(qApp->Settings()->GetUser()); userName->setText(qApp->ValentinaSettings()->GetUser());
QHBoxLayout *nameLayout = new QHBoxLayout; QHBoxLayout *nameLayout = new QHBoxLayout;
nameLayout->addWidget(nameLabel); nameLayout->addWidget(nameLabel);
@ -96,7 +96,7 @@ QGroupBox *PatternPage::GraphOutputGroup()
QGroupBox *graphOutputGroup = new QGroupBox(tr("Graphical output")); QGroupBox *graphOutputGroup = new QGroupBox(tr("Graphical output"));
graphOutputCheck = new QCheckBox(tr("Use antialiasing")); graphOutputCheck = new QCheckBox(tr("Use antialiasing"));
graphOutputCheck->setChecked(qApp->Settings()->GetGraphicalOutput()); graphOutputCheck->setChecked(qApp->ValentinaSettings()->GetGraphicalOutput());
QHBoxLayout *graphLayout = new QHBoxLayout; QHBoxLayout *graphLayout = new QHBoxLayout;
graphLayout->addWidget(graphOutputCheck); graphLayout->addWidget(graphOutputCheck);
@ -114,7 +114,7 @@ QGroupBox *PatternPage::UndoGroup()
QLabel *undoLabel = new QLabel(tr("Count steps (0 - no limit)")); QLabel *undoLabel = new QLabel(tr("Count steps (0 - no limit)"));
undoCount = new QSpinBox; undoCount = new QSpinBox;
undoCount->setMinimum(0); undoCount->setMinimum(0);
undoCount->setValue(qApp->Settings()->GetUndoCount()); undoCount->setValue(qApp->ValentinaSettings()->GetUndoCount());
QHBoxLayout *countLayout = new QHBoxLayout; QHBoxLayout *countLayout = new QHBoxLayout;
countLayout->addWidget(undoLabel); countLayout->addWidget(undoLabel);

View File

@ -42,7 +42,7 @@ DialogAboutApp::DialogAboutApp(QWidget *parent) :
{ {
ui->setupUi(this); ui->setupUi(this);
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
ui->label_Valentina_Version->setText(QString("Valentina %1").arg(APP_VERSION_STR)); ui->label_Valentina_Version->setText(QString("Valentina %1").arg(APP_VERSION_STR));
ui->labelBuildRevision->setText(QString("Build revision: %1").arg(BUILD_REVISION)); ui->labelBuildRevision->setText(QString("Build revision: %1").arg(BUILD_REVISION));

View File

@ -47,7 +47,7 @@ DialogIndividualMeasurements::DialogIndividualMeasurements(VContainer *data, con
{ {
ui->setupUi(this); ui->setupUi(this);
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
QRect position = this->frameGeometry(); QRect position = this->frameGeometry();
position.moveCenter(QDesktopWidget().availableGeometry().center()); position.moveCenter(QDesktopWidget().availableGeometry().center());
@ -203,7 +203,7 @@ void DialogIndividualMeasurements::CheckState()
void DialogIndividualMeasurements::OpenTable() void DialogIndividualMeasurements::OpenTable()
{ {
const QString filter(tr("Individual measurements (*.vit)")); const QString filter(tr("Individual measurements (*.vit)"));
const QString path = qApp->Settings()->GetPathIndividualMeasurements(); const QString path = qApp->ValentinaSettings()->GetPathIndividualMeasurements();
QString fileName = QFileDialog::getOpenFileName(this, tr("Open file"), path, filter); QString fileName = QFileDialog::getOpenFileName(this, tr("Open file"), path, filter);
if (fileName.isEmpty()) if (fileName.isEmpty())
@ -232,7 +232,7 @@ void DialogIndividualMeasurements::OpenTable()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogIndividualMeasurements::NewTable() void DialogIndividualMeasurements::NewTable()
{ {
const QString dir = qApp->Settings()->GetPathIndividualMeasurements()+"/measurements.vit"; const QString dir = qApp->ValentinaSettings()->GetPathIndividualMeasurements()+"/measurements.vit";
QString name = QFileDialog::getSaveFileName(this, tr("Where save measurements?"), dir, QString name = QFileDialog::getSaveFileName(this, tr("Where save measurements?"), dir,
tr("Individual measurements (*.vit)")); tr("Individual measurements (*.vit)"));
@ -260,7 +260,7 @@ void DialogIndividualMeasurements::InitUnits()
ui->comboBoxUnits->addItem(tr("Inches"), QVariant(VDomDocument::UnitsToStr(Unit::Inch))); ui->comboBoxUnits->addItem(tr("Inches"), QVariant(VDomDocument::UnitsToStr(Unit::Inch)));
// set default unit // set default unit
const qint32 indexUnit = ui->comboBoxUnits->findData(qApp->Settings()->GetUnit()); const qint32 indexUnit = ui->comboBoxUnits->findData(qApp->ValentinaSettings()->GetUnit());
if (indexUnit != -1) if (indexUnit != -1)
{ {
ui->comboBoxUnits->setCurrentIndex(indexUnit); ui->comboBoxUnits->setCurrentIndex(indexUnit);

View File

@ -41,7 +41,7 @@ DialogLayoutProgress::DialogLayoutProgress(int count, QWidget *parent)
{ {
ui->setupUi(this); ui->setupUi(this);
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
ui->progressBar->setMaximum(maxCount); ui->progressBar->setMaximum(maxCount);
ui->progressBar->setValue(0); ui->progressBar->setValue(0);

View File

@ -52,7 +52,7 @@ DialogLayoutSettings::DialogLayoutSettings(VLayoutGenerator *generator, QWidget
{ {
ui->setupUi(this); ui->setupUi(this);
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
ReadSettings(); ReadSettings();
@ -363,8 +363,8 @@ void DialogLayoutSettings::InitPaperUnits()
ui->comboBoxPaperSizeUnit->addItem(tr("Pixels"), QVariant(VDomDocument::UnitsToStr(Unit::Px))); ui->comboBoxPaperSizeUnit->addItem(tr("Pixels"), QVariant(VDomDocument::UnitsToStr(Unit::Px)));
// set default unit // set default unit
oldPaperUnit = VDomDocument::StrToUnits(qApp->Settings()->GetUnit()); oldPaperUnit = VDomDocument::StrToUnits(qApp->ValentinaSettings()->GetUnit());
const qint32 indexUnit = ui->comboBoxPaperSizeUnit->findData(qApp->Settings()->GetUnit()); const qint32 indexUnit = ui->comboBoxPaperSizeUnit->findData(qApp->ValentinaSettings()->GetUnit());
if (indexUnit != -1) if (indexUnit != -1)
{ {
ui->comboBoxPaperSizeUnit->setCurrentIndex(indexUnit); ui->comboBoxPaperSizeUnit->setCurrentIndex(indexUnit);
@ -379,8 +379,8 @@ void DialogLayoutSettings::InitLayoutUnits()
ui->comboBoxLayoutUnit->addItem(tr("Inches"), QVariant(VDomDocument::UnitsToStr(Unit::Inch))); ui->comboBoxLayoutUnit->addItem(tr("Inches"), QVariant(VDomDocument::UnitsToStr(Unit::Inch)));
// set default unit // set default unit
oldLayoutUnit = VDomDocument::StrToUnits(qApp->Settings()->GetUnit()); oldLayoutUnit = VDomDocument::StrToUnits(qApp->ValentinaSettings()->GetUnit());
const qint32 indexUnit = ui->comboBoxLayoutUnit->findData(qApp->Settings()->GetUnit()); const qint32 indexUnit = ui->comboBoxLayoutUnit->findData(qApp->ValentinaSettings()->GetUnit());
if (indexUnit != -1) if (indexUnit != -1)
{ {
ui->comboBoxLayoutUnit->setCurrentIndex(indexUnit); ui->comboBoxLayoutUnit->setCurrentIndex(indexUnit);
@ -611,33 +611,33 @@ void DialogLayoutSettings::ReadSettings()
MinimumPaperSize(); MinimumPaperSize();
MinimumLayoutSize(); MinimumLayoutSize();
SetLayoutWidth(qApp->Settings()->GetLayoutWidth()); SetLayoutWidth(qApp->ValentinaSettings()->GetLayoutWidth());
SetShift(qApp->Settings()->GetLayoutShift()); SetShift(qApp->ValentinaSettings()->GetLayoutShift());
const qreal width = UnitConvertor(qApp->Settings()->GetLayoutPaperWidth(), Unit::Px, LayoutUnit()); const qreal width = UnitConvertor(qApp->ValentinaSettings()->GetLayoutPaperWidth(), Unit::Px, LayoutUnit());
const qreal height = UnitConvertor(qApp->Settings()->GetLayoutPaperHeight(), Unit::Px, LayoutUnit()); const qreal height = UnitConvertor(qApp->ValentinaSettings()->GetLayoutPaperHeight(), Unit::Px, LayoutUnit());
SheetSize(QSizeF(width, height)); SheetSize(QSizeF(width, height));
SetGroup(qApp->Settings()->GetLayoutGroup()); SetGroup(qApp->ValentinaSettings()->GetLayoutGroup());
SetRotate(qApp->Settings()->GetLayoutRotate()); SetRotate(qApp->ValentinaSettings()->GetLayoutRotate());
SetIncrease(qApp->Settings()->GetLayoutRotationIncrease()); SetIncrease(qApp->ValentinaSettings()->GetLayoutRotationIncrease());
SetAutoCrop(qApp->Settings()->GetLayoutAutoCrop()); SetAutoCrop(qApp->ValentinaSettings()->GetLayoutAutoCrop());
SetSaveLength(qApp->Settings()->GetLayoutSaveLength()); SetSaveLength(qApp->ValentinaSettings()->GetLayoutSaveLength());
SetUnitePages(qApp->Settings()->GetLayoutUnitePages()); SetUnitePages(qApp->ValentinaSettings()->GetLayoutUnitePages());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogLayoutSettings::WriteSettings() const void DialogLayoutSettings::WriteSettings() const
{ {
qApp->Settings()->SetLayoutWidth(GetLayoutWidth()); qApp->ValentinaSettings()->SetLayoutWidth(GetLayoutWidth());
qApp->Settings()->SetLayoutGroup(GetGroup()); qApp->ValentinaSettings()->SetLayoutGroup(GetGroup());
qApp->Settings()->SetLayoutPaperHeight(GetPaperHeight()); qApp->ValentinaSettings()->SetLayoutPaperHeight(GetPaperHeight());
qApp->Settings()->SetLayoutPaperWidth(GetPaperWidth()); qApp->ValentinaSettings()->SetLayoutPaperWidth(GetPaperWidth());
qApp->Settings()->SetLayoutShift(GetShift()); qApp->ValentinaSettings()->SetLayoutShift(GetShift());
qApp->Settings()->SetLayoutRotate(GetRotate()); qApp->ValentinaSettings()->SetLayoutRotate(GetRotate());
qApp->Settings()->SetLayoutRotationIncrease(GetIncrease()); qApp->ValentinaSettings()->SetLayoutRotationIncrease(GetIncrease());
qApp->Settings()->SetLayoutAutoCrop(GetAutoCrop()); qApp->ValentinaSettings()->SetLayoutAutoCrop(GetAutoCrop());
qApp->Settings()->SetLayoutSaveLength(IsSaveLength()); qApp->ValentinaSettings()->SetLayoutSaveLength(IsSaveLength());
qApp->Settings()->SetLayoutUnitePages(IsUnitePages()); qApp->ValentinaSettings()->SetLayoutUnitePages(IsUnitePages());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -36,7 +36,7 @@ DialogMeasurements::DialogMeasurements(QWidget *parent) :
{ {
ui->setupUi(this); ui->setupUi(this);
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
connect(ui->toolButtonStandard, &QToolButton::clicked, this, &DialogMeasurements::StandardMeasurements); connect(ui->toolButtonStandard, &QToolButton::clicked, this, &DialogMeasurements::StandardMeasurements);
connect(ui->toolButtonIndividual, &QToolButton::clicked, this, &DialogMeasurements::IndividualMeasurements); connect(ui->toolButtonIndividual, &QToolButton::clicked, this, &DialogMeasurements::IndividualMeasurements);

View File

@ -45,7 +45,7 @@ DialogPatternProperties::DialogPatternProperties(VPattern *doc, QWidget *parent)
SCASSERT(doc != nullptr); SCASSERT(doc != nullptr);
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
ui->lineEditAuthor->setText(doc->GetAuthor()); ui->lineEditAuthor->setText(doc->GetAuthor());
connect(ui->lineEditAuthor, &QLineEdit::editingFinished, this, &DialogPatternProperties::DescEdited); connect(ui->lineEditAuthor, &QLineEdit::editingFinished, this, &DialogPatternProperties::DescEdited);

View File

@ -46,7 +46,7 @@ DialogPatternXmlEdit::DialogPatternXmlEdit(QWidget *parent, VPattern *xmldoc)
{ {
ui->setupUi(this); ui->setupUi(this);
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
this->xmlmodel = new VXMLTreeView(); this->xmlmodel = new VXMLTreeView();
this->doc=xmldoc; this->doc=xmldoc;

View File

@ -43,7 +43,7 @@ DialogSaveLayout::DialogSaveLayout(const QMap<QString, QString> &formates, int c
{ {
ui->setupUi(this); ui->setupUi(this);
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok); QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
SCASSERT(bOk != nullptr); SCASSERT(bOk != nullptr);
@ -67,7 +67,7 @@ DialogSaveLayout::DialogSaveLayout(const QMap<QString, QString> &formates, int c
connect(ui->pushButtonBrowse, &QPushButton::clicked, this, &DialogSaveLayout::Browse); connect(ui->pushButtonBrowse, &QPushButton::clicked, this, &DialogSaveLayout::Browse);
connect(ui->lineEditPath, &QLineEdit::textChanged, this, &DialogSaveLayout::PathChanged); connect(ui->lineEditPath, &QLineEdit::textChanged, this, &DialogSaveLayout::PathChanged);
ui->lineEditPath->setText(qApp->Settings()->GetPathLayout()); ui->lineEditPath->setText(qApp->ValentinaSettings()->GetPathLayout());
ShowExample();//Show example for current format. ShowExample();//Show example for current format.
adjustSize(); adjustSize();

View File

@ -47,7 +47,7 @@ DialogStandardMeasurements::DialogStandardMeasurements(VContainer *data, const Q
{ {
ui->setupUi(this); ui->setupUi(this);
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
QRect position = this->frameGeometry(); QRect position = this->frameGeometry();
position.moveCenter(QDesktopWidget().availableGeometry().center()); position.moveCenter(QDesktopWidget().availableGeometry().center());
@ -157,7 +157,7 @@ void DialogStandardMeasurements::LoadStandardTables()
qCDebug(vStMeasur, "Loading standard table."); qCDebug(vStMeasur, "Loading standard table.");
QStringList filters{"*.vst"}; QStringList filters{"*.vst"};
//Use standard path to standard measurements //Use standard path to standard measurements
const QString path = qApp->Settings()->GetPathStandardMeasurements(); const QString path = qApp->ValentinaSettings()->GetPathStandardMeasurements();
QDir tablesDir(path); QDir tablesDir(path);
tablesDir.setNameFilters(filters); tablesDir.setNameFilters(filters);
tablesDir.setCurrent(path); tablesDir.setCurrent(path);

View File

@ -1539,7 +1539,7 @@ bool MainWindow::SaveAs()
QString dir; QString dir;
if (curFile.isEmpty()) if (curFile.isEmpty())
{ {
dir = qApp->Settings()->GetPathPattern() + "/" + tr("pattern") + ".val"; dir = qApp->ValentinaSettings()->GetPathPattern() + "/" + tr("pattern") + ".val";
} }
else else
{ {
@ -1572,9 +1572,9 @@ bool MainWindow::SaveAs()
if (oldFileName != curFile) if (oldFileName != curFile)
{// Now we have new file name after save as. {// Now we have new file name after save as.
// But still have previous name in restore list. We should delete them. // But still have previous name in restore list. We should delete them.
QStringList restoreFiles = qApp->Settings()->GetRestoreFileList(); QStringList restoreFiles = qApp->ValentinaSettings()->GetRestoreFileList();
restoreFiles.removeAll(oldFileName); restoreFiles.removeAll(oldFileName);
qApp->Settings()->SetRestoreFileList(restoreFiles); qApp->ValentinaSettings()->SetRestoreFileList(restoreFiles);
} }
return result; return result;
} }
@ -1623,7 +1623,7 @@ void MainWindow::Open()
qCDebug(vMainWindow, "Openning new file."); qCDebug(vMainWindow, "Openning new file.");
const QString filter(tr("Pattern files (*.val)")); const QString filter(tr("Pattern files (*.val)"));
//Get list last open files //Get list last open files
const QStringList files = qApp->Settings()->GetRecentFileList(); const QStringList files = qApp->ValentinaSettings()->GetRecentFileList();
QString dir; QString dir;
if (files.isEmpty()) if (files.isEmpty())
{ {
@ -1735,9 +1735,9 @@ void MainWindow::FileClosedCorrect()
WriteSettings(); WriteSettings();
//File was closed correct. //File was closed correct.
QStringList restoreFiles = qApp->Settings()->GetRestoreFileList(); QStringList restoreFiles = qApp->ValentinaSettings()->GetRestoreFileList();
restoreFiles.removeAll(curFile); restoreFiles.removeAll(curFile);
qApp->Settings()->SetRestoreFileList(restoreFiles); qApp->ValentinaSettings()->SetRestoreFileList(restoreFiles);
// Remove autosave file // Remove autosave file
QFile autofile(curFile +".autosave"); QFile autofile(curFile +".autosave");
@ -2359,7 +2359,7 @@ void MainWindow::setCurrentFile(const QString &fileName)
else else
{ {
qCDebug(vMainWindow, "Updating recent file list."); qCDebug(vMainWindow, "Updating recent file list.");
QStringList files = qApp->Settings()->GetRecentFileList(); QStringList files = qApp->ValentinaSettings()->GetRecentFileList();
files.removeAll(fileName); files.removeAll(fileName);
files.prepend(fileName); files.prepend(fileName);
while (files.size() > MaxRecentFiles) while (files.size() > MaxRecentFiles)
@ -2367,14 +2367,14 @@ void MainWindow::setCurrentFile(const QString &fileName)
files.removeLast(); files.removeLast();
} }
qApp->Settings()->SetRecentFileList(files); qApp->ValentinaSettings()->SetRecentFileList(files);
UpdateRecentFileActions(); UpdateRecentFileActions();
qCDebug(vMainWindow, "Updating restore file list."); qCDebug(vMainWindow, "Updating restore file list.");
QStringList restoreFiles = qApp->Settings()->GetRestoreFileList(); QStringList restoreFiles = qApp->ValentinaSettings()->GetRestoreFileList();
restoreFiles.removeAll(fileName); restoreFiles.removeAll(fileName);
restoreFiles.prepend(fileName); restoreFiles.prepend(fileName);
qApp->Settings()->SetRestoreFileList(restoreFiles); qApp->ValentinaSettings()->SetRestoreFileList(restoreFiles);
} }
shownName+="[*]"; shownName+="[*]";
setWindowTitle(shownName); setWindowTitle(shownName);
@ -2398,17 +2398,17 @@ QString MainWindow::strippedName(const QString &fullFileName)
void MainWindow::ReadSettings() void MainWindow::ReadSettings()
{ {
qCDebug(vMainWindow, "Reading settings."); qCDebug(vMainWindow, "Reading settings.");
restoreGeometry(qApp->Settings()->GetGeometry()); restoreGeometry(qApp->ValentinaSettings()->GetGeometry());
restoreState(qApp->Settings()->GetWindowState()); restoreState(qApp->ValentinaSettings()->GetWindowState());
restoreState(qApp->Settings()->GetToolbarsState(), APP_VERSION); restoreState(qApp->ValentinaSettings()->GetToolbarsState(), APP_VERSION);
// Scene antialiasing // Scene antialiasing
const bool graphOutputValue = qApp->Settings()->GetGraphicalOutput(); const bool graphOutputValue = qApp->ValentinaSettings()->GetGraphicalOutput();
ui->view->setRenderHint(QPainter::Antialiasing, graphOutputValue); ui->view->setRenderHint(QPainter::Antialiasing, graphOutputValue);
ui->view->setRenderHint(QPainter::SmoothPixmapTransform, graphOutputValue); ui->view->setRenderHint(QPainter::SmoothPixmapTransform, graphOutputValue);
// Stack limit // Stack limit
qApp->getUndoStack()->setUndoLimit(qApp->Settings()->GetUndoCount()); qApp->getUndoStack()->setUndoLimit(qApp->ValentinaSettings()->GetUndoCount());
// Text under tool buton icon // Text under tool buton icon
ToolBarStyles(); ToolBarStyles();
@ -2422,9 +2422,9 @@ void MainWindow::WriteSettings()
{ {
ActionDraw(true); ActionDraw(true);
qApp->Settings()->SetGeometry(saveGeometry()); qApp->ValentinaSettings()->SetGeometry(saveGeometry());
qApp->Settings()->SetWindowState(saveState()); qApp->ValentinaSettings()->SetWindowState(saveState());
qApp->Settings()->SetToolbarsState(saveState(APP_VERSION)); qApp->ValentinaSettings()->SetToolbarsState(saveState(APP_VERSION));
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -2456,7 +2456,7 @@ bool MainWindow::MaybeSave()
void MainWindow::UpdateRecentFileActions() void MainWindow::UpdateRecentFileActions()
{ {
qCDebug(vMainWindow, "Updating recent file actions."); qCDebug(vMainWindow, "Updating recent file actions.");
const QStringList files = qApp->Settings()->GetRecentFileList(); const QStringList files = qApp->ValentinaSettings()->GetRecentFileList();
const int numRecentFiles = qMin(files.size(), static_cast<int>(MaxRecentFiles)); const int numRecentFiles = qMin(files.size(), static_cast<int>(MaxRecentFiles));
for (int i = 0; i < numRecentFiles; ++i) for (int i = 0; i < numRecentFiles; ++i)
@ -2739,9 +2739,9 @@ void MainWindow::InitAutoSave()
connect(autoSaveTimer, &QTimer::timeout, this, &MainWindow::AutoSavePattern); connect(autoSaveTimer, &QTimer::timeout, this, &MainWindow::AutoSavePattern);
autoSaveTimer->stop(); autoSaveTimer->stop();
if (qApp->Settings()->GetAutosaveState()) if (qApp->ValentinaSettings()->GetAutosaveState())
{ {
const qint32 autoTime = qApp->Settings()->GetAutosaveTime(); const qint32 autoTime = qApp->ValentinaSettings()->GetAutosaveTime();
autoSaveTimer->start(autoTime*60000); autoSaveTimer->start(autoTime*60000);
qCDebug(vMainWindow, "Autosaving each %d minutes.", autoTime); qCDebug(vMainWindow, "Autosaving each %d minutes.", autoTime);
} }
@ -2925,7 +2925,7 @@ QStringList MainWindow::GetUnlokedRestoreFileList() const
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) #if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
QStringList restoreFiles; QStringList restoreFiles;
//Take all files that need to be restored //Take all files that need to be restored
QStringList files = qApp->Settings()->GetRestoreFileList(); QStringList files = qApp->ValentinaSettings()->GetRestoreFileList();
if (files.size() > 0) if (files.size() > 0)
{ {
for (int i = 0; i < files.size(); ++i) for (int i = 0; i < files.size(); ++i)
@ -2947,7 +2947,7 @@ QStringList MainWindow::GetUnlokedRestoreFileList() const
files.removeAll(restoreFiles.at(i)); files.removeAll(restoreFiles.at(i));
} }
qApp->Settings()->SetRestoreFileList(files); qApp->ValentinaSettings()->SetRestoreFileList(files);
} }
return restoreFiles; return restoreFiles;
@ -2959,7 +2959,7 @@ QStringList MainWindow::GetUnlokedRestoreFileList() const
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void MainWindow::WindowsLocale() void MainWindow::WindowsLocale()
{ {
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -2993,7 +2993,7 @@ void MainWindow::ShowPaper(int index)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void MainWindow::ToolBarStyle(QToolBar *bar) void MainWindow::ToolBarStyle(QToolBar *bar)
{ {
if (qApp->Settings()->GetToolBarStyle()) if (qApp->ValentinaSettings()->GetToolBarStyle())
{ {
bar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); bar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
} }
@ -3077,14 +3077,14 @@ QString MainWindow::CheckPathToMeasurements(const QString &path, const Measureme
{ {
filter = tr("Standard measurements (*.vst)"); filter = tr("Standard measurements (*.vst)");
//Use standard path to standard measurements //Use standard path to standard measurements
const QString path = qApp->Settings()->GetPathStandardMeasurements(); const QString path = qApp->ValentinaSettings()->GetPathStandardMeasurements();
mPath = QFileDialog::getOpenFileName(this, tr("Open file"), path, filter); mPath = QFileDialog::getOpenFileName(this, tr("Open file"), path, filter);
} }
else else
{ {
filter = tr("Individual measurements (*.vit)"); filter = tr("Individual measurements (*.vit)");
//Use standard path to individual measurements //Use standard path to individual measurements
const QString path = qApp->Settings()->GetPathIndividualMeasurements(); const QString path = qApp->ValentinaSettings()->GetPathIndividualMeasurements();
mPath = QFileDialog::getOpenFileName(this, tr("Open file"), path, filter); mPath = QFileDialog::getOpenFileName(this, tr("Open file"), path, filter);
} }

View File

@ -153,7 +153,7 @@ void MainWindowsNoGUI::ExportLayoutAs()
suf.replace(".", ""); suf.replace(".", "");
const QString path = dialog.Path(); const QString path = dialog.Path();
qApp->Settings()->SetPathLayout(path); qApp->ValentinaSettings()->SetPathLayout(path);
const QString mask = dialog.FileName(); const QString mask = dialog.FileName();
for (int i=0; i < scenes.size(); ++i) for (int i=0; i < scenes.size(); ++i)
@ -718,7 +718,7 @@ void MainWindowsNoGUI::SaveLayoutAs()
printer.setOutputFormat(QPrinter::PdfFormat); printer.setOutputFormat(QPrinter::PdfFormat);
QString fileName = QFileDialog::getSaveFileName(this, tr("Print to pdf"), QString fileName = QFileDialog::getSaveFileName(this, tr("Print to pdf"),
qApp->Settings()->GetPathLayout()+"/"+FileName()+".pdf", qApp->ValentinaSettings()->GetPathLayout()+"/"+FileName()+".pdf",
tr("PDF file (*.pdf)")); tr("PDF file (*.pdf)"));
if (not fileName.isEmpty()) if (not fileName.isEmpty())
{ {
@ -727,7 +727,7 @@ void MainWindowsNoGUI::SaveLayoutAs()
{ {
fileName.append(".pdf"); fileName.append(".pdf");
} }
qApp->Settings()->SetPathLayout(f.absolutePath()); qApp->ValentinaSettings()->SetPathLayout(f.absolutePath());
printer.setOutputFileName(fileName); printer.setOutputFileName(fileName);
printer.setResolution(static_cast<int>(PrintDPI)); printer.setResolution(static_cast<int>(PrintDPI));

View File

@ -812,7 +812,7 @@ QString VPattern::GetLabelBase(unsigned int index) const
{ {
QStringList list = VApplication::LabelLanguages(); QStringList list = VApplication::LabelLanguages();
QStringList alphabet; QStringList alphabet;
switch (list.indexOf(qApp->Settings()->GetLabelLanguage())) switch (list.indexOf(qApp->ValentinaSettings()->GetLabelLanguage()))
{ {
case 0: // de case 0: // de
{ {
@ -2175,7 +2175,7 @@ void VPattern::ParseIncrementsElement(const QDomNode &node)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QString VPattern::GetAuthor() const QString VPattern::GetAuthor() const
{ {
return UniqueTagText(TagAuthor, qApp->Settings()->GetUser()); return UniqueTagText(TagAuthor, qApp->ValentinaSettings()->GetUser());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -65,30 +65,17 @@ void VAbstractApplication::setPatternUnit(const Unit &patternUnit)
_patternUnit = patternUnit; _patternUnit = patternUnit;
} }
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief OpenSettings get acsses to application settings.
*
* Because we can create object in constructor we open file separately.
*/
void VAbstractApplication::OpenSettings()
{
settings = new VSettings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(),
QApplication::applicationName(), this);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* @brief getSettings hide settings constructor. * @brief getSettings hide settings constructor.
* @return pointer to class for acssesing to settings in ini file. * @return pointer to class for acssesing to settings in ini file.
*/ */
VSettings *VAbstractApplication::Settings() VCommonSettings *VAbstractApplication::Settings()
{ {
SCASSERT(settings != nullptr); SCASSERT(settings != nullptr);
return settings; return settings;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QGraphicsScene *VAbstractApplication::getCurrentScene() const QGraphicsScene *VAbstractApplication::getCurrentScene() const
{ {

View File

@ -60,8 +60,8 @@ public:
MeasurementsType patternType() const; MeasurementsType patternType() const;
void setPatternType(const MeasurementsType &patternType); void setPatternType(const MeasurementsType &patternType);
void OpenSettings(); virtual void OpenSettings()=0;
VSettings *Settings(); VCommonSettings *Settings();
template <typename T> template <typename T>
QString LocaleToString(const T &value); QString LocaleToString(const T &value);
@ -98,7 +98,7 @@ protected:
/** /**
* @brief settings pointer to settings. Help hide constructor creation settings. Make make code more readable. * @brief settings pointer to settings. Help hide constructor creation settings. Make make code more readable.
*/ */
VSettings *settings; VCommonSettings *settings;
private: private:
Q_DISABLE_COPY(VAbstractApplication) Q_DISABLE_COPY(VAbstractApplication)

View File

@ -225,8 +225,8 @@ void Calculator::InitCharacterSets()
<< "ЭųįҶرҲеԷňعθҺнԿفπÂхՇψÊэšՏÒUəÚѝŻşҤӑâeէŐımկòuշÕúտŔ"; << "ЭųįҶرҲеԷňعθҺнԿفπÂхՇψÊэšՏÒUəÚѝŻşҤӑâeէŐımկòuշÕúտŔ";
// Defining identifier character sets // Defining identifier character sets
DefineNameChars(QStringLiteral("0123456789_") + symbols.join("")); DefineNameChars(QStringLiteral("0123456789_@#") + symbols.join(""));
DefineOprtChars(symbols.join("") + QStringLiteral("+-*^/?<>=#!$%&|~_")); DefineOprtChars(symbols.join("") + QStringLiteral("+-*^/?<>=!$%&|~_"));
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -3,7 +3,7 @@
<class>DialogEditWrongFormula</class> <class>DialogEditWrongFormula</class>
<widget class="QDialog" name="DialogEditWrongFormula"> <widget class="QDialog" name="DialogEditWrongFormula">
<property name="windowModality"> <property name="windowModality">
<enum>Qt::ApplicationModal</enum> <enum>Qt::WindowModal</enum>
</property> </property>
<property name="geometry"> <property name="geometry">
<rect> <rect>