Skip to content

Commit 9bb4d2f

Browse files
committed
qtdragon /hd/lathe/vert: add graphics options button
1 parent 99ff630 commit 9bb4d2f

8 files changed

Lines changed: 160 additions & 221 deletions

File tree

share/qtvcp/screens/qtdragon/qtdragon.ui

Lines changed: 39 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3559,6 +3559,34 @@ PLATE</string>
35593559
<property name="bottomMargin">
35603560
<number>3</number>
35613561
</property>
3562+
<item>
3563+
<widget class="ActionToolButton" name="actiontoolbutton_2">
3564+
<property name="minimumSize">
3565+
<size>
3566+
<width>50</width>
3567+
<height>36</height>
3568+
</size>
3569+
</property>
3570+
<property name="maximumSize">
3571+
<size>
3572+
<width>50</width>
3573+
<height>50</height>
3574+
</size>
3575+
</property>
3576+
<property name="text">
3577+
<string>OPTN</string>
3578+
</property>
3579+
<property name="popupMode">
3580+
<enum>QToolButton::InstantPopup</enum>
3581+
</property>
3582+
<property name="userViewAction" stdset="0">
3583+
<bool>false</bool>
3584+
</property>
3585+
<property name="OptionMenuAction" stdset="0">
3586+
<bool>true</bool>
3587+
</property>
3588+
</widget>
3589+
</item>
35623590
<item>
35633591
<widget class="ActionToolButton" name="actiontoolbutton">
35643592
<property name="minimumSize">
@@ -3577,8 +3605,8 @@ PLATE</string>
35773605
<string>Hold to save current view</string>
35783606
</property>
35793607
<property name="text">
3580-
<string>User
3581-
View</string>
3608+
<string>USER
3609+
VIEW</string>
35823610
</property>
35833611
<property name="checkable">
35843612
<bool>true</bool>
@@ -3925,37 +3953,6 @@ View</string>
39253953
</property>
39263954
</widget>
39273955
</item>
3928-
<item>
3929-
<widget class="QPushButton" name="btn_dimensions">
3930-
<property name="sizePolicy">
3931-
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
3932-
<horstretch>0</horstretch>
3933-
<verstretch>0</verstretch>
3934-
</sizepolicy>
3935-
</property>
3936-
<property name="minimumSize">
3937-
<size>
3938-
<width>50</width>
3939-
<height>36</height>
3940-
</size>
3941-
</property>
3942-
<property name="maximumSize">
3943-
<size>
3944-
<width>50</width>
3945-
<height>50</height>
3946-
</size>
3947-
</property>
3948-
<property name="toolTip">
3949-
<string>Toggle display dimensions</string>
3950-
</property>
3951-
<property name="text">
3952-
<string>D</string>
3953-
</property>
3954-
<property name="checkable">
3955-
<bool>true</bool>
3956-
</property>
3957-
</widget>
3958-
</item>
39593956
<item>
39603957
<widget class="ActionButton" name="actionbutton_zoom_in">
39613958
<property name="sizePolicy">
@@ -4447,6 +4444,13 @@ View</string>
44474444
<property name="_dtg" stdset="0">
44484445
<bool>false</bool>
44494446
</property>
4447+
<property name="grid_color" stdset="0">
4448+
<color>
4449+
<red>200</red>
4450+
<green>139</green>
4451+
<blue>138</blue>
4452+
</color>
4453+
</property>
44504454
<property name="background_color" stdset="0">
44514455
<color>
44524456
<red>100</red>
@@ -17763,7 +17767,7 @@ SCROLL</string>
1776317767
<number>2</number>
1776417768
</property>
1776517769
<property name="text">
17766-
<string>12:35:39 PM</string>
17770+
<string>04:32:14 AM</string>
1776717771
</property>
1776817772
<property name="alignment">
1776917773
<set>Qt::AlignCenter</set>
@@ -18227,22 +18231,6 @@ SCROLL</string>
1822718231
</hint>
1822818232
</hints>
1822918233
</connection>
18230-
<connection>
18231-
<sender>btn_dimensions</sender>
18232-
<signal>clicked()</signal>
18233-
<receiver>MainWindow</receiver>
18234-
<slot>btn_dimensions_clicked()</slot>
18235-
<hints>
18236-
<hint type="sourcelabel">
18237-
<x>425</x>
18238-
<y>285</y>
18239-
</hint>
18240-
<hint type="destinationlabel">
18241-
<x>0</x>
18242-
<y>323</y>
18243-
</hint>
18244-
</hints>
18245-
</connection>
1824618234
<connection>
1824718235
<sender>chk_use_virtual</sender>
1824818236
<signal>stateChanged(int)</signal>
@@ -18855,7 +18843,7 @@ SCROLL</string>
1885518843
</slots>
1885618844
<buttongroups>
1885718845
<buttongroup name="selectButtonGroup"/>
18858-
<buttongroup name="page_buttonGroup"/>
1885918846
<buttongroup name="mode_buttonGroup"/>
18847+
<buttongroup name="page_buttonGroup"/>
1886018848
</buttongroups>
1886118849
</ui>

