Refactoring. Backport QOverload template.
--HG-- branch : develop
This commit is contained in:
parent
15339939ef
commit
5c8c940f32
|
@ -44,7 +44,7 @@ TapePreferencesConfigurationPage::TapePreferencesConfigurationPage(QWidget *pare
|
|||
ui->setupUi(this);
|
||||
|
||||
InitLanguages(ui->langCombo);
|
||||
connect(ui->langCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [this]()
|
||||
connect(ui->langCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this]()
|
||||
{
|
||||
m_langChanged = true;
|
||||
});
|
||||
|
@ -56,7 +56,7 @@ TapePreferencesConfigurationPage::TapePreferencesConfigurationPage(QWidget *pare
|
|||
//---------------------- Pattern making system
|
||||
InitPMSystems(ui->systemCombo);
|
||||
ui->systemBookValueLabel->setFixedHeight(4 * QFontMetrics(ui->systemBookValueLabel->font()).lineSpacing());
|
||||
connect(ui->systemCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [this]()
|
||||
connect(ui->systemCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this]()
|
||||
{
|
||||
m_systemChanged = true;
|
||||
QString text = qApp->TrVars()->PMSystemAuthor(ui->systemCombo->currentData().toString());
|
||||
|
@ -98,8 +98,7 @@ TapePreferencesConfigurationPage::TapePreferencesConfigurationPage(QWidget *pare
|
|||
m_defGradationChanged = true;
|
||||
};
|
||||
|
||||
connect(ui->defHeightCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
DefGradationChanged);
|
||||
connect(ui->defHeightCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, DefGradationChanged);
|
||||
|
||||
ui->defSizeCombo->addItems(VMeasurement::WholeListSizes(Unit::Cm));
|
||||
index = ui->defSizeCombo->findText(QString().setNum(qApp->TapeSettings()->GetDefSize()));
|
||||
|
@ -107,8 +106,7 @@ TapePreferencesConfigurationPage::TapePreferencesConfigurationPage(QWidget *pare
|
|||
{
|
||||
ui->defSizeCombo->setCurrentIndex(index);
|
||||
}
|
||||
connect(ui->defHeightCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
DefGradationChanged);
|
||||
connect(ui->defHeightCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, DefGradationChanged);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -64,10 +64,10 @@ DialogNewMeasurements::DialogNewMeasurements(QWidget *parent)
|
|||
ui->comboBoxBaseSize->setCurrentIndex(index);
|
||||
}
|
||||
|
||||
connect(ui->comboBoxMType, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(ui->comboBoxMType, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&DialogNewMeasurements::CurrentTypeChanged);
|
||||
|
||||
connect(ui->comboBoxUnit, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(ui->comboBoxUnit, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&DialogNewMeasurements::CurrentUnitChanged);
|
||||
}
|
||||
|
||||
|
|
|
@ -2014,23 +2014,20 @@ void TMainWindow::InitWindow()
|
|||
labelGradationHeights = new QLabel(tr("Height:"));
|
||||
gradationHeights = SetGradationList(labelGradationHeights, listHeights);
|
||||
SetDefaultHeight(static_cast<int>(VContainer::height()));
|
||||
connect(gradationHeights, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(gradationHeights, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &TMainWindow::ChangedHeight);
|
||||
|
||||
labelGradationSizes = new QLabel(tr("Size:"));
|
||||
gradationSizes = SetGradationList(labelGradationSizes, listSizes);
|
||||
SetDefaultSize(static_cast<int>(VContainer::size()));
|
||||
connect(gradationSizes, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(gradationSizes, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &TMainWindow::ChangedSize);
|
||||
|
||||
connect(ui->doubleSpinBoxBaseValue,
|
||||
static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||
connect(ui->doubleSpinBoxBaseValue, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &TMainWindow::SaveMBaseValue);
|
||||
connect(ui->doubleSpinBoxInSizes,
|
||||
static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||
connect(ui->doubleSpinBoxInSizes, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &TMainWindow::SaveMSizeIncrease);
|
||||
connect(ui->doubleSpinBoxInHeights,
|
||||
static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||
connect(ui->doubleSpinBoxInHeights, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &TMainWindow::SaveMHeightIncrease);
|
||||
|
||||
SetDecimals();
|
||||
|
@ -2076,7 +2073,7 @@ void TMainWindow::InitWindow()
|
|||
|
||||
connect(ui->lineEditCustomerName, &QLineEdit::editingFinished, this, &TMainWindow::SaveCustomerName);
|
||||
connect(ui->lineEditEmail, &QLineEdit::editingFinished, this, &TMainWindow::SaveEmail);
|
||||
connect(ui->comboBoxGender, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(ui->comboBoxGender, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&TMainWindow::SaveGender);
|
||||
connect(ui->dateEditBirthDate, &QDateEdit::dateChanged, this, &TMainWindow::SaveBirthDate);
|
||||
connect(ui->pushButtonGrow, &QPushButton::clicked, this, &TMainWindow::DeployFormula);
|
||||
|
@ -2093,7 +2090,7 @@ void TMainWindow::InitWindow()
|
|||
InitPMSystems(ui->comboBoxPMSystem);
|
||||
const qint32 index = ui->comboBoxPMSystem->findData(QLatin1Char('p')+m->PMSystem());
|
||||
ui->comboBoxPMSystem->setCurrentIndex(index);
|
||||
connect(ui->comboBoxPMSystem, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(ui->comboBoxPMSystem, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&TMainWindow::SavePMSystem);
|
||||
|
||||
connect(ui->lineEditFind, &QLineEdit::textChanged, [this] (const QString &term){search->Find(term);});
|
||||
|
@ -3078,8 +3075,7 @@ void TMainWindow::InitUnits()
|
|||
comboBoxUnits->setCurrentIndex(indexUnit);
|
||||
}
|
||||
|
||||
connect(comboBoxUnits, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
&TMainWindow::PatternUnitChanged);
|
||||
connect(comboBoxUnits, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TMainWindow::PatternUnitChanged);
|
||||
|
||||
ui->toolBarGradation->addWidget(comboBoxUnits);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ PreferencesConfigurationPage::PreferencesConfigurationPage(QWidget *parent)
|
|||
ui->autoSaveCheck->setChecked(qApp->ValentinaSettings()->GetAutosaveState());
|
||||
|
||||
InitLanguages(ui->langCombo);
|
||||
connect(ui->langCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [this]()
|
||||
connect(ui->langCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this]()
|
||||
{
|
||||
m_langChanged = true;
|
||||
});
|
||||
|
@ -60,7 +60,7 @@ PreferencesConfigurationPage::PreferencesConfigurationPage(QWidget *parent)
|
|||
|
||||
//----------------------- Unit setup
|
||||
InitUnits();
|
||||
connect(ui->unitCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [this]()
|
||||
connect(ui->unitCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this]()
|
||||
{
|
||||
m_unitChanged = true;
|
||||
});
|
||||
|
@ -73,7 +73,7 @@ PreferencesConfigurationPage::PreferencesConfigurationPage(QWidget *parent)
|
|||
{
|
||||
ui->labelCombo->setCurrentIndex(index);
|
||||
}
|
||||
connect(ui->labelCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [this]()
|
||||
connect(ui->labelCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this]()
|
||||
{
|
||||
m_labelLangChanged = true;
|
||||
});
|
||||
|
@ -81,7 +81,7 @@ PreferencesConfigurationPage::PreferencesConfigurationPage(QWidget *parent)
|
|||
//---------------------- Pattern making system
|
||||
InitPMSystems(ui->systemCombo);
|
||||
ui->systemBookValueLabel->setFixedHeight(4 * QFontMetrics(ui->systemBookValueLabel->font()).lineSpacing());
|
||||
connect(ui->systemCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [this]()
|
||||
connect(ui->systemCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this]()
|
||||
{
|
||||
m_systemChanged = true;
|
||||
QString text = qApp->TrVars()->PMSystemAuthor(ui->systemCombo->currentData().toString());
|
||||
|
|
|
@ -71,34 +71,34 @@ DialogLayoutSettings::DialogLayoutSettings(VLayoutGenerator *generator, QWidget
|
|||
RestoreDefaults();
|
||||
}
|
||||
|
||||
connect(ui->comboBoxPrinter, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxPrinter, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogLayoutSettings::PrinterMargins);
|
||||
|
||||
connect(ui->comboBoxTemplates, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxTemplates, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogLayoutSettings::TemplateSelected);
|
||||
connect(ui->comboBoxPaperSizeUnit, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxPaperSizeUnit, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogLayoutSettings::ConvertPaperSize);
|
||||
|
||||
connect(ui->doubleSpinBoxPaperWidth, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||
connect(ui->doubleSpinBoxPaperWidth, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &DialogLayoutSettings::PaperSizeChanged);
|
||||
connect(ui->doubleSpinBoxPaperHeight, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||
connect(ui->doubleSpinBoxPaperHeight, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &DialogLayoutSettings::PaperSizeChanged);
|
||||
|
||||
connect(ui->doubleSpinBoxPaperWidth, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||
connect(ui->doubleSpinBoxPaperWidth, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &DialogLayoutSettings::FindTemplate);
|
||||
connect(ui->doubleSpinBoxPaperHeight, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||
connect(ui->doubleSpinBoxPaperHeight, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &DialogLayoutSettings::FindTemplate);
|
||||
|
||||
connect(ui->doubleSpinBoxPaperWidth, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||
connect(ui->doubleSpinBoxPaperWidth, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &DialogLayoutSettings::CorrectMaxFileds);
|
||||
connect(ui->doubleSpinBoxPaperHeight, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||
connect(ui->doubleSpinBoxPaperHeight, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &DialogLayoutSettings::CorrectMaxFileds);
|
||||
|
||||
connect(ui->checkBoxIgnoreFileds, &QCheckBox::stateChanged, this, &DialogLayoutSettings::IgnoreAllFields);
|
||||
|
||||
connect(ui->toolButtonPortrait, &QToolButton::toggled, this, &DialogLayoutSettings::Swap);
|
||||
connect(ui->toolButtonLandscape, &QToolButton::toggled, this, &DialogLayoutSettings::Swap);
|
||||
connect(ui->comboBoxLayoutUnit, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxLayoutUnit, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogLayoutSettings::ConvertLayoutSize);
|
||||
|
||||
QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
|
||||
|
|
|
@ -156,10 +156,8 @@ DialogPatternProperties::DialogPatternProperties(VPattern *doc, VContainer *pat
|
|||
|
||||
ui->radioButtonDefFromP->setChecked(doc->IsDefCustom());
|
||||
|
||||
connect(ui->comboBoxHeight, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
this, DefValueChanged);
|
||||
connect(ui->comboBoxSize, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
this, DefValueChanged);
|
||||
connect(ui->comboBoxHeight, QOverload<int>::of(&QComboBox::currentIndexChanged), this, DefValueChanged);
|
||||
connect(ui->comboBoxSize, QOverload<int>::of(&QComboBox::currentIndexChanged), this, DefValueChanged);
|
||||
|
||||
const bool readOnly = doc->IsReadOnly();
|
||||
ui->checkBoxPatternReadOnly->setChecked(readOnly);
|
||||
|
@ -207,9 +205,9 @@ DialogPatternProperties::DialogPatternProperties(VPattern *doc, VContainer *pat
|
|||
VCommonSettings::PredefinedTimeFormats() + settings->GetUserDefinedTimeFormats(),
|
||||
doc->GetLabelTimeFormat());
|
||||
|
||||
connect(ui->comboBoxDateFormat, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxDateFormat, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPatternProperties::LabelDataChanged);
|
||||
connect(ui->comboBoxTimeFormat, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxTimeFormat, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPatternProperties::LabelDataChanged);
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ DialogSaveLayout::DialogSaveLayout(int count, Draw mode, const QString &fileName
|
|||
|
||||
connect(bOk, &QPushButton::clicked, this, &DialogSaveLayout::Save);
|
||||
connect(ui->lineEditFileName, &QLineEdit::textChanged, this, &DialogSaveLayout::ShowExample);
|
||||
connect(ui->comboBoxFormat, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxFormat, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogSaveLayout::ShowExample);
|
||||
connect(ui->pushButtonBrowse, &QPushButton::clicked, this, [this]()
|
||||
{
|
||||
|
@ -141,17 +141,17 @@ DialogSaveLayout::DialogSaveLayout(int count, Draw mode, const QString &fileName
|
|||
ReadSettings();
|
||||
|
||||
// connect for the template drop down box of the tiled pds
|
||||
connect(ui->comboBoxTemplates, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxTemplates, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogSaveLayout::WriteSettings);
|
||||
|
||||
// connects for the margins of the tiled pdf
|
||||
connect(ui->doubleSpinBoxLeftField, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||
connect(ui->doubleSpinBoxLeftField, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &DialogSaveLayout::WriteSettings);
|
||||
connect(ui->doubleSpinBoxTopField, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||
connect(ui->doubleSpinBoxTopField, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &DialogSaveLayout::WriteSettings);
|
||||
connect(ui->doubleSpinBoxRightField, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||
connect(ui->doubleSpinBoxRightField, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &DialogSaveLayout::WriteSettings);
|
||||
connect(ui->doubleSpinBoxBottomField, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||
connect(ui->doubleSpinBoxBottomField, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &DialogSaveLayout::WriteSettings);
|
||||
|
||||
// connects for the orientation buttons for the tiled pdf
|
||||
|
|
|
@ -1907,8 +1907,7 @@ void MainWindow::ToolBarOption()
|
|||
// set default height
|
||||
SetDefaultHeight();
|
||||
|
||||
connect(gradationHeights.data(),
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(gradationHeights.data(), QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &MainWindow::ChangedHeight);
|
||||
|
||||
gradationSizesLabel = new QLabel(tr("Size:"), this);
|
||||
|
@ -1917,8 +1916,7 @@ void MainWindow::ToolBarOption()
|
|||
// set default size
|
||||
SetDefaultSize();
|
||||
|
||||
connect(gradationSizes.data(),
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(gradationSizes.data(), QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &MainWindow::ChangedSize);
|
||||
|
||||
ui->toolBarOption->addSeparator();
|
||||
|
@ -1931,7 +1929,7 @@ void MainWindow::ToolBarOption()
|
|||
doubleSpinBoxScale->setDecimals(1);
|
||||
doubleSpinBoxScale->setSuffix("%");
|
||||
ScaleChanged(ui->view->transform().m11());
|
||||
connect(doubleSpinBoxScale.data(), static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
|
||||
connect(doubleSpinBoxScale.data(), QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, [this](double d){ui->view->Zoom(d/100.0);});
|
||||
ui->toolBarOption->addWidget(doubleSpinBoxScale);
|
||||
|
||||
|
@ -1979,7 +1977,7 @@ void MainWindow::ToolBarDraws()
|
|||
ui->toolBarDraws->addWidget(comboBoxDraws);
|
||||
comboBoxDraws->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
||||
comboBoxDraws->setEnabled(false);
|
||||
connect(comboBoxDraws, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(comboBoxDraws, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this](int index){ChangePP(index);});
|
||||
|
||||
connect(ui->actionOptionDraw, &QAction::triggered, this, [this]()
|
||||
|
|
86
src/libs/vmisc/backport/qoverload.h
Normal file
86
src/libs/vmisc/backport/qoverload.h
Normal file
|
@ -0,0 +1,86 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file qoverload.h
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 12 1, 2018
|
||||
**
|
||||
** @brief
|
||||
** @copyright
|
||||
** This source code is part of the Valentina project, a pattern making
|
||||
** program, whose allow create and modeling patterns of clothing.
|
||||
** Copyright (C) 2018 Valentina project
|
||||
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
|
||||
**
|
||||
** Valentina is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** Valentina is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
||||
**
|
||||
*************************************************************************/
|
||||
#ifndef QOVERLOAD_H
|
||||
#define QOVERLOAD_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||
#if defined(Q_COMPILER_VARIADIC_TEMPLATES)
|
||||
|
||||
template <typename... Args>
|
||||
struct QNonConstOverload
|
||||
{
|
||||
template <typename R, typename T>
|
||||
Q_DECL_CONSTEXPR auto operator()(R (T::*ptr)(Args...)) const Q_DECL_NOTHROW -> decltype(ptr)
|
||||
{ return ptr; }
|
||||
|
||||
template <typename R, typename T>
|
||||
static Q_DECL_CONSTEXPR auto of(R (T::*ptr)(Args...)) Q_DECL_NOTHROW -> decltype(ptr)
|
||||
{ return ptr; }
|
||||
};
|
||||
|
||||
template <typename... Args>
|
||||
struct QConstOverload
|
||||
{
|
||||
template <typename R, typename T>
|
||||
Q_DECL_CONSTEXPR auto operator()(R (T::*ptr)(Args...) const) const Q_DECL_NOTHROW -> decltype(ptr)
|
||||
{ return ptr; }
|
||||
|
||||
template <typename R, typename T>
|
||||
static Q_DECL_CONSTEXPR auto of(R (T::*ptr)(Args...) const) Q_DECL_NOTHROW -> decltype(ptr)
|
||||
{ return ptr; }
|
||||
};
|
||||
|
||||
template <typename... Args>
|
||||
struct QOverload : QConstOverload<Args...>, QNonConstOverload<Args...>
|
||||
{
|
||||
using QConstOverload<Args...>::of;
|
||||
using QConstOverload<Args...>::operator();
|
||||
using QNonConstOverload<Args...>::of;
|
||||
using QNonConstOverload<Args...>::operator();
|
||||
|
||||
template <typename R>
|
||||
Q_DECL_CONSTEXPR auto operator()(R (*ptr)(Args...)) const Q_DECL_NOTHROW -> decltype(ptr)
|
||||
{ return ptr; }
|
||||
|
||||
template <typename R>
|
||||
static Q_DECL_CONSTEXPR auto of(R (*ptr)(Args...)) Q_DECL_NOTHROW -> decltype(ptr)
|
||||
{ return ptr; }
|
||||
};
|
||||
|
||||
#if defined(__cpp_variable_templates) && __cpp_variable_templates >= 201304 // C++14
|
||||
template <typename... Args> Q_CONSTEXPR Q_DECL_UNUSED QOverload<Args...> qOverload = {};
|
||||
template <typename... Args> Q_CONSTEXPR Q_DECL_UNUSED QConstOverload<Args...> qConstOverload = {};
|
||||
template <typename... Args> Q_CONSTEXPR Q_DECL_UNUSED QNonConstOverload<Args...> qNonConstOverload = {};
|
||||
#endif
|
||||
|
||||
#endif // Q_COMPILER_VARIADIC_TEMPLATES
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||
|
||||
#endif // QOVERLOAD_H
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
#include <QtGlobal>
|
||||
|
||||
#include "backport/qoverload.h"
|
||||
|
||||
#define PRINTDPI 96.0
|
||||
extern const qreal PrintDPI;
|
||||
|
||||
|
|
|
@ -35,7 +35,8 @@ HEADERS += \
|
|||
$$PWD/diagnostic.h \
|
||||
$$PWD/dialogs/dialogexporttocsv.h \
|
||||
$$PWD/customevents.h \
|
||||
$$PWD/defglobal.h
|
||||
$$PWD/defglobal.h \
|
||||
$$PWD/backport/qoverload.h
|
||||
|
||||
# Qt's versions
|
||||
# 5.2.0, 5.2.1
|
||||
|
|
|
@ -74,8 +74,7 @@ QWidget* VPE::VEnumProperty::createEditor(QWidget * parent, const QStyleOptionVi
|
|||
tmpEditor->setLocale(parent->locale());
|
||||
tmpEditor->addItems(EnumerationLiterals);
|
||||
tmpEditor->setCurrentIndex(VProperty::d_ptr->VariantValue.toInt());
|
||||
connect(tmpEditor, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
&VEnumProperty::currentIndexChanged);
|
||||
connect(tmpEditor, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &VEnumProperty::currentIndexChanged);
|
||||
|
||||
VProperty::d_ptr->editor = tmpEditor;
|
||||
return VProperty::d_ptr->editor;
|
||||
|
|
|
@ -101,8 +101,8 @@ QWidget *VPE::VLineColorProperty::createEditor(QWidget *parent, const QStyleOpti
|
|||
|
||||
tmpEditor->setLocale(parent->locale());
|
||||
tmpEditor->setCurrentIndex(VProperty::d_ptr->VariantValue.toInt());
|
||||
connect(tmpEditor, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
&VLineColorProperty::currentIndexChanged);
|
||||
connect(tmpEditor, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&VLineColorProperty::currentIndexChanged);
|
||||
|
||||
VProperty::d_ptr->editor = tmpEditor;
|
||||
return VProperty::d_ptr->editor;
|
||||
|
|
|
@ -94,8 +94,8 @@ QWidget *VPE::VLineTypeProperty::createEditor(QWidget *parent, const QStyleOptio
|
|||
}
|
||||
|
||||
tmpEditor->setCurrentIndex(VProperty::d_ptr->VariantValue.toInt());
|
||||
connect(tmpEditor, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
&VLineTypeProperty::currentIndexChanged);
|
||||
connect(tmpEditor, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&VLineTypeProperty::currentIndexChanged);
|
||||
|
||||
VProperty::d_ptr->editor = tmpEditor;
|
||||
return VProperty::d_ptr->editor;
|
||||
|
|
|
@ -62,8 +62,7 @@ QWidget* VPE::VIntegerProperty::createEditor(QWidget * parent, const QStyleOptio
|
|||
tmpEditor->setSingleStep(static_cast<int>(singleStep));
|
||||
tmpEditor->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
tmpEditor->setValue(VProperty::d_ptr->VariantValue.toInt());
|
||||
connect(tmpEditor, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
||||
&VIntegerProperty::valueChanged);
|
||||
connect(tmpEditor, QOverload<int>::of(&QSpinBox::valueChanged), this, &VIntegerProperty::valueChanged);
|
||||
|
||||
VProperty::d_ptr->editor = tmpEditor;
|
||||
return VProperty::d_ptr->editor;
|
||||
|
@ -170,8 +169,7 @@ QWidget* VPE::VDoubleProperty::createEditor(QWidget * parent, const QStyleOption
|
|||
tmpEditor->setSingleStep(singleStep);
|
||||
tmpEditor->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
tmpEditor->setValue(VProperty::d_ptr->VariantValue.toDouble());
|
||||
connect(tmpEditor, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged), this,
|
||||
&VIntegerProperty::valueChanged);
|
||||
connect(tmpEditor, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &VIntegerProperty::valueChanged);
|
||||
|
||||
VProperty::d_ptr->editor = tmpEditor;
|
||||
return VProperty::d_ptr->editor;
|
||||
|
|
|
@ -67,7 +67,7 @@ QWidget* VPE::VObjectProperty::createEditor(QWidget * parent, const QStyleOption
|
|||
tmpEditor->setLocale(parent->locale());
|
||||
FillList(tmpEditor, objects);
|
||||
tmpEditor->setCurrentIndex(tmpEditor->findData(VProperty::d_ptr->VariantValue.toUInt()));
|
||||
connect(tmpEditor, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(tmpEditor, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&VObjectProperty::currentIndexChanged);
|
||||
|
||||
VProperty::d_ptr->editor = tmpEditor;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <QtGlobal>
|
||||
|
||||
#include "vpropertyexplorer_global.h"
|
||||
#include "../vmisc/backport/qoverload.h"
|
||||
|
||||
template <typename T> class QList;
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ DialogEditLabel::DialogEditLabel(VAbstractPattern *doc, QWidget *parent)
|
|||
connect(ui->toolButtonNewLabel, &QToolButton::clicked, this, &DialogEditLabel::NewTemplate);
|
||||
connect(ui->toolButtonExportLabel, &QToolButton::clicked, this, &DialogEditLabel::ExportTemplate);
|
||||
connect(ui->toolButtonImportLabel, &QToolButton::clicked, this, &DialogEditLabel::ImportTemplate);
|
||||
connect(ui->spinBoxFontSize, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
||||
connect(ui->spinBoxFontSize, QOverload<int>::of(&QSpinBox::valueChanged), this,
|
||||
&DialogEditLabel::SaveAdditionalFontSize);
|
||||
|
||||
InitPlaceholders();
|
||||
|
|
|
@ -89,9 +89,9 @@ DialogAlongLine::DialogAlongLine(const VContainer *data, const quint32 &toolId,
|
|||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogAlongLine::NamePointChanged);
|
||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogAlongLine::FormulaTextChanged);
|
||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogAlongLine::DeployFormulaTextEdit);
|
||||
connect(ui->comboBoxFirstPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxFirstPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogAlongLine::PointChanged);
|
||||
connect(ui->comboBoxSecondPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxSecondPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogAlongLine::PointChanged);
|
||||
|
||||
vis = new VisToolAlongLine(data);
|
||||
|
|
|
@ -82,11 +82,11 @@ DialogBisector::DialogBisector(const VContainer *data, const quint32 &toolId, QW
|
|||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogBisector::NamePointChanged);
|
||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogBisector::FormulaTextChanged);
|
||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogBisector::DeployFormulaTextEdit);
|
||||
connect(ui->comboBoxFirstPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxFirstPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogBisector::PointNameChanged);
|
||||
connect(ui->comboBoxSecondPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxSecondPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogBisector::PointNameChanged);
|
||||
connect(ui->comboBoxThirdPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxThirdPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogBisector::PointNameChanged);
|
||||
|
||||
vis = new VisToolBisector(data);
|
||||
|
|
|
@ -64,13 +64,13 @@ DialogCubicBezier::DialogCubicBezier(const VContainer *data, const quint32 &tool
|
|||
|
||||
DialogTool::CheckState();
|
||||
|
||||
connect(ui->comboBoxP1, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP1, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogCubicBezier::PointNameChanged);
|
||||
connect(ui->comboBoxP2, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP2, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogCubicBezier::PointNameChanged);
|
||||
connect(ui->comboBoxP3, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP3, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogCubicBezier::PointNameChanged);
|
||||
connect(ui->comboBoxP4, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP4, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogCubicBezier::PointNameChanged);
|
||||
|
||||
vis = new VisToolCubicBezier(data);
|
||||
|
|
|
@ -76,7 +76,7 @@ DialogCubicBezierPath::DialogCubicBezierPath(const VContainer *data, const quint
|
|||
ui->doubleSpinBoxApproximationScale->setMaximum(maxCurveApproximationScale);
|
||||
|
||||
connect(ui->listWidget, &QListWidget::currentRowChanged, this, &DialogCubicBezierPath::PointChanged);
|
||||
connect(ui->comboBoxPoint, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxPoint, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogCubicBezierPath::currentPointChanged);
|
||||
|
||||
vis = new VisToolCubicBezierPath(data);
|
||||
|
|
|
@ -79,7 +79,7 @@ DialogFlippingByAxis::DialogFlippingByAxis(const VContainer *data, const quint32
|
|||
CheckState();
|
||||
|
||||
connect(ui->lineEditSuffix, &QLineEdit::textChanged, this, &DialogFlippingByAxis::SuffixChanged);
|
||||
connect(ui->comboBoxOriginPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxOriginPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogFlippingByAxis::PointChanged);
|
||||
|
||||
vis = new VisToolFlippingByAxis(data);
|
||||
|
|
|
@ -79,11 +79,9 @@ DialogFlippingByLine::DialogFlippingByLine(const VContainer *data, const quint32
|
|||
CheckState();
|
||||
|
||||
connect(ui->lineEditSuffix, &QLineEdit::textChanged, this, &DialogFlippingByLine::SuffixChanged);
|
||||
connect(ui->comboBoxFirstLinePoint,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxFirstLinePoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogFlippingByLine::PointChanged);
|
||||
connect(ui->comboBoxSecondLinePoint,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxSecondLinePoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogFlippingByLine::PointChanged);
|
||||
|
||||
vis = new VisToolFlippingByLine(data);
|
||||
|
|
|
@ -76,11 +76,11 @@ DialogHeight::DialogHeight(const VContainer *data, const quint32 &toolId, QWidge
|
|||
FillComboBoxLineColors(ui->comboBoxLineColor);
|
||||
|
||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogHeight::NamePointChanged);
|
||||
connect(ui->comboBoxBasePoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxBasePoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogHeight::PointNameChanged);
|
||||
connect(ui->comboBoxP1Line, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP1Line, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogHeight::PointNameChanged);
|
||||
connect(ui->comboBoxP2Line, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP2Line, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogHeight::PointNameChanged);
|
||||
|
||||
vis = new VisToolHeight(data);
|
||||
|
|
|
@ -64,9 +64,9 @@ DialogLine::DialogLine(const VContainer *data, const quint32 &toolId, QWidget *p
|
|||
|
||||
number = 0;
|
||||
|
||||
connect(ui->comboBoxFirstPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxFirstPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogLine::PointNameChanged);
|
||||
connect(ui->comboBoxSecondPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxSecondPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogLine::PointNameChanged);
|
||||
|
||||
vis = new VisToolLine(data);
|
||||
|
|
|
@ -74,13 +74,13 @@ DialogLineIntersect::DialogLineIntersect(const VContainer *data, const quint32 &
|
|||
FillComboBoxPoints(ui->comboBoxP2Line2);
|
||||
|
||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogLineIntersect::NamePointChanged);
|
||||
connect(ui->comboBoxP1Line1, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP1Line1, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogLineIntersect::PointNameChanged);
|
||||
connect(ui->comboBoxP2Line1, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP2Line1, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogLineIntersect::PointNameChanged);
|
||||
connect(ui->comboBoxP1Line2, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP1Line2, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogLineIntersect::PointNameChanged);
|
||||
connect(ui->comboBoxP2Line2, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP2Line2, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogLineIntersect::PointNameChanged);
|
||||
|
||||
vis = new VisToolLineIntersect(data);
|
||||
|
@ -160,17 +160,13 @@ void DialogLineIntersect::ChosenObject(quint32 id, const SceneObject &type)
|
|||
{
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
connect(ui->comboBoxP1Line1,
|
||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(ui->comboBoxP1Line1, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&DialogLineIntersect::PointChanged);
|
||||
connect(ui->comboBoxP2Line1,
|
||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(ui->comboBoxP2Line1, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&DialogLineIntersect::PointChanged);
|
||||
connect(ui->comboBoxP1Line2,
|
||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(ui->comboBoxP1Line2, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&DialogLineIntersect::PointChanged);
|
||||
connect(ui->comboBoxP2Line2,
|
||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(ui->comboBoxP2Line2, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&DialogLineIntersect::PointChanged);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,13 +91,11 @@ DialogLineIntersectAxis::DialogLineIntersectAxis(const VContainer *data, const q
|
|||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogLineIntersectAxis::AngleTextChanged);
|
||||
connect(ui->pushButtonGrowLengthAngle, &QPushButton::clicked, this, &DialogLineIntersectAxis::DeployAngleTextEdit);
|
||||
connect(timerFormula, &QTimer::timeout, this, &DialogLineIntersectAxis::EvalAngle);
|
||||
connect(ui->comboBoxFirstLinePoint,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxFirstLinePoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogLineIntersectAxis::PointNameChanged);
|
||||
connect(ui->comboBoxSecondLinePoint,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxSecondLinePoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogLineIntersectAxis::PointNameChanged);
|
||||
connect(ui->comboBoxAxisPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxAxisPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogLineIntersectAxis::PointNameChanged);
|
||||
|
||||
vis = new VisToolLineIntersectAxis(data);
|
||||
|
|
|
@ -84,9 +84,9 @@ DialogNormal::DialogNormal(const VContainer *data, const quint32 &toolId, QWidge
|
|||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogNormal::NamePointChanged);
|
||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogNormal::FormulaTextChanged);
|
||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogNormal::DeployFormulaTextEdit);
|
||||
connect(ui->comboBoxFirstPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxFirstPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogNormal::PointNameChanged);
|
||||
connect(ui->comboBoxSecondPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxSecondPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogNormal::PointNameChanged);
|
||||
|
||||
vis = new VisToolNormal(data);
|
||||
|
|
|
@ -79,8 +79,7 @@ DialogPointFromCircleAndTangent::DialogPointFromCircleAndTangent(const VContaine
|
|||
FillComboBoxCrossCirclesPoints(ui->comboBoxResult);
|
||||
|
||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogPointFromCircleAndTangent::NamePointChanged);
|
||||
connect(ui->comboBoxCircleCenter,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxCircleCenter, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPointFromCircleAndTangent::PointChanged);
|
||||
|
||||
connect(ui->toolButtonExprRadius, &QPushButton::clicked, this,
|
||||
|
|
|
@ -80,11 +80,11 @@ DialogPointOfContact::DialogPointOfContact(const VContainer *data, const quint32
|
|||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogPointOfContact::NamePointChanged);
|
||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogPointOfContact::FormulaTextChanged);
|
||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogPointOfContact::DeployFormulaTextEdit);
|
||||
connect(ui->comboBoxFirstPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxFirstPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPointOfContact::PointNameChanged);
|
||||
connect(ui->comboBoxSecondPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxSecondPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPointOfContact::PointNameChanged);
|
||||
connect(ui->comboBoxCenter, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxCenter, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPointOfContact::PointNameChanged);
|
||||
|
||||
vis = new VisToolPointOfContact(data);
|
||||
|
|
|
@ -65,9 +65,9 @@ DialogPointOfIntersection::DialogPointOfIntersection(const VContainer *data, con
|
|||
FillComboBoxPoints(ui->comboBoxSecondPoint);
|
||||
|
||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogPointOfIntersection::NamePointChanged);
|
||||
connect(ui->comboBoxFirstPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxFirstPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPointOfIntersection::PointNameChanged);
|
||||
connect(ui->comboBoxSecondPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxSecondPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPointOfIntersection::PointNameChanged);
|
||||
|
||||
vis = new VisToolPointOfIntersection(data);
|
||||
|
|
|
@ -60,9 +60,9 @@ DialogPointOfIntersectionArcs::DialogPointOfIntersectionArcs(const VContainer *d
|
|||
FillComboBoxCrossCirclesPoints(ui->comboBoxResult);
|
||||
|
||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogPointOfIntersectionArcs::NamePointChanged);
|
||||
connect(ui->comboBoxArc1, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxArc1, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPointOfIntersectionArcs::ArcChanged);
|
||||
connect(ui->comboBoxArc1, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxArc1, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPointOfIntersectionArcs::ArcChanged);
|
||||
|
||||
vis = new VisToolPointOfIntersectionArcs(data);
|
||||
|
|
|
@ -85,11 +85,9 @@ DialogPointOfIntersectionCircles::DialogPointOfIntersectionCircles(const VContai
|
|||
FillComboBoxCrossCirclesPoints(ui->comboBoxResult);
|
||||
|
||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogPointOfIntersectionCircles::NamePointChanged);
|
||||
connect(ui->comboBoxCircle1Center,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxCircle1Center, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPointOfIntersectionCircles::PointChanged);
|
||||
connect(ui->comboBoxCircle2Center,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxCircle2Center, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPointOfIntersectionCircles::PointChanged);
|
||||
|
||||
connect(ui->toolButtonExprCircle1Radius, &QPushButton::clicked, this,
|
||||
|
|
|
@ -63,9 +63,9 @@ DialogPointOfIntersectionCurves::DialogPointOfIntersectionCurves(const VContaine
|
|||
FillComboBoxHCrossCurvesPoint(ui->comboBoxHCorrection);
|
||||
|
||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogPointOfIntersectionCurves::NamePointChanged);
|
||||
connect(ui->comboBoxCurve1, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxCurve1, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPointOfIntersectionCurves::CurveChanged);
|
||||
connect(ui->comboBoxCurve2, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxCurve2, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPointOfIntersectionCurves::CurveChanged);
|
||||
|
||||
vis = new VisToolPointOfIntersectionCurves(data);
|
||||
|
|
|
@ -97,7 +97,7 @@ DialogRotation::DialogRotation(const VContainer *data, const quint32 &toolId, QW
|
|||
connect(ui->toolButtonExprAngle, &QPushButton::clicked, this, &DialogRotation::FXAngle);
|
||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogRotation::AngleChanged);
|
||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogRotation::DeployAngleTextEdit);
|
||||
connect(ui->comboBoxOriginPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxOriginPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogRotation::PointChanged);
|
||||
|
||||
vis = new VisToolRotation(data);
|
||||
|
|
|
@ -84,11 +84,11 @@ DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, const quint32 &
|
|||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogShoulderPoint::NamePointChanged);
|
||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogShoulderPoint::FormulaTextChanged);
|
||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogShoulderPoint::DeployFormulaTextEdit);
|
||||
connect(ui->comboBoxP1Line, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP1Line, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogShoulderPoint::PointNameChanged);
|
||||
connect(ui->comboBoxP2Line, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP2Line, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogShoulderPoint::PointNameChanged);
|
||||
connect(ui->comboBoxP3, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP3, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogShoulderPoint::PointNameChanged);
|
||||
|
||||
vis = new VisToolShoulderPoint(data);
|
||||
|
|
|
@ -111,9 +111,9 @@ DialogSpline::DialogSpline(const VContainer *data, const quint32 &toolId, QWidge
|
|||
|
||||
CheckState();
|
||||
|
||||
connect(ui->comboBoxP1, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP1, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogSpline::PointNameChanged);
|
||||
connect(ui->comboBoxP4, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxP4, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogSpline::PointNameChanged);
|
||||
|
||||
connect(ui->toolButtonExprAngle1, &QPushButton::clicked, this, &DialogSpline::FXAngle1);
|
||||
|
|
|
@ -108,7 +108,7 @@ DialogSplinePath::DialogSplinePath(const VContainer *data, const quint32 &toolId
|
|||
ui->doubleSpinBoxApproximationScale->setMaximum(maxCurveApproximationScale);
|
||||
|
||||
connect(ui->listWidget, &QListWidget::currentRowChanged, this, &DialogSplinePath::PointChanged);
|
||||
connect(ui->comboBoxPoint, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxPoint, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogSplinePath::currentPointChanged);
|
||||
|
||||
connect(ui->toolButtonExprAngle1, &QPushButton::clicked, this, &DialogSplinePath::FXAngle1);
|
||||
|
|
|
@ -67,13 +67,13 @@ DialogTriangle::DialogTriangle(const VContainer *data, const quint32 &toolId, QW
|
|||
FillComboBoxPoints(ui->comboBoxSecondPoint);
|
||||
|
||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogTriangle::NamePointChanged);
|
||||
connect(ui->comboBoxFirstPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxFirstPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogTriangle::PointNameChanged);
|
||||
connect(ui->comboBoxSecondPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxSecondPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogTriangle::PointNameChanged);
|
||||
connect(ui->comboBoxAxisP1, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxAxisP1, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogTriangle::PointNameChanged);
|
||||
connect(ui->comboBoxAxisP2, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxAxisP2, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogTriangle::PointNameChanged);
|
||||
|
||||
vis = new VisToolTriangle(data);
|
||||
|
|
|
@ -71,20 +71,15 @@ DialogTrueDarts::DialogTrueDarts(const VContainer *data, const quint32 &toolId,
|
|||
|
||||
connect(ui->lineEditFirstNewDartPoint, &QLineEdit::textChanged, this, &DialogTrueDarts::NameDartPoint1Changed);
|
||||
connect(ui->lineEditSecondNewDartPoint, &QLineEdit::textChanged, this, &DialogTrueDarts::NameDartPoint2Changed);
|
||||
connect(ui->comboBoxFirstBasePoint,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxFirstBasePoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogTrueDarts::PointNameChanged);
|
||||
connect(ui->comboBoxSecondBasePoint,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxSecondBasePoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogTrueDarts::PointNameChanged);
|
||||
connect(ui->comboBoxFirstDartPoint,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxFirstDartPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogTrueDarts::PointNameChanged);
|
||||
connect(ui->comboBoxSecondDartPoint,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxSecondDartPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogTrueDarts::PointNameChanged);
|
||||
connect(ui->comboBoxThirdDartPoint,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxThirdDartPoint, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogTrueDarts::PointNameChanged);
|
||||
|
||||
vis = new VisToolTrueDarts(data);
|
||||
|
|
|
@ -43,7 +43,7 @@ DialogInsertNode::DialogInsertNode(const VContainer *data, quint32 toolId, QWidg
|
|||
CheckPieces();
|
||||
CheckItem();
|
||||
|
||||
connect(ui->comboBoxPiece, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [this]()
|
||||
connect(ui->comboBoxPiece, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this]()
|
||||
{
|
||||
CheckPieces();
|
||||
});
|
||||
|
|
|
@ -74,7 +74,7 @@ DialogPiecePath::DialogPiecePath(const VContainer *data, quint32 toolId, QWidget
|
|||
ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabSeamAllowance));
|
||||
ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabPassmarks));
|
||||
|
||||
connect(ui->comboBoxPiece, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [this]()
|
||||
connect(ui->comboBoxPiece, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this]()
|
||||
{
|
||||
ValidObjects(PathIsValid());
|
||||
});
|
||||
|
@ -792,7 +792,7 @@ void DialogPiecePath::InitPathTab()
|
|||
connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogPiecePath::NameChanged);
|
||||
|
||||
InitPathTypes();
|
||||
connect(ui->comboBoxType, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxType, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
[this]()
|
||||
{
|
||||
ui->comboBoxPenType->setEnabled(GetType() == PiecePathType::InternalPath);
|
||||
|
@ -826,14 +826,14 @@ void DialogPiecePath::InitSeamAllowanceTab()
|
|||
ui->plainTextEditFormulaWidth->setPlainText(qApp->LocaleToString(m_saWidth));
|
||||
|
||||
InitNodesList();
|
||||
connect(ui->comboBoxNodes, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(ui->comboBoxNodes, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&DialogPiecePath::NodeChanged);
|
||||
|
||||
connect(ui->pushButtonDefBefore, &QPushButton::clicked, this, &DialogPiecePath::ReturnDefBefore);
|
||||
connect(ui->pushButtonDefAfter, &QPushButton::clicked, this, &DialogPiecePath::ReturnDefAfter);
|
||||
|
||||
InitNodeAngles(ui->comboBoxAngle);
|
||||
connect(ui->comboBoxAngle, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(ui->comboBoxAngle, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&DialogPiecePath::NodeAngleChanged);
|
||||
|
||||
connect(ui->toolButtonExprWidth, &QPushButton::clicked, this, &DialogPiecePath::FXWidth);
|
||||
|
@ -857,12 +857,12 @@ void DialogPiecePath::InitSeamAllowanceTab()
|
|||
void DialogPiecePath::InitPassmarksTab()
|
||||
{
|
||||
InitPassmarksList();
|
||||
connect(ui->comboBoxPassmarks, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(ui->comboBoxPassmarks, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogPiecePath::PassmarkChanged);
|
||||
|
||||
connect(ui->buttonGroupMarkType, static_cast<void(QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked),
|
||||
connect(ui->buttonGroupMarkType, QOverload<int>::of(&QButtonGroup::buttonClicked),
|
||||
this, &DialogPiecePath::PassmarkLineTypeChanged);
|
||||
connect(ui->buttonGroupAngleType, static_cast<void(QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked),
|
||||
connect(ui->buttonGroupAngleType, QOverload<int>::of(&QButtonGroup::buttonClicked),
|
||||
this, &DialogPiecePath::PassmarkAngleTypeChanged);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ DialogPin::DialogPin(const VContainer *data, quint32 toolId, QWidget *parent)
|
|||
flagError = false;
|
||||
CheckState();
|
||||
|
||||
connect(ui->comboBoxPiece, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [this]()
|
||||
connect(ui->comboBoxPiece, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this]()
|
||||
{
|
||||
CheckPieces();
|
||||
});
|
||||
|
|
|
@ -89,7 +89,7 @@ DialogPlaceLabel::DialogPlaceLabel(const VContainer *data, quint32 toolId, QWidg
|
|||
connect(timerHeight, &QTimer::timeout, this, &DialogPlaceLabel::EvalHeight);
|
||||
connect(timerAngle, &QTimer::timeout, this, &DialogPlaceLabel::EvalAngle);
|
||||
|
||||
connect(ui->comboBoxPiece, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [this]()
|
||||
connect(ui->comboBoxPiece, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this]()
|
||||
{
|
||||
CheckPieces();
|
||||
});
|
||||
|
|
|
@ -2670,14 +2670,14 @@ void DialogSeamAllowance::InitSeamAllowanceTab()
|
|||
uiTabPaths->plainTextEditFormulaWidth->setPlainText(qApp->LocaleToString(m_saWidth));
|
||||
|
||||
InitNodesList();
|
||||
connect(uiTabPaths->comboBoxNodes, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(uiTabPaths->comboBoxNodes, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&DialogSeamAllowance::NodeChanged);
|
||||
|
||||
connect(uiTabPaths->pushButtonDefBefore, &QPushButton::clicked, this, &DialogSeamAllowance::ReturnDefBefore);
|
||||
connect(uiTabPaths->pushButtonDefAfter, &QPushButton::clicked, this, &DialogSeamAllowance::ReturnDefAfter);
|
||||
|
||||
InitNodeAngles(uiTabPaths->comboBoxAngle);
|
||||
connect(uiTabPaths->comboBoxAngle, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(uiTabPaths->comboBoxAngle, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&DialogSeamAllowance::NodeAngleChanged);
|
||||
|
||||
uiTabPaths->listWidgetCustomSA->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
|
@ -2685,11 +2685,11 @@ void DialogSeamAllowance::InitSeamAllowanceTab()
|
|||
&DialogSeamAllowance::ShowCustomSAContextMenu);
|
||||
connect(uiTabPaths->listWidgetCustomSA, &QListWidget::currentRowChanged, this,
|
||||
&DialogSeamAllowance::CustomSAChanged);
|
||||
connect(uiTabPaths->comboBoxStartPoint, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(uiTabPaths->comboBoxStartPoint, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogSeamAllowance::CSAStartPointChanged);
|
||||
connect(uiTabPaths->comboBoxEndPoint, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(uiTabPaths->comboBoxEndPoint, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&DialogSeamAllowance::CSAEndPointChanged);
|
||||
connect(uiTabPaths->comboBoxIncludeType, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(uiTabPaths->comboBoxIncludeType, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogSeamAllowance::CSAIncludeTypeChanged);
|
||||
|
||||
connect(uiTabPaths->toolButtonExprWidth, &QPushButton::clicked, this, &DialogSeamAllowance::FXWidth);
|
||||
|
@ -2804,11 +2804,9 @@ void DialogSeamAllowance::InitLabelsTab()
|
|||
InitPinPoint(uiTabLabels->comboBoxDLTopLeftPin);
|
||||
InitPinPoint(uiTabLabels->comboBoxDLBottomRightPin);
|
||||
|
||||
connect(uiTabLabels->comboBoxDLTopLeftPin,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(uiTabLabels->comboBoxDLTopLeftPin, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogSeamAllowance::DetailPinPointChanged);
|
||||
connect(uiTabLabels->comboBoxDLBottomRightPin,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(uiTabLabels->comboBoxDLBottomRightPin, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogSeamAllowance::DetailPinPointChanged);
|
||||
|
||||
connect(uiTabLabels->pushButtonDLWidth, &QPushButton::clicked, this, &DialogSeamAllowance::EditDLFormula);
|
||||
|
@ -2837,11 +2835,9 @@ void DialogSeamAllowance::InitLabelsTab()
|
|||
InitPinPoint(uiTabLabels->comboBoxPLTopLeftPin);
|
||||
InitPinPoint(uiTabLabels->comboBoxPLBottomRightPin);
|
||||
|
||||
connect(uiTabLabels->comboBoxPLTopLeftPin,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(uiTabLabels->comboBoxPLTopLeftPin, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogSeamAllowance::PatternPinPointChanged);
|
||||
connect(uiTabLabels->comboBoxPLBottomRightPin,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(uiTabLabels->comboBoxPLBottomRightPin, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogSeamAllowance::PatternPinPointChanged);
|
||||
|
||||
connect(uiTabLabels->pushButtonPLWidth, &QPushButton::clicked, this, &DialogSeamAllowance::EditPLFormula);
|
||||
|
@ -2891,11 +2887,9 @@ void DialogSeamAllowance::InitGrainlineTab()
|
|||
InitPinPoint(uiTabGrainline->comboBoxGrainlineTopPin);
|
||||
InitPinPoint(uiTabGrainline->comboBoxGrainlineBottomPin);
|
||||
|
||||
connect(uiTabGrainline->comboBoxGrainlineTopPin,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(uiTabGrainline->comboBoxGrainlineTopPin, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogSeamAllowance::GrainlinePinPointChanged);
|
||||
connect(uiTabGrainline->comboBoxGrainlineBottomPin,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||
connect(uiTabGrainline->comboBoxGrainlineBottomPin, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogSeamAllowance::GrainlinePinPointChanged);
|
||||
}
|
||||
|
||||
|
@ -2911,12 +2905,12 @@ void DialogSeamAllowance::InitPinsTab()
|
|||
void DialogSeamAllowance::InitPassmarksTab()
|
||||
{
|
||||
InitPassmarksList();
|
||||
connect(uiTabPassmarks->comboBoxPassmarks, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
connect(uiTabPassmarks->comboBoxPassmarks, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogSeamAllowance::PassmarkChanged);
|
||||
|
||||
connect(uiTabPassmarks->buttonGroupLineType, static_cast<void(QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked),
|
||||
connect(uiTabPassmarks->buttonGroupLineType, QOverload<int>::of(&QButtonGroup::buttonClicked),
|
||||
this, &DialogSeamAllowance::PassmarkLineTypeChanged);
|
||||
connect(uiTabPassmarks->buttonGroupAngleType, static_cast<void(QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked),
|
||||
connect(uiTabPassmarks->buttonGroupAngleType, QOverload<int>::of(&QButtonGroup::buttonClicked),
|
||||
this, &DialogSeamAllowance::PassmarkAngleTypeChanged);
|
||||
connect(uiTabPassmarks->checkBoxShowSecondPassmark, &QCheckBox::stateChanged, this,
|
||||
&DialogSeamAllowance::PassmarkShowSecondChanged);
|
||||
|
|
Loading…
Reference in New Issue
Block a user