Redesign a way we define the action.
This commit is contained in:
parent
f96fd45a90
commit
0668a99cb5
|
@ -601,8 +601,6 @@ void TMainWindow::changeEvent(QEvent *event)
|
|||
|
||||
if (mType == MeasurementsType::Multisize)
|
||||
{
|
||||
actionFullCircumference->setText(tr("Use full circumference"));
|
||||
|
||||
ui->labelMType->setText(tr("Multisize measurements"));
|
||||
|
||||
InitDimensionsBaseValue();
|
||||
|
@ -2459,14 +2457,17 @@ void TMainWindow::InitMenu()
|
|||
{
|
||||
if (mType == MeasurementsType::Multisize)
|
||||
{
|
||||
ui->menuMeasurements->addSeparator();
|
||||
// Measurements
|
||||
ui->actionUseFullCircumference->setVisible(true);
|
||||
ui->actionUseFullCircumference->setEnabled(true);
|
||||
ui->actionUseFullCircumference->setChecked(m->IsFullCircumference());
|
||||
connect(ui->actionUseFullCircumference, &QAction::triggered, this, &TMainWindow::FullCircumferenceChanged);
|
||||
|
||||
actionFullCircumference = new QAction(tr("Use full circumference"), this);
|
||||
actionFullCircumference->setCheckable(true);
|
||||
actionFullCircumference->setChecked(m->IsFullCircumference());
|
||||
ui->menuMeasurements->addAction(actionFullCircumference);
|
||||
connect(actionFullCircumference, &QAction::triggered, this, &TMainWindow::FullCircumferenceChanged);
|
||||
QAction *separator = new QAction(this);
|
||||
separator->setSeparator(true);
|
||||
ui->menuMeasurements->insertAction(ui->actionUseFullCircumference, separator);
|
||||
|
||||
// File
|
||||
ui->actionExportToIndividual->setVisible(true);
|
||||
ui->actionExportToIndividual->setEnabled(true);
|
||||
connect(ui->actionExportToIndividual, &QAction::triggered, this, &TMainWindow::ExportToIndividual);
|
||||
|
|
|
@ -164,7 +164,6 @@ private:
|
|||
QLabel *labelPatternUnit{nullptr};
|
||||
bool isInitialized{false};
|
||||
bool mIsReadOnly{false};
|
||||
QAction *actionFullCircumference{nullptr};
|
||||
QTimer *gradation;
|
||||
|
||||
QVector<QObject *> hackedWidgets{};
|
||||
|
|
|
@ -992,6 +992,7 @@
|
|||
<addaction name="actionDatabase"/>
|
||||
<addaction name="actionImportFromPattern"/>
|
||||
<addaction name="actionMeasurementDiagram"/>
|
||||
<addaction name="actionUseFullCircumference"/>
|
||||
</widget>
|
||||
<addaction name="menuFile"/>
|
||||
<addaction name="menuMeasurements"/>
|
||||
|
@ -1353,6 +1354,17 @@
|
|||
<enum>QAction::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionUseFullCircumference">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use full circumference</string>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
|
Loading…
Reference in New Issue
Block a user