Move the measurement diagram action to the ui file.
--HG-- branch : develop
This commit is contained in:
parent
77cb644f90
commit
a190fcaea2
|
@ -96,7 +96,6 @@ TMainWindow::TMainWindow(QWidget *parent)
|
|||
labelGradationHeights(nullptr),
|
||||
labelGradationSizes(nullptr),
|
||||
labelPatternUnit(nullptr),
|
||||
actionDockDiagram(nullptr),
|
||||
dockDiagramVisible(true),
|
||||
isInitialized(false),
|
||||
mIsReadOnly(false),
|
||||
|
@ -1997,12 +1996,6 @@ void TMainWindow::SetupMenu()
|
|||
connect(ui->actionAddKnown, &QAction::triggered, this, &TMainWindow::AddKnown);
|
||||
connect(ui->actionDatabase, &QAction::triggered, qApp, &MApplication::ShowDataBase);
|
||||
connect(ui->actionImportFromPattern, &QAction::triggered, this, &TMainWindow::ImportFromPattern);
|
||||
actionDockDiagram = ui->dockWidgetDiagram->toggleViewAction();
|
||||
actionDockDiagram->setMenuRole(QAction::NoRole);
|
||||
ui->menuMeasurements->addAction(actionDockDiagram);
|
||||
ui->mainToolBar->addAction(actionDockDiagram);
|
||||
actionDockDiagram->setEnabled(false);
|
||||
actionDockDiagram->setIcon(QIcon("://tapeicon/24x24/mannequin.png"));
|
||||
|
||||
// Window
|
||||
connect(ui->menuWindow, &QMenu::aboutToShow, this, &TMainWindow::AboutToShowWindowMenu);
|
||||
|
@ -2031,8 +2024,7 @@ void TMainWindow::InitWindow()
|
|||
SCASSERT(m != nullptr)
|
||||
ui->labelToolTip->setVisible(false);
|
||||
ui->tabWidget->setVisible(true);
|
||||
ui->dockWidgetDiagram->setVisible(dockDiagramVisible);
|
||||
actionDockDiagram->setEnabled(true);
|
||||
ui->actionMeasurementDiagram->setEnabled(true);
|
||||
ui->tabWidget->setCurrentIndex(0);
|
||||
|
||||
ui->plainTextEditNotes->setEnabled(true);
|
||||
|
|
|
@ -839,7 +839,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>835</width>
|
||||
<height>22</height>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
|
@ -884,6 +884,7 @@
|
|||
<addaction name="actionAddCustom"/>
|
||||
<addaction name="actionDatabase"/>
|
||||
<addaction name="actionImportFromPattern"/>
|
||||
<addaction name="actionMeasurementDiagram"/>
|
||||
</widget>
|
||||
<addaction name="menuFile"/>
|
||||
<addaction name="menuMeasurements"/>
|
||||
|
@ -914,6 +915,7 @@
|
|||
<addaction name="actionSave"/>
|
||||
<addaction name="actionAddKnown"/>
|
||||
<addaction name="actionAddCustom"/>
|
||||
<addaction name="actionMeasurementDiagram"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<widget class="QToolBar" name="toolBarGradation">
|
||||
|
@ -1206,6 +1208,21 @@
|
|||
<string>Import from CSV</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionMeasurementDiagram">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="share/resources/tapeicon.qrc">
|
||||
<normaloff>:/tapeicon/24x24/mannequin.png</normaloff>:/tapeicon/24x24/mannequin.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Measurement diagram</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
@ -1218,5 +1235,22 @@
|
|||
<resources>
|
||||
<include location="share/resources/tapeicon.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>actionMeasurementDiagram</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>dockWidgetDiagram</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>764</x>
|
||||
<y>377</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>764</x>
|
||||
<y>377</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
|
Loading…
Reference in New Issue
Block a user