Rename getSettings.
--HG-- branch : feature
This commit is contained in:
parent
a312e763c0
commit
b395465659
|
@ -499,7 +499,7 @@ void VApplication::InitOptions()
|
|||
qDebug()<<"Command-line arguments:"<<this->arguments();
|
||||
qDebug()<<"Process ID:"<<this->applicationPid();
|
||||
|
||||
const QString checkedLocale = getSettings()->GetLocale();
|
||||
const QString checkedLocale = Settings()->GetLocale();
|
||||
qDebug()<<"Checked locale:"<<checkedLocale;
|
||||
|
||||
QTranslator *qtTranslator = new QTranslator(this);
|
||||
|
@ -641,7 +641,7 @@ const VTranslateVars *VApplication::TrVars()
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VApplication::InitTrVars()
|
||||
{
|
||||
trVars = new VTranslateVars(getSettings());
|
||||
trVars = new VTranslateVars(Settings());
|
||||
}
|
||||
|
||||
#if defined(Q_OS_WIN) && defined(Q_CC_GNU)
|
||||
|
|
|
@ -93,7 +93,7 @@ ConfigDialog::ConfigDialog(QWidget *parent) :
|
|||
setWindowTitle(tr("Config Dialog"));
|
||||
|
||||
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:
|
||||
break;
|
||||
}
|
||||
qApp->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
emit UpdateProperties();
|
||||
setResult(QDialog::Accepted);
|
||||
}
|
||||
|
|
|
@ -58,17 +58,17 @@ CommunityPage::CommunityPage(QWidget *parent):
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void CommunityPage::Apply()
|
||||
{
|
||||
qApp->getSettings()->SetServer(this->server->text());
|
||||
qApp->getSettings()->SetServerSecure(this->secureComm->isChecked());
|
||||
qApp->getSettings()->SetProxy(this->useProxy->isChecked());
|
||||
qApp->getSettings()->SetProxyAddress(this->proxyAddress->text());
|
||||
qApp->getSettings()->SetProxyPort(this->proxyPort->text());
|
||||
qApp->getSettings()->SetProxyUser(this->proxyUser->text());
|
||||
qApp->getSettings()->SetProxyPass(this->proxyPass->text());
|
||||
qApp->Settings()->SetServer(this->server->text());
|
||||
qApp->Settings()->SetServerSecure(this->secureComm->isChecked());
|
||||
qApp->Settings()->SetProxy(this->useProxy->isChecked());
|
||||
qApp->Settings()->SetProxyAddress(this->proxyAddress->text());
|
||||
qApp->Settings()->SetProxyPort(this->proxyPort->text());
|
||||
qApp->Settings()->SetProxyUser(this->proxyUser->text());
|
||||
qApp->Settings()->SetProxyPass(this->proxyPass->text());
|
||||
|
||||
qApp->getSettings()->SetUsername(this->username->text());
|
||||
qApp->getSettings()->SetSavePassword(this->savePassword->isChecked());
|
||||
qApp->getSettings()->SetUserPassword(this->userpassword->text());
|
||||
qApp->Settings()->SetUsername(this->username->text());
|
||||
qApp->Settings()->SetSavePassword(this->savePassword->isChecked());
|
||||
qApp->Settings()->SetUserPassword(this->userpassword->text());
|
||||
|
||||
}
|
||||
|
||||
|
@ -103,9 +103,9 @@ QGroupBox *CommunityPage::ServerGroup()
|
|||
QGroupBox *ServerGroup = new QGroupBox(tr("Server"));
|
||||
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"));
|
||||
|
||||
ServerGroup->setLayout(serverLayout);
|
||||
|
@ -137,12 +137,12 @@ QGroupBox *CommunityPage::ProxyGroup()
|
|||
|
||||
QFormLayout *proxyLayout = new QFormLayout;
|
||||
|
||||
CommunityPage::add_checkbox(&this->useProxy, proxyLayout, qApp->getSettings()->GetProxy(), tr("Use Proxy"));
|
||||
CommunityPage::add_lineedit(&this->proxyAddress, proxyLayout, qApp->getSettings()->GetProxyAddress(),
|
||||
CommunityPage::add_checkbox(&this->useProxy, proxyLayout, qApp->Settings()->GetProxy(), tr("Use Proxy"));
|
||||
CommunityPage::add_lineedit(&this->proxyAddress, proxyLayout, qApp->Settings()->GetProxyAddress(),
|
||||
tr("Proxy address"));
|
||||
CommunityPage::add_lineedit(&this->proxyPort, proxyLayout, qApp->getSettings()->GetProxyPort(), tr("Proxy port"));
|
||||
CommunityPage::add_lineedit(&this->proxyUser, proxyLayout, qApp->getSettings()->GetProxyUser(), tr("Proxy user"));
|
||||
CommunityPage::add_lineedit(&this->proxyPass, proxyLayout, qApp->getSettings()->GetProxyPass(), tr("Proxy pass"));
|
||||
CommunityPage::add_lineedit(&this->proxyPort, proxyLayout, qApp->Settings()->GetProxyPort(), tr("Proxy port"));
|
||||
CommunityPage::add_lineedit(&this->proxyUser, proxyLayout, qApp->Settings()->GetProxyUser(), tr("Proxy user"));
|
||||
CommunityPage::add_lineedit(&this->proxyPass, proxyLayout, qApp->Settings()->GetProxyPass(), tr("Proxy pass"));
|
||||
connect(this->useProxy, &QCheckBox::stateChanged, this, &CommunityPage::ProxyCheckChanged);
|
||||
this->ProxyCheckChanged();
|
||||
|
||||
|
@ -157,10 +157,10 @@ QGroupBox *CommunityPage::UserGroup()
|
|||
QGroupBox *userGroup = new QGroupBox(tr("User settings"));
|
||||
QFormLayout *userLayout = new QFormLayout;
|
||||
|
||||
CommunityPage::add_lineedit(&this->username, userLayout, qApp->getSettings()->GetUsername(), tr("User Name"));
|
||||
CommunityPage::add_checkbox(&this->savePassword, userLayout, qApp->getSettings()->GetSavePassword(),
|
||||
CommunityPage::add_lineedit(&this->username, userLayout, qApp->Settings()->GetUsername(), tr("User Name"));
|
||||
CommunityPage::add_checkbox(&this->savePassword, userLayout, qApp->Settings()->GetSavePassword(),
|
||||
tr("Save password"));
|
||||
CommunityPage::add_lineedit(&this->userpassword, userLayout, qApp->getSettings()->GetUserPassword(),
|
||||
CommunityPage::add_lineedit(&this->userpassword, userLayout, qApp->Settings()->GetUserPassword(),
|
||||
tr("Password"));
|
||||
|
||||
connect(this->savePassword, &QCheckBox::stateChanged, this, &CommunityPage::PasswordCheckChanged);
|
||||
|
|
|
@ -67,23 +67,23 @@ ConfigurationPage::ConfigurationPage(QWidget *parent)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void ConfigurationPage::Apply()
|
||||
{
|
||||
qApp->getSettings()->SetAutosaveState(autoSaveCheck->isChecked());
|
||||
qApp->getSettings()->SetAutosaveTime(autoTime->value());
|
||||
qApp->Settings()->SetAutosaveState(autoSaveCheck->isChecked());
|
||||
qApp->Settings()->SetAutosaveTime(autoTime->value());
|
||||
|
||||
QTimer *autoSaveTimer = qApp->getAutoSaveTimer();
|
||||
SCASSERT(autoSaveTimer);
|
||||
|
||||
autoSaveCheck->isChecked() ? autoSaveTimer->start(autoTime->value()*60000) : autoSaveTimer->stop();
|
||||
|
||||
qApp->getSettings()->SetOsSeparator(osOptionCheck->isChecked());
|
||||
qApp->getSettings()->SetSendReportState(sendReportCheck->isChecked());
|
||||
qApp->getSettings()->SetConfirmItemDelete(askPointDeletionCheck->isChecked());
|
||||
qApp->getSettings()->SetToolBarStyle(toolBarStyleCheck->isChecked());
|
||||
qApp->Settings()->SetOsSeparator(osOptionCheck->isChecked());
|
||||
qApp->Settings()->SetSendReportState(sendReportCheck->isChecked());
|
||||
qApp->Settings()->SetConfirmItemDelete(askPointDeletionCheck->isChecked());
|
||||
qApp->Settings()->SetToolBarStyle(toolBarStyleCheck->isChecked());
|
||||
|
||||
if (langChanged)
|
||||
{
|
||||
const QString locale = qvariant_cast<QString>(langCombo->itemData(langCombo->currentIndex()));
|
||||
qApp->getSettings()->SetLocale(locale);
|
||||
qApp->Settings()->SetLocale(locale);
|
||||
langChanged = false;
|
||||
const QString text = tr("Setup user interface language updated and will be used the next time start") + " " +
|
||||
QApplication::applicationName();
|
||||
|
@ -92,7 +92,7 @@ void ConfigurationPage::Apply()
|
|||
if (this->unitChanged)
|
||||
{
|
||||
const QString unit = qvariant_cast<QString>(this->unitCombo->itemData(this->unitCombo->currentIndex()));
|
||||
qApp->getSettings()->SetUnit(unit);
|
||||
qApp->Settings()->SetUnit(unit);
|
||||
this->unitChanged = false;
|
||||
const QString text = tr("Default unit updated and will be used the next pattern creation");
|
||||
QMessageBox::information(this, QApplication::applicationName(), text);
|
||||
|
@ -100,7 +100,7 @@ void ConfigurationPage::Apply()
|
|||
if (labelLangChanged)
|
||||
{
|
||||
const QString locale = qvariant_cast<QString>(labelCombo->itemData(labelCombo->currentIndex()));
|
||||
qApp->getSettings()->SetLabelLanguage(locale);
|
||||
qApp->Settings()->SetLabelLanguage(locale);
|
||||
labelLangChanged = false;
|
||||
}
|
||||
}
|
||||
|
@ -129,11 +129,11 @@ QGroupBox *ConfigurationPage::SaveGroup()
|
|||
QGroupBox *saveGroup = new QGroupBox(tr("Save"));
|
||||
|
||||
autoSaveCheck = new QCheckBox(tr("Auto-save modified pattern"));
|
||||
autoSaveCheck->setChecked(qApp->getSettings()->GetAutosaveState());
|
||||
autoSaveCheck->setChecked(qApp->Settings()->GetAutosaveState());
|
||||
|
||||
autoTime = new QSpinBox();
|
||||
autoTime->setRange(1, 60);
|
||||
autoTime->setValue(qApp->getSettings()->GetAutosaveTime());
|
||||
autoTime->setValue(qApp->Settings()->GetAutosaveTime());
|
||||
autoTime->setSuffix(tr("min"));
|
||||
|
||||
QHBoxLayout *autosaveLayout = new QHBoxLayout;
|
||||
|
@ -181,7 +181,7 @@ QGroupBox *ConfigurationPage::LangGroup()
|
|||
}
|
||||
|
||||
// set default translators and language checked
|
||||
qint32 index = langCombo->findData(qApp->getSettings()->GetLocale());
|
||||
qint32 index = langCombo->findData(qApp->Settings()->GetLocale());
|
||||
if (index != -1)
|
||||
{
|
||||
langCombo->setCurrentIndex(index);
|
||||
|
@ -197,7 +197,7 @@ QGroupBox *ConfigurationPage::LangGroup()
|
|||
QLabel *separatorLabel = new QLabel(tr("Decimal separator parts"));
|
||||
|
||||
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;
|
||||
separatorLayout->addWidget(separatorLabel);
|
||||
|
@ -212,7 +212,7 @@ QGroupBox *ConfigurationPage::LangGroup()
|
|||
this->unitCombo->addItem(tr("Inches"), "in");
|
||||
|
||||
// set default unit
|
||||
qint32 indexUnit = this->unitCombo->findData(qApp->getSettings()->GetUnit());
|
||||
qint32 indexUnit = this->unitCombo->findData(qApp->Settings()->GetUnit());
|
||||
if (indexUnit != -1)
|
||||
{
|
||||
this->unitCombo->setCurrentIndex(indexUnit);
|
||||
|
@ -231,7 +231,7 @@ QGroupBox *ConfigurationPage::LangGroup()
|
|||
|
||||
SetLabelComboBox(VApplication::LabelLanguages());
|
||||
|
||||
index = labelCombo->findData(qApp->getSettings()->GetLabelLanguage());
|
||||
index = labelCombo->findData(qApp->Settings()->GetLabelLanguage());
|
||||
if (index != -1)
|
||||
{
|
||||
labelCombo->setCurrentIndex(index);
|
||||
|
@ -261,7 +261,7 @@ QGroupBox *ConfigurationPage::SendGroup()
|
|||
QGroupBox *sendGroup = new QGroupBox(tr("Send crash reports"));
|
||||
|
||||
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 "
|
||||
"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"));
|
||||
|
||||
askPointDeletionCheck = new QCheckBox(tr("Confirm item deletion"));
|
||||
askPointDeletionCheck->setChecked(qApp->getSettings()->GetConfirmItemDelete());
|
||||
askPointDeletionCheck->setChecked(qApp->Settings()->GetConfirmItemDelete());
|
||||
|
||||
QVBoxLayout *editLayout = new QVBoxLayout;
|
||||
editLayout->addWidget(askPointDeletionCheck);
|
||||
|
@ -301,7 +301,7 @@ QGroupBox *ConfigurationPage::ToolBarGroup()
|
|||
QGroupBox *toolBarGroup = new QGroupBox(tr("Toolbar"));
|
||||
|
||||
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;
|
||||
editLayout->addWidget(toolBarStyleCheck);
|
||||
|
|
|
@ -62,10 +62,10 @@ PathPage::PathPage(QWidget *parent)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void PathPage::Apply()
|
||||
{
|
||||
qApp->getSettings()->SetPathIndividualMeasurements(pathTable->item(0, 1)->text());
|
||||
qApp->getSettings()->SetPathStandardMeasurements(pathTable->item(1, 1)->text());
|
||||
qApp->getSettings()->SetPathPattern(pathTable->item(2, 1)->text());
|
||||
qApp->getSettings()->SetPathLayout(pathTable->item(3, 1)->text());
|
||||
qApp->Settings()->SetPathIndividualMeasurements(pathTable->item(0, 1)->text());
|
||||
qApp->Settings()->SetPathStandardMeasurements(pathTable->item(1, 1)->text());
|
||||
qApp->Settings()->SetPathPattern(pathTable->item(2, 1)->text());
|
||||
qApp->Settings()->SetPathLayout(pathTable->item(3, 1)->text());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -113,16 +113,16 @@ void PathPage::EditPath()
|
|||
switch (row)
|
||||
{
|
||||
case 0: // individual measurements
|
||||
path = qApp->getSettings()->GetPathIndividualMeasurements();
|
||||
path = qApp->Settings()->GetPathIndividualMeasurements();
|
||||
break;
|
||||
case 1: // standard measurements
|
||||
path = qApp->getSettings()->GetPathStandardMeasurements();
|
||||
path = qApp->Settings()->GetPathStandardMeasurements();
|
||||
break;
|
||||
case 2: // pattern path
|
||||
path = qApp->getSettings()->GetPathPattern();
|
||||
path = qApp->Settings()->GetPathPattern();
|
||||
break;
|
||||
case 3: // layout path
|
||||
path = qApp->getSettings()->GetPathLayout();
|
||||
path = qApp->Settings()->GetPathLayout();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -182,29 +182,29 @@ void PathPage::InitTable()
|
|||
|
||||
{
|
||||
pathTable->setItem(0, 0, new QTableWidgetItem(tr("Individual measurements")));
|
||||
QTableWidgetItem *item = new QTableWidgetItem(qApp->getSettings()->GetPathIndividualMeasurements());
|
||||
item->setToolTip(qApp->getSettings()->GetPathIndividualMeasurements());
|
||||
QTableWidgetItem *item = new QTableWidgetItem(qApp->Settings()->GetPathIndividualMeasurements());
|
||||
item->setToolTip(qApp->Settings()->GetPathIndividualMeasurements());
|
||||
pathTable->setItem(0, 1, item);
|
||||
}
|
||||
|
||||
{
|
||||
pathTable->setItem(1, 0, new QTableWidgetItem(tr("Standard measurements")));
|
||||
QTableWidgetItem *item = new QTableWidgetItem(qApp->getSettings()->GetPathStandardMeasurements());
|
||||
item->setToolTip(qApp->getSettings()->GetPathStandardMeasurements());
|
||||
QTableWidgetItem *item = new QTableWidgetItem(qApp->Settings()->GetPathStandardMeasurements());
|
||||
item->setToolTip(qApp->Settings()->GetPathStandardMeasurements());
|
||||
pathTable->setItem(1, 1, item);
|
||||
}
|
||||
|
||||
{
|
||||
pathTable->setItem(2, 0, new QTableWidgetItem(tr("Patterns")));
|
||||
QTableWidgetItem *item = new QTableWidgetItem(qApp->getSettings()->GetPathPattern());
|
||||
item->setToolTip(qApp->getSettings()->GetPathPattern());
|
||||
QTableWidgetItem *item = new QTableWidgetItem(qApp->Settings()->GetPathPattern());
|
||||
item->setToolTip(qApp->Settings()->GetPathPattern());
|
||||
pathTable->setItem(2, 1, item);
|
||||
}
|
||||
|
||||
{
|
||||
pathTable->setItem(3, 0, new QTableWidgetItem(tr("Layout")));
|
||||
QTableWidgetItem *item = new QTableWidgetItem(qApp->getSettings()->GetPathLayout());
|
||||
item->setToolTip(qApp->getSettings()->GetPathLayout());
|
||||
QTableWidgetItem *item = new QTableWidgetItem(qApp->Settings()->GetPathLayout());
|
||||
item->setToolTip(qApp->Settings()->GetPathLayout());
|
||||
pathTable->setItem(3, 1, item);
|
||||
}
|
||||
|
||||
|
|
|
@ -58,17 +58,17 @@ PatternPage::PatternPage(QWidget *parent):
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void PatternPage::Apply()
|
||||
{
|
||||
qApp->getSettings()->SetUser(userName->text());
|
||||
qApp->Settings()->SetUser(userName->text());
|
||||
|
||||
// Scene antialiasing
|
||||
qApp->getSettings()->SetGraphicalOutput(graphOutputCheck->isChecked());
|
||||
qApp->Settings()->SetGraphicalOutput(graphOutputCheck->isChecked());
|
||||
qApp->getSceneView()->setRenderHint(QPainter::Antialiasing, 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
|
||||
* non-empty stack might delete the command at the current index. Calling setUndoLimit() on a non-empty stack
|
||||
* 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"));
|
||||
|
||||
userName = new QLineEdit;
|
||||
userName->setText(qApp->getSettings()->GetUser());
|
||||
userName->setText(qApp->Settings()->GetUser());
|
||||
|
||||
QHBoxLayout *nameLayout = new QHBoxLayout;
|
||||
nameLayout->addWidget(nameLabel);
|
||||
|
@ -96,7 +96,7 @@ QGroupBox *PatternPage::GraphOutputGroup()
|
|||
QGroupBox *graphOutputGroup = new QGroupBox(tr("Graphical output"));
|
||||
|
||||
graphOutputCheck = new QCheckBox(tr("Use antialiasing"));
|
||||
graphOutputCheck->setChecked(qApp->getSettings()->GetGraphicalOutput());
|
||||
graphOutputCheck->setChecked(qApp->Settings()->GetGraphicalOutput());
|
||||
|
||||
QHBoxLayout *graphLayout = new QHBoxLayout;
|
||||
graphLayout->addWidget(graphOutputCheck);
|
||||
|
@ -114,7 +114,7 @@ QGroupBox *PatternPage::UndoGroup()
|
|||
QLabel *undoLabel = new QLabel(tr("Count steps (0 - no limit)"));
|
||||
undoCount = new QSpinBox;
|
||||
undoCount->setMinimum(0);
|
||||
undoCount->setValue(qApp->getSettings()->GetUndoCount());
|
||||
undoCount->setValue(qApp->Settings()->GetUndoCount());
|
||||
|
||||
QHBoxLayout *countLayout = new QHBoxLayout;
|
||||
countLayout->addWidget(undoLabel);
|
||||
|
|
|
@ -42,7 +42,7 @@ DialogAboutApp::DialogAboutApp(QWidget *parent) :
|
|||
{
|
||||
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->labelBuildRevision->setText(QString("Build revision: %1").arg(BUILD_REVISION));
|
||||
|
|
|
@ -50,7 +50,7 @@ DialogHistory::DialogHistory(VContainer *data, VPattern *doc, QWidget *parent)
|
|||
{
|
||||
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);
|
||||
connect(bOk, &QPushButton::clicked, this, &DialogHistory::DialogAccepted);
|
||||
|
|
|
@ -56,7 +56,7 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par
|
|||
{
|
||||
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.");
|
||||
if (qApp->patternType() == MeasurementsType::Individual)
|
||||
|
@ -613,7 +613,7 @@ void DialogIncrements::OpenTable()
|
|||
const QString filter(tr("Individual measurements (*.vit)"));
|
||||
|
||||
//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);
|
||||
if (filePath.isEmpty())
|
||||
|
@ -656,7 +656,7 @@ void DialogIncrements::OpenTable()
|
|||
{
|
||||
const QString filter(tr("Standard measurements (*.vst)"));
|
||||
//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);
|
||||
if (filePath.isEmpty())
|
||||
{
|
||||
|
|
|
@ -47,7 +47,7 @@ DialogIndividualMeasurements::DialogIndividualMeasurements(VContainer *data, con
|
|||
{
|
||||
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();
|
||||
position.moveCenter(QDesktopWidget().availableGeometry().center());
|
||||
|
@ -199,7 +199,7 @@ void DialogIndividualMeasurements::CheckState()
|
|||
void DialogIndividualMeasurements::OpenTable()
|
||||
{
|
||||
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);
|
||||
if (fileName.isEmpty())
|
||||
|
@ -228,7 +228,7 @@ void DialogIndividualMeasurements::OpenTable()
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
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,
|
||||
tr("Individual measurements (*.vit)"));
|
||||
|
||||
|
@ -256,7 +256,7 @@ void DialogIndividualMeasurements::InitUnits()
|
|||
ui->comboBoxUnits->addItem(tr("Inches"), QVariant(VDomDocument::UnitsToStr(Unit::Inch)));
|
||||
|
||||
// set default unit
|
||||
const qint32 indexUnit = ui->comboBoxUnits->findData(qApp->getSettings()->GetUnit());
|
||||
const qint32 indexUnit = ui->comboBoxUnits->findData(qApp->Settings()->GetUnit());
|
||||
if (indexUnit != -1)
|
||||
{
|
||||
ui->comboBoxUnits->setCurrentIndex(indexUnit);
|
||||
|
|
|
@ -41,7 +41,7 @@ DialogLayoutProgress::DialogLayoutProgress(int count, QWidget *parent)
|
|||
{
|
||||
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->setValue(0);
|
||||
|
|
|
@ -52,7 +52,7 @@ DialogLayoutSettings::DialogLayoutSettings(VLayoutGenerator *generator, QWidget
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
qApp->getSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
|
||||
ReadSettings();
|
||||
|
||||
|
@ -359,8 +359,8 @@ void DialogLayoutSettings::InitPaperUnits()
|
|||
ui->comboBoxPaperSizeUnit->addItem(tr("Pixels"), QVariant(VDomDocument::UnitsToStr(Unit::Px)));
|
||||
|
||||
// set default unit
|
||||
oldPaperUnit = VDomDocument::StrToUnits(qApp->getSettings()->GetUnit());
|
||||
const qint32 indexUnit = ui->comboBoxPaperSizeUnit->findData(qApp->getSettings()->GetUnit());
|
||||
oldPaperUnit = VDomDocument::StrToUnits(qApp->Settings()->GetUnit());
|
||||
const qint32 indexUnit = ui->comboBoxPaperSizeUnit->findData(qApp->Settings()->GetUnit());
|
||||
if (indexUnit != -1)
|
||||
{
|
||||
ui->comboBoxPaperSizeUnit->setCurrentIndex(indexUnit);
|
||||
|
@ -375,8 +375,8 @@ void DialogLayoutSettings::InitLayoutUnits()
|
|||
ui->comboBoxLayoutUnit->addItem(tr("Inches"), QVariant(VDomDocument::UnitsToStr(Unit::Inch)));
|
||||
|
||||
// set default unit
|
||||
oldLayoutUnit = VDomDocument::StrToUnits(qApp->getSettings()->GetUnit());
|
||||
const qint32 indexUnit = ui->comboBoxLayoutUnit->findData(qApp->getSettings()->GetUnit());
|
||||
oldLayoutUnit = VDomDocument::StrToUnits(qApp->Settings()->GetUnit());
|
||||
const qint32 indexUnit = ui->comboBoxLayoutUnit->findData(qApp->Settings()->GetUnit());
|
||||
if (indexUnit != -1)
|
||||
{
|
||||
ui->comboBoxLayoutUnit->setCurrentIndex(indexUnit);
|
||||
|
@ -607,33 +607,33 @@ void DialogLayoutSettings::ReadSettings()
|
|||
MinimumPaperSize();
|
||||
MinimumLayoutSize();
|
||||
|
||||
SetLayoutWidth(qApp->getSettings()->GetLayoutWidth());
|
||||
SetShift(qApp->getSettings()->GetLayoutShift());
|
||||
SetLayoutWidth(qApp->Settings()->GetLayoutWidth());
|
||||
SetShift(qApp->Settings()->GetLayoutShift());
|
||||
|
||||
const qreal width = UnitConvertor(qApp->getSettings()->GetLayoutPaperWidth(), Unit::Px, LayoutUnit());
|
||||
const qreal height = UnitConvertor(qApp->getSettings()->GetLayoutPaperHeight(), Unit::Px, LayoutUnit());
|
||||
const qreal width = UnitConvertor(qApp->Settings()->GetLayoutPaperWidth(), Unit::Px, LayoutUnit());
|
||||
const qreal height = UnitConvertor(qApp->Settings()->GetLayoutPaperHeight(), Unit::Px, LayoutUnit());
|
||||
SheetSize(QSizeF(width, height));
|
||||
SetGroup(qApp->getSettings()->GetLayoutGroup());
|
||||
SetRotate(qApp->getSettings()->GetLayoutRotate());
|
||||
SetIncrease(qApp->getSettings()->GetLayoutRotationIncrease());
|
||||
SetAutoCrop(qApp->getSettings()->GetLayoutAutoCrop());
|
||||
SetSaveLength(qApp->getSettings()->GetLayoutSaveLength());
|
||||
SetUnitePages(qApp->getSettings()->GetLayoutUnitePages());
|
||||
SetGroup(qApp->Settings()->GetLayoutGroup());
|
||||
SetRotate(qApp->Settings()->GetLayoutRotate());
|
||||
SetIncrease(qApp->Settings()->GetLayoutRotationIncrease());
|
||||
SetAutoCrop(qApp->Settings()->GetLayoutAutoCrop());
|
||||
SetSaveLength(qApp->Settings()->GetLayoutSaveLength());
|
||||
SetUnitePages(qApp->Settings()->GetLayoutUnitePages());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogLayoutSettings::WriteSettings() const
|
||||
{
|
||||
qApp->getSettings()->SetLayoutWidth(GetLayoutWidth());
|
||||
qApp->getSettings()->SetLayoutGroup(GetGroup());
|
||||
qApp->getSettings()->SetLayoutPaperHeight(GetPaperHeight());
|
||||
qApp->getSettings()->SetLayoutPaperWidth(GetPaperWidth());
|
||||
qApp->getSettings()->SetLayoutShift(GetShift());
|
||||
qApp->getSettings()->SetLayoutRotate(GetRotate());
|
||||
qApp->getSettings()->SetLayoutRotationIncrease(GetIncrease());
|
||||
qApp->getSettings()->SetLayoutAutoCrop(GetAutoCrop());
|
||||
qApp->getSettings()->SetLayoutSaveLength(IsSaveLength());
|
||||
qApp->getSettings()->SetLayoutUnitePages(IsUnitePages());
|
||||
qApp->Settings()->SetLayoutWidth(GetLayoutWidth());
|
||||
qApp->Settings()->SetLayoutGroup(GetGroup());
|
||||
qApp->Settings()->SetLayoutPaperHeight(GetPaperHeight());
|
||||
qApp->Settings()->SetLayoutPaperWidth(GetPaperWidth());
|
||||
qApp->Settings()->SetLayoutShift(GetShift());
|
||||
qApp->Settings()->SetLayoutRotate(GetRotate());
|
||||
qApp->Settings()->SetLayoutRotationIncrease(GetIncrease());
|
||||
qApp->Settings()->SetLayoutAutoCrop(GetAutoCrop());
|
||||
qApp->Settings()->SetLayoutSaveLength(IsSaveLength());
|
||||
qApp->Settings()->SetLayoutUnitePages(IsUnitePages());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -36,7 +36,7 @@ DialogMeasurements::DialogMeasurements(QWidget *parent) :
|
|||
{
|
||||
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->toolButtonIndividual, &QToolButton::clicked, this, &DialogMeasurements::IndividualMeasurements);
|
||||
|
|
|
@ -45,7 +45,7 @@ DialogPatternProperties::DialogPatternProperties(VPattern *doc, QWidget *parent)
|
|||
|
||||
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());
|
||||
connect(ui->lineEditAuthor, &QLineEdit::editingFinished, this, &DialogPatternProperties::DescEdited);
|
||||
|
|
|
@ -46,7 +46,7 @@ DialogPatternXmlEdit::DialogPatternXmlEdit(QWidget *parent, VPattern *xmldoc)
|
|||
{
|
||||
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->doc=xmldoc;
|
||||
|
|
|
@ -43,7 +43,7 @@ DialogSaveLayout::DialogSaveLayout(const QMap<QString, QString> &formates, int c
|
|||
{
|
||||
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);
|
||||
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->lineEditPath, &QLineEdit::textChanged, this, &DialogSaveLayout::PathChanged);
|
||||
|
||||
ui->lineEditPath->setText(qApp->getSettings()->GetPathLayout());
|
||||
ui->lineEditPath->setText(qApp->Settings()->GetPathLayout());
|
||||
ShowExample();//Show example for current format.
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ DialogStandardMeasurements::DialogStandardMeasurements(VContainer *data, const Q
|
|||
{
|
||||
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();
|
||||
position.moveCenter(QDesktopWidget().availableGeometry().center());
|
||||
|
@ -153,7 +153,7 @@ void DialogStandardMeasurements::LoadStandardTables()
|
|||
qCDebug(vStMeasur, "Loading standard table.");
|
||||
QStringList filters{"*.vst"};
|
||||
//Use standard path to standard measurements
|
||||
const QString path = qApp->getSettings()->GetPathStandardMeasurements();
|
||||
const QString path = qApp->Settings()->GetPathStandardMeasurements();
|
||||
QDir tablesDir(path);
|
||||
tablesDir.setNameFilters(filters);
|
||||
tablesDir.setCurrent(path);
|
||||
|
|
|
@ -39,7 +39,7 @@ DialogUndo::DialogUndo(QWidget *parent)
|
|||
{
|
||||
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();
|
||||
if (opening)
|
||||
|
|
|
@ -306,7 +306,7 @@ QString DialogAlongLine::GetTypeLine() const
|
|||
*/
|
||||
QString DialogAlongLine::GetFormula() const
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -424,7 +424,7 @@ quint32 DialogArc::GetCenter() 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
|
||||
{
|
||||
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
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(f2, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(f2, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ void DialogArcWithLength::SetCenter(const quint32 &value)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
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
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(f1, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(f1, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
void DialogArcWithLength::SetF1(const QString &value)
|
||||
|
@ -156,7 +156,7 @@ void DialogArcWithLength::SetF1(const QString &value)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString DialogArcWithLength::GetLength() const
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(length, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(length, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -342,7 +342,7 @@ QString DialogBisector::GetTypeLine() const
|
|||
*/
|
||||
QString DialogBisector::GetFormula() const
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -99,7 +99,7 @@ void DialogCurveIntersectAxis::SetTypeLine(const QString &value)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString DialogCurveIntersectAxis::GetAngle() const
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(formulaAngle, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(formulaAngle, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -216,7 +216,7 @@ void DialogCutArc::SetPointName(const QString &value)
|
|||
*/
|
||||
QString DialogCutArc::GetFormula() const
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -210,7 +210,7 @@ void DialogCutSpline::ShowVisualization()
|
|||
*/
|
||||
QString DialogCutSpline::GetFormula() const
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -210,7 +210,7 @@ void DialogCutSplinePath::ShowVisualization()
|
|||
*/
|
||||
QString DialogCutSplinePath::GetFormula() const
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -385,7 +385,7 @@ void DialogEditWrongFormula::setPostfix(const QString &value)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString DialogEditWrongFormula::GetFormula() const
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -355,7 +355,7 @@ QString DialogEndLine::GetTypeLine() 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
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(formulaAngle, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(formulaAngle, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -107,7 +107,7 @@ void DialogLineIntersectAxis::SetTypeLine(const QString &value)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString DialogLineIntersectAxis::GetAngle() const
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(formulaAngle, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(formulaAngle, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -315,7 +315,7 @@ QString DialogNormal::GetTypeLine() const
|
|||
*/
|
||||
QString DialogNormal::GetFormula() const
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -112,7 +112,7 @@ void DialogPointFromCircleAndTangent::SetCircleCenterId(const quint32 &value)
|
|||
QString DialogPointFromCircleAndTangent::GetCircleRadius() const
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(ui->plainTextEditRadius->toPlainText(),
|
||||
qApp->getSettings()->GetOsSeparator());
|
||||
qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -304,7 +304,7 @@ void DialogPointOfContact::SetPointName(const QString &value)
|
|||
*/
|
||||
QString DialogPointOfContact::getRadius() const
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(radius, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(radius, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -144,7 +144,7 @@ void DialogPointOfIntersectionCircles::SetSecondCircleCenterId(const quint32 &va
|
|||
QString DialogPointOfIntersectionCircles::GetFirstCircleRadius() const
|
||||
{
|
||||
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
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(ui->plainTextEditCircle2Radius->toPlainText(),
|
||||
qApp->getSettings()->GetOsSeparator());
|
||||
qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -341,7 +341,7 @@ QString DialogShoulderPoint::GetTypeLine() const
|
|||
*/
|
||||
QString DialogShoulderPoint::GetFormula() const
|
||||
{
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->getSettings()->GetOsSeparator());
|
||||
return qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -461,7 +461,7 @@ qreal DialogTool::Eval(const QString &text, bool &flag, QLabel *label, const QSt
|
|||
QString formula = text;
|
||||
formula.replace("\n", " ");
|
||||
// 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());
|
||||
result = cal->EvalFormula(formula);
|
||||
delete cal;
|
||||
|
|
|
@ -257,7 +257,7 @@ protected:
|
|||
SCASSERT(bCancel != nullptr);
|
||||
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>
|
||||
/**
|
||||
|
|
|
@ -1480,7 +1480,7 @@ bool MainWindow::SaveAs()
|
|||
QString dir;
|
||||
if (curFile.isEmpty())
|
||||
{
|
||||
dir = qApp->getSettings()->GetPathPattern() + "/" + tr("pattern") + ".val";
|
||||
dir = qApp->Settings()->GetPathPattern() + "/" + tr("pattern") + ".val";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1513,9 +1513,9 @@ bool MainWindow::SaveAs()
|
|||
if (oldFileName != curFile)
|
||||
{// Now we have new file name after save as.
|
||||
// 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);
|
||||
qApp->getSettings()->SetRestoreFileList(restoreFiles);
|
||||
qApp->Settings()->SetRestoreFileList(restoreFiles);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -1564,7 +1564,7 @@ void MainWindow::Open()
|
|||
qCDebug(vMainWindow, "Openning new file.");
|
||||
const QString filter(tr("Pattern files (*.val)"));
|
||||
//Get list last open files
|
||||
const QStringList files = qApp->getSettings()->GetRecentFileList();
|
||||
const QStringList files = qApp->Settings()->GetRecentFileList();
|
||||
QString dir;
|
||||
if (files.isEmpty())
|
||||
{
|
||||
|
@ -1676,9 +1676,9 @@ void MainWindow::FileClosedCorrect()
|
|||
WriteSettings();
|
||||
|
||||
//File was closed correct.
|
||||
QStringList restoreFiles = qApp->getSettings()->GetRestoreFileList();
|
||||
QStringList restoreFiles = qApp->Settings()->GetRestoreFileList();
|
||||
restoreFiles.removeAll(curFile);
|
||||
qApp->getSettings()->SetRestoreFileList(restoreFiles);
|
||||
qApp->Settings()->SetRestoreFileList(restoreFiles);
|
||||
|
||||
// Remove autosave file
|
||||
QFile autofile(curFile +".autosave");
|
||||
|
@ -2309,7 +2309,7 @@ void MainWindow::setCurrentFile(const QString &fileName)
|
|||
else
|
||||
{
|
||||
qCDebug(vMainWindow, "Updating recent file list.");
|
||||
QStringList files = qApp->getSettings()->GetRecentFileList();
|
||||
QStringList files = qApp->Settings()->GetRecentFileList();
|
||||
files.removeAll(fileName);
|
||||
files.prepend(fileName);
|
||||
while (files.size() > MaxRecentFiles)
|
||||
|
@ -2317,14 +2317,14 @@ void MainWindow::setCurrentFile(const QString &fileName)
|
|||
files.removeLast();
|
||||
}
|
||||
|
||||
qApp->getSettings()->SetRecentFileList(files);
|
||||
qApp->Settings()->SetRecentFileList(files);
|
||||
UpdateRecentFileActions();
|
||||
|
||||
qCDebug(vMainWindow, "Updating restore file list.");
|
||||
QStringList restoreFiles = qApp->getSettings()->GetRestoreFileList();
|
||||
QStringList restoreFiles = qApp->Settings()->GetRestoreFileList();
|
||||
restoreFiles.removeAll(fileName);
|
||||
restoreFiles.prepend(fileName);
|
||||
qApp->getSettings()->SetRestoreFileList(restoreFiles);
|
||||
qApp->Settings()->SetRestoreFileList(restoreFiles);
|
||||
}
|
||||
shownName+="[*]";
|
||||
setWindowTitle(shownName);
|
||||
|
@ -2348,17 +2348,17 @@ QString MainWindow::strippedName(const QString &fullFileName)
|
|||
void MainWindow::ReadSettings()
|
||||
{
|
||||
qCDebug(vMainWindow, "Reading settings.");
|
||||
restoreGeometry(qApp->getSettings()->GetGeometry());
|
||||
restoreState(qApp->getSettings()->GetWindowState());
|
||||
restoreState(qApp->getSettings()->GetToolbarsState(), APP_VERSION);
|
||||
restoreGeometry(qApp->Settings()->GetGeometry());
|
||||
restoreState(qApp->Settings()->GetWindowState());
|
||||
restoreState(qApp->Settings()->GetToolbarsState(), APP_VERSION);
|
||||
|
||||
// Scene antialiasing
|
||||
const bool graphOutputValue = qApp->getSettings()->GetGraphicalOutput();
|
||||
const bool graphOutputValue = qApp->Settings()->GetGraphicalOutput();
|
||||
ui->view->setRenderHint(QPainter::Antialiasing, graphOutputValue);
|
||||
ui->view->setRenderHint(QPainter::SmoothPixmapTransform, graphOutputValue);
|
||||
|
||||
// Stack limit
|
||||
qApp->getUndoStack()->setUndoLimit(qApp->getSettings()->GetUndoCount());
|
||||
qApp->getUndoStack()->setUndoLimit(qApp->Settings()->GetUndoCount());
|
||||
|
||||
// Text under tool buton icon
|
||||
ToolBarStyles();
|
||||
|
@ -2372,9 +2372,9 @@ void MainWindow::WriteSettings()
|
|||
{
|
||||
ActionDraw(true);
|
||||
|
||||
qApp->getSettings()->SetGeometry(saveGeometry());
|
||||
qApp->getSettings()->SetWindowState(saveState());
|
||||
qApp->getSettings()->SetToolbarsState(saveState(APP_VERSION));
|
||||
qApp->Settings()->SetGeometry(saveGeometry());
|
||||
qApp->Settings()->SetWindowState(saveState());
|
||||
qApp->Settings()->SetToolbarsState(saveState(APP_VERSION));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -2406,7 +2406,7 @@ bool MainWindow::MaybeSave()
|
|||
void MainWindow::UpdateRecentFileActions()
|
||||
{
|
||||
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));
|
||||
|
||||
for (int i = 0; i < numRecentFiles; ++i)
|
||||
|
@ -2685,9 +2685,9 @@ void MainWindow::InitAutoSave()
|
|||
connect(autoSaveTimer, &QTimer::timeout, this, &MainWindow::AutoSavePattern);
|
||||
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);
|
||||
qCDebug(vMainWindow, "Autosaving each %d minutes.", autoTime);
|
||||
}
|
||||
|
@ -2871,7 +2871,7 @@ QStringList MainWindow::GetUnlokedRestoreFileList() const
|
|||
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
|
||||
QStringList restoreFiles;
|
||||
//Take all files that need to be restored
|
||||
QStringList files = qApp->getSettings()->GetRestoreFileList();
|
||||
QStringList files = qApp->Settings()->GetRestoreFileList();
|
||||
if (files.size() > 0)
|
||||
{
|
||||
for (int i = 0; i < files.size(); ++i)
|
||||
|
@ -2893,7 +2893,7 @@ QStringList MainWindow::GetUnlokedRestoreFileList() const
|
|||
files.removeAll(restoreFiles.at(i));
|
||||
}
|
||||
|
||||
qApp->getSettings()->SetRestoreFileList(files);
|
||||
qApp->Settings()->SetRestoreFileList(files);
|
||||
|
||||
}
|
||||
return restoreFiles;
|
||||
|
@ -2905,7 +2905,7 @@ QStringList MainWindow::GetUnlokedRestoreFileList() const
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
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)
|
||||
{
|
||||
if (qApp->getSettings()->GetToolBarStyle())
|
||||
if (qApp->Settings()->GetToolBarStyle())
|
||||
{
|
||||
bar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
|
||||
}
|
||||
|
@ -3023,14 +3023,14 @@ QString MainWindow::CheckPathToMeasurements(const QString &path, const Measureme
|
|||
{
|
||||
filter = tr("Standard measurements (*.vst)");
|
||||
//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);
|
||||
}
|
||||
else
|
||||
{
|
||||
filter = tr("Individual measurements (*.vit)");
|
||||
//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);
|
||||
}
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ void MainWindowsNoGUI::ExportLayoutAs()
|
|||
suf.replace(".", "");
|
||||
|
||||
const QString path = dialog.Path();
|
||||
qApp->getSettings()->SetPathLayout(path);
|
||||
qApp->Settings()->SetPathLayout(path);
|
||||
const QString mask = dialog.FileName();
|
||||
|
||||
for (int i=0; i < scenes.size(); ++i)
|
||||
|
@ -719,7 +719,7 @@ void MainWindowsNoGUI::SaveLayoutAs()
|
|||
printer.setOutputFormat(QPrinter::PdfFormat);
|
||||
|
||||
QString fileName = QFileDialog::getSaveFileName(this, tr("Print to pdf"),
|
||||
qApp->getSettings()->GetPathLayout()+"/"+FileName()+".pdf",
|
||||
qApp->Settings()->GetPathLayout()+"/"+FileName()+".pdf",
|
||||
tr("PDF file (*.pdf)"));
|
||||
if (not fileName.isEmpty())
|
||||
{
|
||||
|
@ -728,7 +728,7 @@ void MainWindowsNoGUI::SaveLayoutAs()
|
|||
{
|
||||
fileName.append(".pdf");
|
||||
}
|
||||
qApp->getSettings()->SetPathLayout(f.absolutePath());
|
||||
qApp->Settings()->SetPathLayout(f.absolutePath());
|
||||
|
||||
printer.setOutputFileName(fileName);
|
||||
printer.setResolution(static_cast<int>(PrintDPI));
|
||||
|
|
|
@ -149,7 +149,7 @@ void VAbstractTool::DeleteTool(bool ask)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
int VAbstractTool::ConfirmDeletion()
|
||||
{
|
||||
if (false == qApp->getSettings()->GetConfirmItemDelete())
|
||||
if (false == qApp->Settings()->GetConfirmItemDelete())
|
||||
{
|
||||
return QMessageBox::Yes;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ int VAbstractTool::ConfirmDeletion()
|
|||
|
||||
if (dialogResult == QDialog::Accepted)
|
||||
{
|
||||
qApp->getSettings()->SetConfirmItemDelete(not msgBox.isChecked());
|
||||
qApp->Settings()->SetConfirmItemDelete(not msgBox.isChecked());
|
||||
}
|
||||
|
||||
return dialogResult == QDialog::Accepted ? QMessageBox::Yes : QMessageBox::No;
|
||||
|
|
|
@ -145,7 +145,7 @@ qreal Visualization::FindVal(const QString &expression)
|
|||
// Replace line return with spaces for calc if exist
|
||||
QString formula = expression;
|
||||
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());
|
||||
val = cal->EvalFormula(formula);
|
||||
delete cal;
|
||||
|
|
|
@ -1328,7 +1328,7 @@ QString VPattern::GetLabelBase(unsigned int index) const
|
|||
{
|
||||
QStringList list = VApplication::LabelLanguages();
|
||||
QStringList alphabet;
|
||||
switch (list.indexOf(qApp->getSettings()->GetLabelLanguage()))
|
||||
switch (list.indexOf(qApp->Settings()->GetLabelLanguage()))
|
||||
{
|
||||
case 0: // de
|
||||
{
|
||||
|
@ -1735,7 +1735,7 @@ void VPattern::ParseIncrementsElement(const QDomNode &node)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VPattern::GetAuthor() const
|
||||
{
|
||||
return UniqueTagText(TagAuthor, qApp->getSettings()->GetUser());
|
||||
return UniqueTagText(TagAuthor, qApp->Settings()->GetUser());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -54,7 +54,7 @@ void VAbstractApplication::OpenSettings()
|
|||
* @brief getSettings hide settings constructor.
|
||||
* @return pointer to class for acssesing to settings in ini file.
|
||||
*/
|
||||
VSettings *VAbstractApplication::getSettings()
|
||||
VSettings *VAbstractApplication::Settings()
|
||||
{
|
||||
SCASSERT(settings != nullptr);
|
||||
return settings;
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
void setPatternType(const MeasurementsType &patternType);
|
||||
|
||||
void OpenSettings();
|
||||
VSettings *getSettings();
|
||||
VSettings *Settings();
|
||||
|
||||
template <typename T>
|
||||
QString LocaleToString(const T &value);
|
||||
|
@ -85,7 +85,7 @@ template <typename T>
|
|||
QString VAbstractApplication::LocaleToString(const T &value)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ QString VFormula::GetFormula(FormulaType type) const
|
|||
}
|
||||
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
|
||||
{
|
||||
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);
|
||||
delete cal;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user