Rename getSettings.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-06-18 11:49:25 +03:00
parent a312e763c0
commit b395465659
44 changed files with 171 additions and 171 deletions

View File

@ -499,7 +499,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 = getSettings()->GetLocale(); const QString checkedLocale = Settings()->GetLocale();
qDebug()<<"Checked locale:"<<checkedLocale; qDebug()<<"Checked locale:"<<checkedLocale;
QTranslator *qtTranslator = new QTranslator(this); QTranslator *qtTranslator = new QTranslator(this);
@ -641,7 +641,7 @@ const VTranslateVars *VApplication::TrVars()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VApplication::InitTrVars() void VApplication::InitTrVars()
{ {
trVars = new VTranslateVars(getSettings()); trVars = new VTranslateVars(Settings());
} }
#if defined(Q_OS_WIN) && defined(Q_CC_GNU) #if defined(Q_OS_WIN) && defined(Q_CC_GNU)

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->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -157,7 +157,7 @@ void ConfigDialog::Apply()
default: default:
break; break;
} }
qApp->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
emit UpdateProperties(); emit UpdateProperties();
setResult(QDialog::Accepted); setResult(QDialog::Accepted);
} }

View File

@ -58,17 +58,17 @@ CommunityPage::CommunityPage(QWidget *parent):
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void CommunityPage::Apply() void CommunityPage::Apply()
{ {
qApp->getSettings()->SetServer(this->server->text()); qApp->Settings()->SetServer(this->server->text());
qApp->getSettings()->SetServerSecure(this->secureComm->isChecked()); qApp->Settings()->SetServerSecure(this->secureComm->isChecked());
qApp->getSettings()->SetProxy(this->useProxy->isChecked()); qApp->Settings()->SetProxy(this->useProxy->isChecked());
qApp->getSettings()->SetProxyAddress(this->proxyAddress->text()); qApp->Settings()->SetProxyAddress(this->proxyAddress->text());
qApp->getSettings()->SetProxyPort(this->proxyPort->text()); qApp->Settings()->SetProxyPort(this->proxyPort->text());
qApp->getSettings()->SetProxyUser(this->proxyUser->text()); qApp->Settings()->SetProxyUser(this->proxyUser->text());
qApp->getSettings()->SetProxyPass(this->proxyPass->text()); qApp->Settings()->SetProxyPass(this->proxyPass->text());
qApp->getSettings()->SetUsername(this->username->text()); qApp->Settings()->SetUsername(this->username->text());
qApp->getSettings()->SetSavePassword(this->savePassword->isChecked()); qApp->Settings()->SetSavePassword(this->savePassword->isChecked());
qApp->getSettings()->SetUserPassword(this->userpassword->text()); qApp->Settings()->SetUserPassword(this->userpassword->text());
} }
@ -103,9 +103,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->getSettings()->GetServer(), tr("Server name/IP")); CommunityPage::add_lineedit(&this->server, serverLayout, qApp->Settings()->GetServer(), tr("Server name/IP"));
CommunityPage::add_checkbox(&this->secureComm, serverLayout, qApp->getSettings()->GetServerSecure(), CommunityPage::add_checkbox(&this->secureComm, serverLayout, qApp->Settings()->GetServerSecure(),
tr("Secure connection")); tr("Secure connection"));
ServerGroup->setLayout(serverLayout); ServerGroup->setLayout(serverLayout);
@ -137,12 +137,12 @@ QGroupBox *CommunityPage::ProxyGroup()
QFormLayout *proxyLayout = new QFormLayout; QFormLayout *proxyLayout = new QFormLayout;
CommunityPage::add_checkbox(&this->useProxy, proxyLayout, qApp->getSettings()->GetProxy(), tr("Use Proxy")); CommunityPage::add_checkbox(&this->useProxy, proxyLayout, qApp->Settings()->GetProxy(), tr("Use Proxy"));
CommunityPage::add_lineedit(&this->proxyAddress, proxyLayout, qApp->getSettings()->GetProxyAddress(), CommunityPage::add_lineedit(&this->proxyAddress, proxyLayout, qApp->Settings()->GetProxyAddress(),
tr("Proxy address")); tr("Proxy address"));
CommunityPage::add_lineedit(&this->proxyPort, proxyLayout, qApp->getSettings()->GetProxyPort(), tr("Proxy port")); CommunityPage::add_lineedit(&this->proxyPort, proxyLayout, qApp->Settings()->GetProxyPort(), tr("Proxy port"));
CommunityPage::add_lineedit(&this->proxyUser, proxyLayout, qApp->getSettings()->GetProxyUser(), tr("Proxy user")); CommunityPage::add_lineedit(&this->proxyUser, proxyLayout, qApp->Settings()->GetProxyUser(), tr("Proxy user"));
CommunityPage::add_lineedit(&this->proxyPass, proxyLayout, qApp->getSettings()->GetProxyPass(), tr("Proxy pass")); CommunityPage::add_lineedit(&this->proxyPass, proxyLayout, qApp->Settings()->GetProxyPass(), tr("Proxy pass"));
connect(this->useProxy, &QCheckBox::stateChanged, this, &CommunityPage::ProxyCheckChanged); connect(this->useProxy, &QCheckBox::stateChanged, this, &CommunityPage::ProxyCheckChanged);
this->ProxyCheckChanged(); this->ProxyCheckChanged();
@ -157,10 +157,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->getSettings()->GetUsername(), tr("User Name")); CommunityPage::add_lineedit(&this->username, userLayout, qApp->Settings()->GetUsername(), tr("User Name"));
CommunityPage::add_checkbox(&this->savePassword, userLayout, qApp->getSettings()->GetSavePassword(), CommunityPage::add_checkbox(&this->savePassword, userLayout, qApp->Settings()->GetSavePassword(),
tr("Save password")); tr("Save password"));
CommunityPage::add_lineedit(&this->userpassword, userLayout, qApp->getSettings()->GetUserPassword(), CommunityPage::add_lineedit(&this->userpassword, userLayout, qApp->Settings()->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->getSettings()->SetAutosaveState(autoSaveCheck->isChecked()); qApp->Settings()->SetAutosaveState(autoSaveCheck->isChecked());
qApp->getSettings()->SetAutosaveTime(autoTime->value()); qApp->Settings()->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->getSettings()->SetOsSeparator(osOptionCheck->isChecked()); qApp->Settings()->SetOsSeparator(osOptionCheck->isChecked());
qApp->getSettings()->SetSendReportState(sendReportCheck->isChecked()); qApp->Settings()->SetSendReportState(sendReportCheck->isChecked());
qApp->getSettings()->SetConfirmItemDelete(askPointDeletionCheck->isChecked()); qApp->Settings()->SetConfirmItemDelete(askPointDeletionCheck->isChecked());
qApp->getSettings()->SetToolBarStyle(toolBarStyleCheck->isChecked()); qApp->Settings()->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->getSettings()->SetLocale(locale); qApp->Settings()->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->getSettings()->SetUnit(unit); qApp->Settings()->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->getSettings()->SetLabelLanguage(locale); qApp->Settings()->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->getSettings()->GetAutosaveState()); autoSaveCheck->setChecked(qApp->Settings()->GetAutosaveState());
autoTime = new QSpinBox(); autoTime = new QSpinBox();
autoTime->setRange(1, 60); autoTime->setRange(1, 60);
autoTime->setValue(qApp->getSettings()->GetAutosaveTime()); autoTime->setValue(qApp->Settings()->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->getSettings()->GetLocale()); qint32 index = langCombo->findData(qApp->Settings()->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->getSettings()->GetOsSeparator()); osOptionCheck->setChecked(qApp->Settings()->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->getSettings()->GetUnit()); qint32 indexUnit = this->unitCombo->findData(qApp->Settings()->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->getSettings()->GetLabelLanguage()); index = labelCombo->findData(qApp->Settings()->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->getSettings()->GetSendReportState()); sendReportCheck->setChecked(qApp->Settings()->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->getSettings()->GetConfirmItemDelete()); askPointDeletionCheck->setChecked(qApp->Settings()->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->getSettings()->GetToolBarStyle()); toolBarStyleCheck->setChecked(qApp->Settings()->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->getSettings()->SetPathIndividualMeasurements(pathTable->item(0, 1)->text()); qApp->Settings()->SetPathIndividualMeasurements(pathTable->item(0, 1)->text());
qApp->getSettings()->SetPathStandardMeasurements(pathTable->item(1, 1)->text()); qApp->Settings()->SetPathStandardMeasurements(pathTable->item(1, 1)->text());
qApp->getSettings()->SetPathPattern(pathTable->item(2, 1)->text()); qApp->Settings()->SetPathPattern(pathTable->item(2, 1)->text());
qApp->getSettings()->SetPathLayout(pathTable->item(3, 1)->text()); qApp->Settings()->SetPathLayout(pathTable->item(3, 1)->text());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -113,16 +113,16 @@ void PathPage::EditPath()
switch (row) switch (row)
{ {
case 0: // individual measurements case 0: // individual measurements
path = qApp->getSettings()->GetPathIndividualMeasurements(); path = qApp->Settings()->GetPathIndividualMeasurements();
break; break;
case 1: // standard measurements case 1: // standard measurements
path = qApp->getSettings()->GetPathStandardMeasurements(); path = qApp->Settings()->GetPathStandardMeasurements();
break; break;
case 2: // pattern path case 2: // pattern path
path = qApp->getSettings()->GetPathPattern(); path = qApp->Settings()->GetPathPattern();
break; break;
case 3: // layout path case 3: // layout path
path = qApp->getSettings()->GetPathLayout(); path = qApp->Settings()->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->getSettings()->GetPathIndividualMeasurements()); QTableWidgetItem *item = new QTableWidgetItem(qApp->Settings()->GetPathIndividualMeasurements());
item->setToolTip(qApp->getSettings()->GetPathIndividualMeasurements()); item->setToolTip(qApp->Settings()->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->getSettings()->GetPathStandardMeasurements()); QTableWidgetItem *item = new QTableWidgetItem(qApp->Settings()->GetPathStandardMeasurements());
item->setToolTip(qApp->getSettings()->GetPathStandardMeasurements()); item->setToolTip(qApp->Settings()->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->getSettings()->GetPathPattern()); QTableWidgetItem *item = new QTableWidgetItem(qApp->Settings()->GetPathPattern());
item->setToolTip(qApp->getSettings()->GetPathPattern()); item->setToolTip(qApp->Settings()->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->getSettings()->GetPathLayout()); QTableWidgetItem *item = new QTableWidgetItem(qApp->Settings()->GetPathLayout());
item->setToolTip(qApp->getSettings()->GetPathLayout()); item->setToolTip(qApp->Settings()->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->getSettings()->SetUser(userName->text()); qApp->Settings()->SetUser(userName->text());
// Scene antialiasing // Scene antialiasing
qApp->getSettings()->SetGraphicalOutput(graphOutputCheck->isChecked()); qApp->Settings()->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->getSettings()->SetUndoCount(undoCount->value()); qApp->Settings()->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->getSettings()->GetUser()); userName->setText(qApp->Settings()->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->getSettings()->GetGraphicalOutput()); graphOutputCheck->setChecked(qApp->Settings()->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->getSettings()->GetUndoCount()); undoCount->setValue(qApp->Settings()->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->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->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

@ -50,7 +50,7 @@ DialogHistory::DialogHistory(VContainer *data, VPattern *doc, QWidget *parent)
{ {
ui->setupUi(this); ui->setupUi(this);
qApp->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
bOk = ui->buttonBox->button(QDialogButtonBox::Ok); bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
connect(bOk, &QPushButton::clicked, this, &DialogHistory::DialogAccepted); connect(bOk, &QPushButton::clicked, this, &DialogHistory::DialogAccepted);

View File

@ -56,7 +56,7 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par
{ {
ui->setupUi(this); ui->setupUi(this);
qApp->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
qCDebug(vDialog, "Showing variables."); qCDebug(vDialog, "Showing variables.");
if (qApp->patternType() == MeasurementsType::Individual) if (qApp->patternType() == MeasurementsType::Individual)
@ -613,7 +613,7 @@ void DialogIncrements::OpenTable()
const QString filter(tr("Individual measurements (*.vit)")); const QString filter(tr("Individual measurements (*.vit)"));
//Use standard path to individual measurements //Use standard path to individual measurements
const QString path = qApp->getSettings()->GetPathIndividualMeasurements(); const QString path = qApp->Settings()->GetPathIndividualMeasurements();
const QString filePath = QFileDialog::getOpenFileName(this, tr("Open file"), path, filter); const QString filePath = QFileDialog::getOpenFileName(this, tr("Open file"), path, filter);
if (filePath.isEmpty()) if (filePath.isEmpty())
@ -656,7 +656,7 @@ void DialogIncrements::OpenTable()
{ {
const QString filter(tr("Standard measurements (*.vst)")); const QString filter(tr("Standard measurements (*.vst)"));
//Use standard path to standard measurements //Use standard path to standard measurements
const QString path = qApp->getSettings()->GetPathStandardMeasurements(); const QString path = qApp->Settings()->GetPathStandardMeasurements();
const QString filePath = QFileDialog::getOpenFileName(this, tr("Open file"), path, filter); const QString filePath = QFileDialog::getOpenFileName(this, tr("Open file"), path, filter);
if (filePath.isEmpty()) if (filePath.isEmpty())
{ {

View File

@ -47,7 +47,7 @@ DialogIndividualMeasurements::DialogIndividualMeasurements(VContainer *data, con
{ {
ui->setupUi(this); ui->setupUi(this);
qApp->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->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());
@ -199,7 +199,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->getSettings()->GetPathIndividualMeasurements(); const QString path = qApp->Settings()->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())
@ -228,7 +228,7 @@ void DialogIndividualMeasurements::OpenTable()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogIndividualMeasurements::NewTable() void DialogIndividualMeasurements::NewTable()
{ {
const QString dir = qApp->getSettings()->GetPathIndividualMeasurements()+"/measurements.vit"; const QString dir = qApp->Settings()->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)"));
@ -256,7 +256,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->getSettings()->GetUnit()); const qint32 indexUnit = ui->comboBoxUnits->findData(qApp->Settings()->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->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->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->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
ReadSettings(); ReadSettings();
@ -359,8 +359,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->getSettings()->GetUnit()); oldPaperUnit = VDomDocument::StrToUnits(qApp->Settings()->GetUnit());
const qint32 indexUnit = ui->comboBoxPaperSizeUnit->findData(qApp->getSettings()->GetUnit()); const qint32 indexUnit = ui->comboBoxPaperSizeUnit->findData(qApp->Settings()->GetUnit());
if (indexUnit != -1) if (indexUnit != -1)
{ {
ui->comboBoxPaperSizeUnit->setCurrentIndex(indexUnit); ui->comboBoxPaperSizeUnit->setCurrentIndex(indexUnit);
@ -375,8 +375,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->getSettings()->GetUnit()); oldLayoutUnit = VDomDocument::StrToUnits(qApp->Settings()->GetUnit());
const qint32 indexUnit = ui->comboBoxLayoutUnit->findData(qApp->getSettings()->GetUnit()); const qint32 indexUnit = ui->comboBoxLayoutUnit->findData(qApp->Settings()->GetUnit());
if (indexUnit != -1) if (indexUnit != -1)
{ {
ui->comboBoxLayoutUnit->setCurrentIndex(indexUnit); ui->comboBoxLayoutUnit->setCurrentIndex(indexUnit);
@ -607,33 +607,33 @@ void DialogLayoutSettings::ReadSettings()
MinimumPaperSize(); MinimumPaperSize();
MinimumLayoutSize(); MinimumLayoutSize();
SetLayoutWidth(qApp->getSettings()->GetLayoutWidth()); SetLayoutWidth(qApp->Settings()->GetLayoutWidth());
SetShift(qApp->getSettings()->GetLayoutShift()); SetShift(qApp->Settings()->GetLayoutShift());
const qreal width = UnitConvertor(qApp->getSettings()->GetLayoutPaperWidth(), Unit::Px, LayoutUnit()); const qreal width = UnitConvertor(qApp->Settings()->GetLayoutPaperWidth(), Unit::Px, LayoutUnit());
const qreal height = UnitConvertor(qApp->getSettings()->GetLayoutPaperHeight(), Unit::Px, LayoutUnit()); const qreal height = UnitConvertor(qApp->Settings()->GetLayoutPaperHeight(), Unit::Px, LayoutUnit());
SheetSize(QSizeF(width, height)); SheetSize(QSizeF(width, height));
SetGroup(qApp->getSettings()->GetLayoutGroup()); SetGroup(qApp->Settings()->GetLayoutGroup());
SetRotate(qApp->getSettings()->GetLayoutRotate()); SetRotate(qApp->Settings()->GetLayoutRotate());
SetIncrease(qApp->getSettings()->GetLayoutRotationIncrease()); SetIncrease(qApp->Settings()->GetLayoutRotationIncrease());
SetAutoCrop(qApp->getSettings()->GetLayoutAutoCrop()); SetAutoCrop(qApp->Settings()->GetLayoutAutoCrop());
SetSaveLength(qApp->getSettings()->GetLayoutSaveLength()); SetSaveLength(qApp->Settings()->GetLayoutSaveLength());
SetUnitePages(qApp->getSettings()->GetLayoutUnitePages()); SetUnitePages(qApp->Settings()->GetLayoutUnitePages());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogLayoutSettings::WriteSettings() const void DialogLayoutSettings::WriteSettings() const
{ {
qApp->getSettings()->SetLayoutWidth(GetLayoutWidth()); qApp->Settings()->SetLayoutWidth(GetLayoutWidth());
qApp->getSettings()->SetLayoutGroup(GetGroup()); qApp->Settings()->SetLayoutGroup(GetGroup());
qApp->getSettings()->SetLayoutPaperHeight(GetPaperHeight()); qApp->Settings()->SetLayoutPaperHeight(GetPaperHeight());
qApp->getSettings()->SetLayoutPaperWidth(GetPaperWidth()); qApp->Settings()->SetLayoutPaperWidth(GetPaperWidth());
qApp->getSettings()->SetLayoutShift(GetShift()); qApp->Settings()->SetLayoutShift(GetShift());
qApp->getSettings()->SetLayoutRotate(GetRotate()); qApp->Settings()->SetLayoutRotate(GetRotate());
qApp->getSettings()->SetLayoutRotationIncrease(GetIncrease()); qApp->Settings()->SetLayoutRotationIncrease(GetIncrease());
qApp->getSettings()->SetLayoutAutoCrop(GetAutoCrop()); qApp->Settings()->SetLayoutAutoCrop(GetAutoCrop());
qApp->getSettings()->SetLayoutSaveLength(IsSaveLength()); qApp->Settings()->SetLayoutSaveLength(IsSaveLength());
qApp->getSettings()->SetLayoutUnitePages(IsUnitePages()); qApp->Settings()->SetLayoutUnitePages(IsUnitePages());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -36,7 +36,7 @@ DialogMeasurements::DialogMeasurements(QWidget *parent) :
{ {
ui->setupUi(this); ui->setupUi(this);
qApp->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->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->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->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->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->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->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->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->getSettings()->GetPathLayout()); ui->lineEditPath->setText(qApp->Settings()->GetPathLayout());
ShowExample();//Show example for current format. ShowExample();//Show example for current format.
} }

View File

@ -47,7 +47,7 @@ DialogStandardMeasurements::DialogStandardMeasurements(VContainer *data, const Q
{ {
ui->setupUi(this); ui->setupUi(this);
qApp->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->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());
@ -153,7 +153,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->getSettings()->GetPathStandardMeasurements(); const QString path = qApp->Settings()->GetPathStandardMeasurements();
QDir tablesDir(path); QDir tablesDir(path);
tablesDir.setNameFilters(filters); tablesDir.setNameFilters(filters);
tablesDir.setCurrent(path); tablesDir.setCurrent(path);

View File

@ -39,7 +39,7 @@ DialogUndo::DialogUndo(QWidget *parent)
{ {
ui->setupUi(this); ui->setupUi(this);
qApp->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
bool opening = qApp->getOpeningPattern(); bool opening = qApp->getOpeningPattern();
if (opening) if (opening)

View File

@ -306,7 +306,7 @@ QString DialogAlongLine::GetTypeLine() const
*/ */
QString DialogAlongLine::GetFormula() const QString DialogAlongLine::GetFormula() const
{ {
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -424,7 +424,7 @@ quint32 DialogArc::GetCenter() const
*/ */
QString DialogArc::GetRadius() const QString DialogArc::GetRadius() const
{ {
return qApp->TrVars()->FormulaFromUser(radius, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(radius, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -434,7 +434,7 @@ QString DialogArc::GetRadius() const
*/ */
QString DialogArc::GetF1() const QString DialogArc::GetF1() const
{ {
return qApp->TrVars()->FormulaFromUser(f1, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(f1, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -444,5 +444,5 @@ QString DialogArc::GetF1() const
*/ */
QString DialogArc::GetF2() const QString DialogArc::GetF2() const
{ {
return qApp->TrVars()->FormulaFromUser(f2, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(f2, qApp->Settings()->GetOsSeparator());
} }

View File

@ -109,7 +109,7 @@ void DialogArcWithLength::SetCenter(const quint32 &value)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QString DialogArcWithLength::GetRadius() const QString DialogArcWithLength::GetRadius() const
{ {
return qApp->TrVars()->FormulaFromUser(radius, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(radius, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -133,7 +133,7 @@ void DialogArcWithLength::SetRadius(const QString &value)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QString DialogArcWithLength::GetF1() const QString DialogArcWithLength::GetF1() const
{ {
return qApp->TrVars()->FormulaFromUser(f1, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(f1, qApp->Settings()->GetOsSeparator());
} }
void DialogArcWithLength::SetF1(const QString &value) void DialogArcWithLength::SetF1(const QString &value)
@ -156,7 +156,7 @@ void DialogArcWithLength::SetF1(const QString &value)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QString DialogArcWithLength::GetLength() const QString DialogArcWithLength::GetLength() const
{ {
return qApp->TrVars()->FormulaFromUser(length, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(length, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -342,7 +342,7 @@ QString DialogBisector::GetTypeLine() const
*/ */
QString DialogBisector::GetFormula() const QString DialogBisector::GetFormula() const
{ {
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -99,7 +99,7 @@ void DialogCurveIntersectAxis::SetTypeLine(const QString &value)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QString DialogCurveIntersectAxis::GetAngle() const QString DialogCurveIntersectAxis::GetAngle() const
{ {
return qApp->TrVars()->FormulaFromUser(formulaAngle, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(formulaAngle, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -216,7 +216,7 @@ void DialogCutArc::SetPointName(const QString &value)
*/ */
QString DialogCutArc::GetFormula() const QString DialogCutArc::GetFormula() const
{ {
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -210,7 +210,7 @@ void DialogCutSpline::ShowVisualization()
*/ */
QString DialogCutSpline::GetFormula() const QString DialogCutSpline::GetFormula() const
{ {
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -210,7 +210,7 @@ void DialogCutSplinePath::ShowVisualization()
*/ */
QString DialogCutSplinePath::GetFormula() const QString DialogCutSplinePath::GetFormula() const
{ {
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -385,7 +385,7 @@ void DialogEditWrongFormula::setPostfix(const QString &value)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QString DialogEditWrongFormula::GetFormula() const QString DialogEditWrongFormula::GetFormula() const
{ {
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -355,7 +355,7 @@ QString DialogEndLine::GetTypeLine() const
*/ */
QString DialogEndLine::GetFormula() const QString DialogEndLine::GetFormula() const
{ {
return qApp->TrVars()->FormulaFromUser(formulaLength, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(formulaLength, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -365,7 +365,7 @@ QString DialogEndLine::GetFormula() const
*/ */
QString DialogEndLine::GetAngle() const QString DialogEndLine::GetAngle() const
{ {
return qApp->TrVars()->FormulaFromUser(formulaAngle, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(formulaAngle, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -107,7 +107,7 @@ void DialogLineIntersectAxis::SetTypeLine(const QString &value)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QString DialogLineIntersectAxis::GetAngle() const QString DialogLineIntersectAxis::GetAngle() const
{ {
return qApp->TrVars()->FormulaFromUser(formulaAngle, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(formulaAngle, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -315,7 +315,7 @@ QString DialogNormal::GetTypeLine() const
*/ */
QString DialogNormal::GetFormula() const QString DialogNormal::GetFormula() const
{ {
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -112,7 +112,7 @@ void DialogPointFromCircleAndTangent::SetCircleCenterId(const quint32 &value)
QString DialogPointFromCircleAndTangent::GetCircleRadius() const QString DialogPointFromCircleAndTangent::GetCircleRadius() const
{ {
return qApp->TrVars()->FormulaFromUser(ui->plainTextEditRadius->toPlainText(), return qApp->TrVars()->FormulaFromUser(ui->plainTextEditRadius->toPlainText(),
qApp->getSettings()->GetOsSeparator()); qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -304,7 +304,7 @@ void DialogPointOfContact::SetPointName(const QString &value)
*/ */
QString DialogPointOfContact::getRadius() const QString DialogPointOfContact::getRadius() const
{ {
return qApp->TrVars()->FormulaFromUser(radius, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(radius, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -144,7 +144,7 @@ void DialogPointOfIntersectionCircles::SetSecondCircleCenterId(const quint32 &va
QString DialogPointOfIntersectionCircles::GetFirstCircleRadius() const QString DialogPointOfIntersectionCircles::GetFirstCircleRadius() const
{ {
return qApp->TrVars()->FormulaFromUser(ui->plainTextEditCircle1Radius->toPlainText(), return qApp->TrVars()->FormulaFromUser(ui->plainTextEditCircle1Radius->toPlainText(),
qApp->getSettings()->GetOsSeparator()); qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -169,7 +169,7 @@ void DialogPointOfIntersectionCircles::SetFirstCircleRadius(const QString &value
QString DialogPointOfIntersectionCircles::GetSecondCircleRadius() const QString DialogPointOfIntersectionCircles::GetSecondCircleRadius() const
{ {
return qApp->TrVars()->FormulaFromUser(ui->plainTextEditCircle2Radius->toPlainText(), return qApp->TrVars()->FormulaFromUser(ui->plainTextEditCircle2Radius->toPlainText(),
qApp->getSettings()->GetOsSeparator()); qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -341,7 +341,7 @@ QString DialogShoulderPoint::GetTypeLine() const
*/ */
QString DialogShoulderPoint::GetFormula() const QString DialogShoulderPoint::GetFormula() const
{ {
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -461,7 +461,7 @@ qreal DialogTool::Eval(const QString &text, bool &flag, QLabel *label, const QSt
QString formula = text; QString formula = text;
formula.replace("\n", " "); formula.replace("\n", " ");
// Translate to internal look. // Translate to internal look.
formula = qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator()); formula = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
Calculator *cal = new Calculator(data, qApp->patternType()); Calculator *cal = new Calculator(data, qApp->patternType());
result = cal->EvalFormula(formula); result = cal->EvalFormula(formula);
delete cal; delete cal;

View File

@ -257,7 +257,7 @@ protected:
SCASSERT(bCancel != nullptr); SCASSERT(bCancel != nullptr);
connect(bCancel, &QPushButton::clicked, this, &DialogTool::DialogRejected); connect(bCancel, &QPushButton::clicked, this, &DialogTool::DialogRejected);
qApp->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
} }
template <typename T> template <typename T>
/** /**

View File

@ -1480,7 +1480,7 @@ bool MainWindow::SaveAs()
QString dir; QString dir;
if (curFile.isEmpty()) if (curFile.isEmpty())
{ {
dir = qApp->getSettings()->GetPathPattern() + "/" + tr("pattern") + ".val"; dir = qApp->Settings()->GetPathPattern() + "/" + tr("pattern") + ".val";
} }
else else
{ {
@ -1513,9 +1513,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->getSettings()->GetRestoreFileList(); QStringList restoreFiles = qApp->Settings()->GetRestoreFileList();
restoreFiles.removeAll(oldFileName); restoreFiles.removeAll(oldFileName);
qApp->getSettings()->SetRestoreFileList(restoreFiles); qApp->Settings()->SetRestoreFileList(restoreFiles);
} }
return result; return result;
} }
@ -1564,7 +1564,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->getSettings()->GetRecentFileList(); const QStringList files = qApp->Settings()->GetRecentFileList();
QString dir; QString dir;
if (files.isEmpty()) if (files.isEmpty())
{ {
@ -1676,9 +1676,9 @@ void MainWindow::FileClosedCorrect()
WriteSettings(); WriteSettings();
//File was closed correct. //File was closed correct.
QStringList restoreFiles = qApp->getSettings()->GetRestoreFileList(); QStringList restoreFiles = qApp->Settings()->GetRestoreFileList();
restoreFiles.removeAll(curFile); restoreFiles.removeAll(curFile);
qApp->getSettings()->SetRestoreFileList(restoreFiles); qApp->Settings()->SetRestoreFileList(restoreFiles);
// Remove autosave file // Remove autosave file
QFile autofile(curFile +".autosave"); QFile autofile(curFile +".autosave");
@ -2309,7 +2309,7 @@ void MainWindow::setCurrentFile(const QString &fileName)
else else
{ {
qCDebug(vMainWindow, "Updating recent file list."); qCDebug(vMainWindow, "Updating recent file list.");
QStringList files = qApp->getSettings()->GetRecentFileList(); QStringList files = qApp->Settings()->GetRecentFileList();
files.removeAll(fileName); files.removeAll(fileName);
files.prepend(fileName); files.prepend(fileName);
while (files.size() > MaxRecentFiles) while (files.size() > MaxRecentFiles)
@ -2317,14 +2317,14 @@ void MainWindow::setCurrentFile(const QString &fileName)
files.removeLast(); files.removeLast();
} }
qApp->getSettings()->SetRecentFileList(files); qApp->Settings()->SetRecentFileList(files);
UpdateRecentFileActions(); UpdateRecentFileActions();
qCDebug(vMainWindow, "Updating restore file list."); qCDebug(vMainWindow, "Updating restore file list.");
QStringList restoreFiles = qApp->getSettings()->GetRestoreFileList(); QStringList restoreFiles = qApp->Settings()->GetRestoreFileList();
restoreFiles.removeAll(fileName); restoreFiles.removeAll(fileName);
restoreFiles.prepend(fileName); restoreFiles.prepend(fileName);
qApp->getSettings()->SetRestoreFileList(restoreFiles); qApp->Settings()->SetRestoreFileList(restoreFiles);
} }
shownName+="[*]"; shownName+="[*]";
setWindowTitle(shownName); setWindowTitle(shownName);
@ -2348,17 +2348,17 @@ QString MainWindow::strippedName(const QString &fullFileName)
void MainWindow::ReadSettings() void MainWindow::ReadSettings()
{ {
qCDebug(vMainWindow, "Reading settings."); qCDebug(vMainWindow, "Reading settings.");
restoreGeometry(qApp->getSettings()->GetGeometry()); restoreGeometry(qApp->Settings()->GetGeometry());
restoreState(qApp->getSettings()->GetWindowState()); restoreState(qApp->Settings()->GetWindowState());
restoreState(qApp->getSettings()->GetToolbarsState(), APP_VERSION); restoreState(qApp->Settings()->GetToolbarsState(), APP_VERSION);
// Scene antialiasing // Scene antialiasing
const bool graphOutputValue = qApp->getSettings()->GetGraphicalOutput(); const bool graphOutputValue = qApp->Settings()->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->getSettings()->GetUndoCount()); qApp->getUndoStack()->setUndoLimit(qApp->Settings()->GetUndoCount());
// Text under tool buton icon // Text under tool buton icon
ToolBarStyles(); ToolBarStyles();
@ -2372,9 +2372,9 @@ void MainWindow::WriteSettings()
{ {
ActionDraw(true); ActionDraw(true);
qApp->getSettings()->SetGeometry(saveGeometry()); qApp->Settings()->SetGeometry(saveGeometry());
qApp->getSettings()->SetWindowState(saveState()); qApp->Settings()->SetWindowState(saveState());
qApp->getSettings()->SetToolbarsState(saveState(APP_VERSION)); qApp->Settings()->SetToolbarsState(saveState(APP_VERSION));
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -2406,7 +2406,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->getSettings()->GetRecentFileList(); const QStringList files = qApp->Settings()->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)
@ -2685,9 +2685,9 @@ void MainWindow::InitAutoSave()
connect(autoSaveTimer, &QTimer::timeout, this, &MainWindow::AutoSavePattern); connect(autoSaveTimer, &QTimer::timeout, this, &MainWindow::AutoSavePattern);
autoSaveTimer->stop(); autoSaveTimer->stop();
if (qApp->getSettings()->GetAutosaveState()) if (qApp->Settings()->GetAutosaveState())
{ {
const qint32 autoTime = qApp->getSettings()->GetAutosaveTime(); const qint32 autoTime = qApp->Settings()->GetAutosaveTime();
autoSaveTimer->start(autoTime*60000); autoSaveTimer->start(autoTime*60000);
qCDebug(vMainWindow, "Autosaving each %d minutes.", autoTime); qCDebug(vMainWindow, "Autosaving each %d minutes.", autoTime);
} }
@ -2871,7 +2871,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->getSettings()->GetRestoreFileList(); QStringList files = qApp->Settings()->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)
@ -2893,7 +2893,7 @@ QStringList MainWindow::GetUnlokedRestoreFileList() const
files.removeAll(restoreFiles.at(i)); files.removeAll(restoreFiles.at(i));
} }
qApp->getSettings()->SetRestoreFileList(files); qApp->Settings()->SetRestoreFileList(files);
} }
return restoreFiles; return restoreFiles;
@ -2905,7 +2905,7 @@ QStringList MainWindow::GetUnlokedRestoreFileList() const
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void MainWindow::WindowsLocale() void MainWindow::WindowsLocale()
{ {
qApp->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C)); qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -2939,7 +2939,7 @@ void MainWindow::ShowPaper(int index)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void MainWindow::ToolBarStyle(QToolBar *bar) void MainWindow::ToolBarStyle(QToolBar *bar)
{ {
if (qApp->getSettings()->GetToolBarStyle()) if (qApp->Settings()->GetToolBarStyle())
{ {
bar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); bar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
} }
@ -3023,14 +3023,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->getSettings()->GetPathStandardMeasurements(); const QString path = qApp->Settings()->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->getSettings()->GetPathIndividualMeasurements(); const QString path = qApp->Settings()->GetPathIndividualMeasurements();
mPath = QFileDialog::getOpenFileName(this, tr("Open file"), path, filter); mPath = QFileDialog::getOpenFileName(this, tr("Open file"), path, filter);
} }

View File

@ -154,7 +154,7 @@ void MainWindowsNoGUI::ExportLayoutAs()
suf.replace(".", ""); suf.replace(".", "");
const QString path = dialog.Path(); const QString path = dialog.Path();
qApp->getSettings()->SetPathLayout(path); qApp->Settings()->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)
@ -719,7 +719,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->getSettings()->GetPathLayout()+"/"+FileName()+".pdf", qApp->Settings()->GetPathLayout()+"/"+FileName()+".pdf",
tr("PDF file (*.pdf)")); tr("PDF file (*.pdf)"));
if (not fileName.isEmpty()) if (not fileName.isEmpty())
{ {
@ -728,7 +728,7 @@ void MainWindowsNoGUI::SaveLayoutAs()
{ {
fileName.append(".pdf"); fileName.append(".pdf");
} }
qApp->getSettings()->SetPathLayout(f.absolutePath()); qApp->Settings()->SetPathLayout(f.absolutePath());
printer.setOutputFileName(fileName); printer.setOutputFileName(fileName);
printer.setResolution(static_cast<int>(PrintDPI)); printer.setResolution(static_cast<int>(PrintDPI));

View File

@ -149,7 +149,7 @@ void VAbstractTool::DeleteTool(bool ask)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
int VAbstractTool::ConfirmDeletion() int VAbstractTool::ConfirmDeletion()
{ {
if (false == qApp->getSettings()->GetConfirmItemDelete()) if (false == qApp->Settings()->GetConfirmItemDelete())
{ {
return QMessageBox::Yes; return QMessageBox::Yes;
} }
@ -165,7 +165,7 @@ int VAbstractTool::ConfirmDeletion()
if (dialogResult == QDialog::Accepted) if (dialogResult == QDialog::Accepted)
{ {
qApp->getSettings()->SetConfirmItemDelete(not msgBox.isChecked()); qApp->Settings()->SetConfirmItemDelete(not msgBox.isChecked());
} }
return dialogResult == QDialog::Accepted ? QMessageBox::Yes : QMessageBox::No; return dialogResult == QDialog::Accepted ? QMessageBox::Yes : QMessageBox::No;

View File

@ -145,7 +145,7 @@ qreal Visualization::FindVal(const QString &expression)
// Replace line return with spaces for calc if exist // Replace line return with spaces for calc if exist
QString formula = expression; QString formula = expression;
formula.replace("\n", " "); formula.replace("\n", " ");
formula = qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator()); formula = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
Calculator *cal = new Calculator(Visualization::data, qApp->patternType()); Calculator *cal = new Calculator(Visualization::data, qApp->patternType());
val = cal->EvalFormula(formula); val = cal->EvalFormula(formula);
delete cal; delete cal;

View File

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

View File

@ -54,7 +54,7 @@ void VAbstractApplication::OpenSettings()
* @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::getSettings() VSettings *VAbstractApplication::Settings()
{ {
SCASSERT(settings != nullptr); SCASSERT(settings != nullptr);
return settings; return settings;

View File

@ -53,7 +53,7 @@ public:
void setPatternType(const MeasurementsType &patternType); void setPatternType(const MeasurementsType &patternType);
void OpenSettings(); void OpenSettings();
VSettings *getSettings(); VSettings *Settings();
template <typename T> template <typename T>
QString LocaleToString(const T &value); QString LocaleToString(const T &value);
@ -85,7 +85,7 @@ template <typename T>
QString VAbstractApplication::LocaleToString(const T &value) QString VAbstractApplication::LocaleToString(const T &value)
{ {
QLocale loc; QLocale loc;
qApp->getSettings()->GetOsSeparator() ? loc = QLocale::system() : loc = QLocale(QLocale::C); qApp->Settings()->GetOsSeparator() ? loc = QLocale::system() : loc = QLocale(QLocale::C);
return loc.toString(value); return loc.toString(value);
} }

View File

@ -103,7 +103,7 @@ QString VFormula::GetFormula(FormulaType type) const
} }
else else
{ {
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator()); return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
} }
} }
@ -227,7 +227,7 @@ void VFormula::Eval()
try try
{ {
Calculator *cal = new Calculator(data, qApp->patternType()); Calculator *cal = new Calculator(data, qApp->patternType());
QString expression = qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator()); QString expression = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
const qreal result = cal->EvalFormula(expression); const qreal result = cal->EvalFormula(expression);
delete cal; delete cal;