share/qtvcp/screens/qtdragon/qtdragon_handler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ def initialized__(self):
189189
self.w.stackedWidget.setCurrentIndex(0)
190190
self.w.stackedWidget_dro.setCurrentIndex(0)
191191
self.w.btn_spindle_pause.setEnabled(False)
192-
self.w.btn_dimensions.setChecked(True)
193192
self.w.page_buttonGroup.buttonClicked.connect(self.main_tab_changed)
194193
self.w.selectButtonGroup.buttonClicked.connect(self.MPG_select_changed)
195194
self.w.filemanager_usb.showMediaDir(quiet = True)

share/qtvcp/screens/qtdragon_hd/qtdragon_hd.ui

Lines changed: 42 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,34 @@
11341134
<property name="bottomMargin">
11351135
<number>0</number>
11361136
</property>
1137+
<item>
1138+
<widget class="ActionToolButton" name="actiontoolbutton_2">
1139+
<property name="minimumSize">
1140+
<size>
1141+
<width>50</width>
1142+
<height>36</height>
1143+
</size>
1144+
</property>
1145+
<property name="maximumSize">
1146+
<size>
1147+
<width>50</width>
1148+
<height>50</height>
1149+
</size>
1150+
</property>
1151+
<property name="text">
1152+
<string>OPTN</string>
1153+
</property>
1154+
<property name="popupMode">
1155+
<enum>QToolButton::InstantPopup</enum>
1156+
</property>
1157+
<property name="userViewAction" stdset="0">
1158+
<bool>false</bool>
1159+
</property>
1160+
<property name="OptionMenuAction" stdset="0">
1161+
<bool>true</bool>
1162+
</property>
1163+
</widget>
1164+
</item>
11371165
<item>
11381166
<widget class="ActionToolButton" name="actiontoolbutton">
11391167
<property name="minimumSize">
@@ -1152,15 +1180,18 @@
11521180
<string>Hold to save current view</string>
11531181
</property>
11541182
<property name="text">
1155-
<string>User
1156-
View</string>
1183+
<string>USER
1184+
VIEW</string>
11571185
</property>
11581186
<property name="checkable">
11591187
<bool>true</bool>
11601188
</property>
11611189
<property name="autoExclusive">
11621190
<bool>true</bool>
11631191
</property>
1192+
<property name="popupMode">
1193+
<enum>QToolButton::InstantPopup</enum>
1194+
</property>
11641195
<property name="autoRaise">
11651196
<bool>false</bool>
11661197
</property>
@@ -1500,37 +1531,6 @@ View</string>
15001531
</property>
15011532
</widget>
15021533
</item>
1503-
<item>
1504-
<widget class="QPushButton" name="btn_dimensions">
1505-
<property name="sizePolicy">
1506-
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
1507-
<horstretch>0</horstretch>
1508-
<verstretch>0</verstretch>
1509-
</sizepolicy>
1510-
</property>
1511-
<property name="minimumSize">
1512-
<size>
1513-
<width>50</width>
1514-
<height>40</height>
1515-
</size>
1516-
</property>
1517-
<property name="maximumSize">
1518-
<size>
1519-
<width>50</width>
1520-
<height>40</height>
1521-
</size>
1522-
</property>
1523-
<property name="text">
1524-
<string>D</string>
1525-
</property>
1526-
<property name="checkable">
1527-
<bool>true</bool>
1528-
</property>
1529-
<property name="checked">
1530-
<bool>true</bool>
1531-
</property>
1532-
</widget>
1533-
</item>
15341534
<item>
15351535
<widget class="ActionButton" name="actionbutton_zoom_in">
15361536
<property name="sizePolicy">
@@ -2034,6 +2034,13 @@ View</string>
20342034
<property name="_dtg" stdset="0">
20352035
<bool>false</bool>
20362036
</property>
2037+
<property name="grid_color" stdset="0">
2038+
<color>
2039+
<red>200</red>
2040+
<green>137</green>
2041+
<blue>138</blue>
2042+
</color>
2043+
</property>
20372044
<property name="background_color" stdset="0">
20382045
<color>
20392046
<red>80</red>
@@ -16893,7 +16900,7 @@ ANGULAR</string>
1689316900
<number>2</number>
1689416901
</property>
1689516902
<property name="text">
16896-
<string>12:30:35 PM</string>
16903+
<string>04:31:34 AM</string>
1689716904
</property>
1689816905
<property name="alignment">
1689916906
<set>Qt::AlignCenter</set>
@@ -17884,22 +17891,6 @@ ANGULAR</string>
1788417891
</hint>
1788517892
</hints>
1788617893
</connection>
17887-
<connection>
17888-
<sender>btn_dimensions</sender>
17889-
<signal>clicked()</signal>
17890-
<receiver>MainWindow</receiver>
17891-
<slot>btn_dimensions_clicked()</slot>
17892-
<hints>
17893-
<hint type="sourcelabel">
17894-
<x>1134</x>
17895-
<y>386</y>
17896-
</hint>
17897-
<hint type="destinationlabel">
17898-
<x>1188</x>
17899-
<y>-106</y>
17900-
</hint>
17901-
</hints>
17902-
</connection>
1790317894
<connection>
1790417895
<sender>btn_home_0</sender>
1790517896
<signal>clicked()</signal>
@@ -18082,7 +18073,7 @@ ANGULAR</string>
1808218073
</slots>
1808318074
<buttongroups>
1808418075
<buttongroup name="selectButtonGroup"/>
18085-
<buttongroup name="page_buttonGroup"/>
1808618076
<buttongroup name="mode_buttonGroup"/>
18077+
<buttongroup name="page_buttonGroup"/>
1808718078
</buttongroups>
1808818079
</ui>

share/qtvcp/screens/qtdragon_hd/qtdragon_hd_handler.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ def initialized__(self):
189189
self.w.stackedWidget_dro.setCurrentIndex(0)
190190
if self.probe is not None:
191191
self.probe.hide()
192-
self.w.btn_dimensions.setChecked(True)
193192
self.w.page_buttonGroup.buttonClicked.connect(self.main_tab_changed)
194193
self.w.selectButtonGroup.buttonClicked.connect(self.MPG_select_changed)
195194
self.w.filemanager_usb.showMediaDir(quiet = True)
@@ -1159,10 +1158,6 @@ def btn_save_status_clicked(self):
11591158
self.add_status("{} {}".format(_translate("HandlerClass","Saving Log file to"), filename))
11601159
with open(filename, 'w') as f:
11611160
f.write(text)
1162-
1163-
def btn_dimensions_clicked(self, state):
1164-
self.w.gcodegraphics.show_extents_option = state
1165-
self.w.gcodegraphics.clear_live_plotter()
11661161

11671162
# camview tab
11681163
def cam_zoom_changed(self, value):

0 commit comments

Comments
 (0)