Resolved issue #557. Enhance feature: Measurement menu enhancements.
--HG-- branch : develop
This commit is contained in:
parent
1b0bd37621
commit
c00a1d6e94
|
@ -1392,7 +1392,7 @@ void MainWindow::LoadIndividual()
|
||||||
doc->SetPath(RelativeMPath(curFile, mPath));
|
doc->SetPath(RelativeMPath(curFile, mPath));
|
||||||
watcher->addPath(mPath);
|
watcher->addPath(mPath);
|
||||||
PatternChangesWereSaved(false);
|
PatternChangesWereSaved(false);
|
||||||
ui->actionShowM->setEnabled(true);
|
ui->actionEditCurrent->setEnabled(true);
|
||||||
helpLabel->setText(tr("Measurements loaded"));
|
helpLabel->setText(tr("Measurements loaded"));
|
||||||
doc->LiteParseTree(Document::LiteParse);
|
doc->LiteParseTree(Document::LiteParse);
|
||||||
|
|
||||||
|
@ -1432,7 +1432,7 @@ void MainWindow::LoadStandard()
|
||||||
doc->SetPath(RelativeMPath(curFile, mPath));
|
doc->SetPath(RelativeMPath(curFile, mPath));
|
||||||
watcher->addPath(mPath);
|
watcher->addPath(mPath);
|
||||||
PatternChangesWereSaved(false);
|
PatternChangesWereSaved(false);
|
||||||
ui->actionShowM->setEnabled(true);
|
ui->actionEditCurrent->setEnabled(true);
|
||||||
helpLabel->setText(tr("Measurements loaded"));
|
helpLabel->setText(tr("Measurements loaded"));
|
||||||
doc->LiteParseTree(Document::LiteParse);
|
doc->LiteParseTree(Document::LiteParse);
|
||||||
|
|
||||||
|
@ -1468,7 +1468,7 @@ void MainWindow::UnloadMeasurements()
|
||||||
watcher->removePath(AbsoluteMPath(curFile, doc->MPath()));
|
watcher->removePath(AbsoluteMPath(curFile, doc->MPath()));
|
||||||
doc->SetPath(QString());
|
doc->SetPath(QString());
|
||||||
PatternChangesWereSaved(false);
|
PatternChangesWereSaved(false);
|
||||||
ui->actionShowM->setEnabled(false);
|
ui->actionEditCurrent->setEnabled(false);
|
||||||
ui->actionUnloadMeasurements->setDisabled(true);
|
ui->actionUnloadMeasurements->setDisabled(true);
|
||||||
helpLabel->setText(tr("Measurements unloaded"));
|
helpLabel->setText(tr("Measurements unloaded"));
|
||||||
|
|
||||||
|
@ -1518,7 +1518,7 @@ void MainWindow::ShowMeasurements()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->actionShowM->setEnabled(false);
|
ui->actionEditCurrent->setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2593,7 +2593,7 @@ void MainWindow::Clear()
|
||||||
ui->actionLoadIndividual->setEnabled(false);
|
ui->actionLoadIndividual->setEnabled(false);
|
||||||
ui->actionLoadStandard->setEnabled(false);
|
ui->actionLoadStandard->setEnabled(false);
|
||||||
ui->actionUnloadMeasurements->setEnabled(false);
|
ui->actionUnloadMeasurements->setEnabled(false);
|
||||||
ui->actionShowM->setEnabled(false);
|
ui->actionEditCurrent->setEnabled(false);
|
||||||
SetEnableTool(false);
|
SetEnableTool(false);
|
||||||
qApp->setPatternUnit(Unit::Cm);
|
qApp->setPatternUnit(Unit::Cm);
|
||||||
qApp->setPatternType(MeasurementsType::Unknown);
|
qApp->setPatternType(MeasurementsType::Unknown);
|
||||||
|
@ -3781,7 +3781,7 @@ void MainWindow::CreateActions()
|
||||||
connect(ui->actionLoadIndividual, &QAction::triggered, this, &MainWindow::LoadIndividual);
|
connect(ui->actionLoadIndividual, &QAction::triggered, this, &MainWindow::LoadIndividual);
|
||||||
connect(ui->actionLoadStandard, &QAction::triggered, this, &MainWindow::LoadStandard);
|
connect(ui->actionLoadStandard, &QAction::triggered, this, &MainWindow::LoadStandard);
|
||||||
|
|
||||||
connect(ui->actionCreateNew, &QAction::triggered, RECEIVER(this)[this]()
|
connect(ui->actionOpenTape, &QAction::triggered, RECEIVER(this)[this]()
|
||||||
{
|
{
|
||||||
const QString tape = qApp->TapeFilePath();
|
const QString tape = qApp->TapeFilePath();
|
||||||
const QString workingDirectory = QFileInfo(tape).absoluteDir().absolutePath();
|
const QString workingDirectory = QFileInfo(tape).absoluteDir().absolutePath();
|
||||||
|
@ -3795,7 +3795,7 @@ void MainWindow::CreateActions()
|
||||||
QProcess::startDetached(tape, arguments, workingDirectory);
|
QProcess::startDetached(tape, arguments, workingDirectory);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(ui->actionShowM, &QAction::triggered, this, &MainWindow::ShowMeasurements);
|
connect(ui->actionEditCurrent, &QAction::triggered, this, &MainWindow::ShowMeasurements);
|
||||||
connect(ui->actionExportAs, &QAction::triggered, this, &MainWindow::ExportLayoutAs);
|
connect(ui->actionExportAs, &QAction::triggered, this, &MainWindow::ExportLayoutAs);
|
||||||
connect(ui->actionPrintPreview, &QAction::triggered, this, &MainWindow::PrintPreviewOrigin);
|
connect(ui->actionPrintPreview, &QAction::triggered, this, &MainWindow::PrintPreviewOrigin);
|
||||||
connect(ui->actionPrintPreviewTiled, &QAction::triggered, this, &MainWindow::PrintPreviewTiled);
|
connect(ui->actionPrintPreviewTiled, &QAction::triggered, this, &MainWindow::PrintPreviewTiled);
|
||||||
|
@ -4007,7 +4007,7 @@ bool MainWindow::LoadPattern(const QString &fileName, const QString& customMeasu
|
||||||
{
|
{
|
||||||
ui->actionUnloadMeasurements->setEnabled(true);
|
ui->actionUnloadMeasurements->setEnabled(true);
|
||||||
watcher->addPath(path);
|
watcher->addPath(path);
|
||||||
ui->actionShowM->setEnabled(true);
|
ui->actionEditCurrent->setEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>100</width>
|
<width>117</width>
|
||||||
<height>358</height>
|
<height>358</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -427,7 +427,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>100</width>
|
<width>130</width>
|
||||||
<height>110</height>
|
<height>110</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -536,7 +536,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>100</width>
|
<width>130</width>
|
||||||
<height>248</height>
|
<height>248</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -798,7 +798,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>100</width>
|
<width>130</width>
|
||||||
<height>248</height>
|
<height>248</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1063,7 +1063,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>100</width>
|
<width>130</width>
|
||||||
<height>58</height>
|
<height>58</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1321,7 +1321,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>100</width>
|
<width>130</width>
|
||||||
<height>150</height>
|
<height>150</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1456,8 +1456,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>100</width>
|
<width>130</width>
|
||||||
<height>58</height>
|
<height>326</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -1616,13 +1616,13 @@
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Measurements</string>
|
<string>Measurements</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionTable"/>
|
<addaction name="actionOpenTape"/>
|
||||||
|
<addaction name="actionEditCurrent"/>
|
||||||
|
<addaction name="actionUnloadMeasurements"/>
|
||||||
<addaction name="actionLoadIndividual"/>
|
<addaction name="actionLoadIndividual"/>
|
||||||
<addaction name="actionLoadStandard"/>
|
<addaction name="actionLoadStandard"/>
|
||||||
<addaction name="actionUnloadMeasurements"/>
|
|
||||||
<addaction name="actionCreateNew"/>
|
|
||||||
<addaction name="actionShowM"/>
|
|
||||||
<addaction name="actionSyncMeasurements"/>
|
<addaction name="actionSyncMeasurements"/>
|
||||||
|
<addaction name="actionTable"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuWindow">
|
<widget class="QMenu" name="menuWindow">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
@ -2072,10 +2072,10 @@
|
||||||
<normaloff>:/icon/32x32/table.png</normaloff>:/icon/32x32/table.png</iconset>
|
<normaloff>:/icon/32x32/table.png</normaloff>:/icon/32x32/table.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Table of variables</string>
|
<string>Variables Table</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Tables of variables</string>
|
<string>Contains information about increments and internal variables</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string notr="true">Ctrl+T</string>
|
<string notr="true">Ctrl+T</string>
|
||||||
|
@ -2475,7 +2475,10 @@
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Load Individual ...</string>
|
<string>Load Individual</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Load Individual measurements file</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
|
@ -2489,21 +2492,13 @@
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Load Standard ...</string>
|
<string>Load Multisize</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="iconText">
|
||||||
<string notr="true"/>
|
<string>Load Multisize</string>
|
||||||
</property>
|
|
||||||
<property name="menuRole">
|
|
||||||
<enum>QAction::NoRole</enum>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actionCreateNew">
|
|
||||||
<property name="text">
|
|
||||||
<string>Create/Edit</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Create/edit measurements</string>
|
<string>Load multisize measurements file</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
|
@ -2512,15 +2507,29 @@
|
||||||
<enum>QAction::NoRole</enum>
|
<enum>QAction::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionShowM">
|
<action name="actionOpenTape">
|
||||||
|
<property name="text">
|
||||||
|
<string>Open Tape</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Open Tape app for creating or editing measurements file </string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="menuRole">
|
||||||
|
<enum>QAction::NoRole</enum>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionEditCurrent">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Show ...</string>
|
<string>Edit Current</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Show measurements</string>
|
<string>Edit linked to the pattern measurements</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
|
@ -2538,7 +2547,10 @@
|
||||||
<normaloff>:/icon/32x32/syncM.png</normaloff>:/icon/32x32/syncM.png</iconset>
|
<normaloff>:/icon/32x32/syncM.png</normaloff>:/icon/32x32/syncM.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Sync measurements</string>
|
<string>Sync</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Synchronize linked to the pattern measurements after change</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
|
@ -2552,10 +2564,10 @@
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Unload measurements</string>
|
<string>Unload Current</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Unload measurements if they was not used in a pattern file.</string>
|
<string>Unload measurements if they were not used in a pattern file</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
|
@ -2574,8 +2586,8 @@
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../libs/vmisc/share/resources/icon.qrc"/>
|
|
||||||
<include location="share/resources/toolicon.qrc"/>
|
<include location="share/resources/toolicon.qrc"/>
|
||||||
|
<include location="../../libs/vmisc/share/resources/icon.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user