Skip to content

Commit 203ed2e

Browse files
committed
qtdragon_lathe -add a user dro for temporary setup reference
1 parent afadb67 commit 203ed2e

3 files changed

Lines changed: 208 additions & 34 deletions

File tree

share/qtvcp/screens/qtdragon_lathe/qtdragon_lathe.qss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ DROLabel[isHomed=false] {
8888
color: red;
8989
}
9090

91+
UserDROLabel{
92+
font: 18pt "Lato Heavy";
93+
}
94+
9195
QLabel#lbl_cycle_start,
9296
QLabel#lbl_home_all {
9397
font: 10pt "Lato Heavy";
@@ -545,4 +549,4 @@ TouchSpinBox QPushButton {
545549
width: 60px;
546550
height: 100px;
547551
}
548-
552+

share/qtvcp/screens/qtdragon_lathe/qtdragon_lathe.ui

Lines changed: 197 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,126 @@ RESET</string>
13351335
</property>
13361336
</widget>
13371337
</item>
1338+
<item>
1339+
<widget class="MDILine" name="mdiline">
1340+
<property name="sizePolicy">
1341+
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
1342+
<horstretch>0</horstretch>
1343+
<verstretch>0</verstretch>
1344+
</sizepolicy>
1345+
</property>
1346+
<property name="minimumSize">
1347+
<size>
1348+
<width>0</width>
1349+
<height>30</height>
1350+
</size>
1351+
</property>
1352+
<property name="maximumSize">
1353+
<size>
1354+
<width>16777215</width>
1355+
<height>32</height>
1356+
</size>
1357+
</property>
1358+
<property name="maxLength">
1359+
<number>100</number>
1360+
</property>
1361+
<property name="placeholderText">
1362+
<string>MDI:</string>
1363+
</property>
1364+
<property name="soft_keyboard_option" stdset="0">
1365+
<bool>false</bool>
1366+
</property>
1367+
</widget>
1368+
</item>
1369+
<item>
1370+
<widget class="QWidget" name="userReferenceWidget" native="true">
1371+
<layout class="QVBoxLayout" name="userReferenceLayout">
1372+
<property name="spacing">
1373+
<number>3</number>
1374+
</property>
1375+
<property name="leftMargin">
1376+
<number>0</number>
1377+
</property>
1378+
<property name="topMargin">
1379+
<number>0</number>
1380+
</property>
1381+
<property name="rightMargin">
1382+
<number>0</number>
1383+
</property>
1384+
<property name="bottomMargin">
1385+
<number>0</number>
1386+
</property>
1387+
<item>
1388+
<layout class="QHBoxLayout" name="horizontalLayout_40">
1389+
<item>
1390+
<widget class="AxisPickToolButton" name="axispicktoolbutton_2">
1391+
<property name="textTemplate">
1392+
<string>TEMP REF: %s</string>
1393+
</property>
1394+
<property name="currentAxis">
1395+
<string>X</string>
1396+
</property>
1397+
</widget>
1398+
</item>
1399+
<item>
1400+
<widget class="UserDROLabel" name="userdro1">
1401+
<property name="text">
1402+
<string>100</string>
1403+
</property>
1404+
</widget>
1405+
</item>
1406+
<item>
1407+
<widget class="QPushButton" name="pushButton_2">
1408+
<property name="sizePolicy">
1409+
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
1410+
<horstretch>0</horstretch>
1411+
<verstretch>0</verstretch>
1412+
</sizepolicy>
1413+
</property>
1414+
<property name="text">
1415+
<string>ZERO</string>
1416+
</property>
1417+
</widget>
1418+
</item>
1419+
</layout>
1420+
</item>
1421+
<item>
1422+
<layout class="QHBoxLayout" name="horizontalLayout_39">
1423+
<item>
1424+
<widget class="AxisPickToolButton" name="axispicktoolbutton">
1425+
<property name="textTemplate">
1426+
<string>TEMP REF: %s</string>
1427+
</property>
1428+
<property name="currentAxis">
1429+
<string>Z</string>
1430+
</property>
1431+
</widget>
1432+
</item>
1433+
<item>
1434+
<widget class="UserDROLabel" name="userdro0">
1435+
<property name="text">
1436+
<string>100</string>
1437+
</property>
1438+
</widget>
1439+
</item>
1440+
<item>
1441+
<widget class="QPushButton" name="pushButton">
1442+
<property name="sizePolicy">
1443+
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
1444+
<horstretch>0</horstretch>
1445+
<verstretch>0</verstretch>
1446+
</sizepolicy>
1447+
</property>
1448+
<property name="text">
1449+
<string>ZERO</string>
1450+
</property>
1451+
</widget>
1452+
</item>
1453+
</layout>
1454+
</item>
1455+
</layout>
1456+
</widget>
1457+
</item>
13381458
</layout>
13391459
</widget>
13401460
<widget class="QWidget" name="file_page">
@@ -3397,37 +3517,6 @@ PLATE</string>
33973517
</widget>
33983518
</widget>
33993519
</item>
3400-
<item>
3401-
<widget class="MDILine" name="mdiline">
3402-
<property name="sizePolicy">
3403-
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
3404-
<horstretch>0</horstretch>
3405-
<verstretch>0</verstretch>
3406-
</sizepolicy>
3407-
</property>
3408-
<property name="minimumSize">
3409-
<size>
3410-
<width>0</width>
3411-
<height>30</height>
3412-
</size>
3413-
</property>
3414-
<property name="maximumSize">
3415-
<size>
3416-
<width>16777215</width>
3417-
<height>32</height>
3418-
</size>
3419-
</property>
3420-
<property name="maxLength">
3421-
<number>100</number>
3422-
</property>
3423-
<property name="placeholderText">
3424-
<string>MDI:</string>
3425-
</property>
3426-
<property name="soft_keyboard_option" stdset="0">
3427-
<bool>false</bool>
3428-
</property>
3429-
</widget>
3430-
</item>
34313520
</layout>
34323521
</widget>
34333522
<widget class="QFrame" name="frm_backplot">
@@ -17845,7 +17934,7 @@ SCROLL</string>
1784517934
<number>2</number>
1784617935
</property>
1784717936
<property name="text">
17848-
<string>03:25:03 PM</string>
17937+
<string>02:54:36 PM</string>
1784917938
</property>
1785017939
<property name="alignment">
1785117940
<set>Qt::AlignCenter</set>
@@ -17976,6 +18065,12 @@ SCROLL</string>
1797618065
<header>qtvcp.widgets.dro_widget</header>
1797718066
<container>1</container>
1797818067
</customwidget>
18068+
<customwidget>
18069+
<class>UserDROLabel</class>
18070+
<extends>QLabel</extends>
18071+
<header>qtvcp.widgets.user_dro_label</header>
18072+
<container>1</container>
18073+
</customwidget>
1797918074
<customwidget>
1798018075
<class>MDILine</class>
1798118076
<extends>QLineEdit</extends>
@@ -18051,6 +18146,11 @@ SCROLL</string>
1805118146
<extends>QToolButton</extends>
1805218147
<header>qtvcp.widgets.action_tool_button</header>
1805318148
</customwidget>
18149+
<customwidget>
18150+
<class>AxisPickToolButton</class>
18151+
<extends>QToolButton</extends>
18152+
<header>qtvcp.widgets.axisPickTool_button</header>
18153+
</customwidget>
1805418154
<customwidget>
1805518155
<class>VirtualKeyboard</class>
1805618156
<extends>QWidget</extends>
@@ -18802,6 +18902,70 @@ SCROLL</string>
1880218902
</hint>
1880318903
</hints>
1880418904
</connection>
18905+
<connection>
18906+
<sender>pushButton</sender>
18907+
<signal>clicked(bool)</signal>
18908+
<receiver>userdro0</receiver>
18909+
<slot>zero(bool)</slot>
18910+
<hints>
18911+
<hint type="sourcelabel">
18912+
<x>287</x>
18913+
<y>421</y>
18914+
</hint>
18915+
<hint type="destinationlabel">
18916+
<x>119</x>
18917+
<y>421</y>
18918+
</hint>
18919+
</hints>
18920+
</connection>
18921+
<connection>
18922+
<sender>pushButton_2</sender>
18923+
<signal>clicked(bool)</signal>
18924+
<receiver>userdro1</receiver>
18925+
<slot>zero(bool)</slot>
18926+
<hints>
18927+
<hint type="sourcelabel">
18928+
<x>240</x>
18929+
<y>394</y>
18930+
</hint>
18931+
<hint type="destinationlabel">
18932+
<x>163</x>
18933+
<y>392</y>
18934+
</hint>
18935+
</hints>
18936+
</connection>
18937+
<connection>
18938+
<sender>axispicktoolbutton_2</sender>
18939+
<signal>AxisSelected(QString)</signal>
18940+
<receiver>userdro1</receiver>
18941+
<slot>setAxisLetter(QString)</slot>
18942+
<hints>
18943+
<hint type="sourcelabel">
18944+
<x>19</x>
18945+
<y>387</y>
18946+
</hint>
18947+
<hint type="destinationlabel">
18948+
<x>54</x>
18949+
<y>390</y>
18950+
</hint>
18951+
</hints>
18952+
</connection>
18953+
<connection>
18954+
<sender>axispicktoolbutton</sender>
18955+
<signal>AxisSelected(QString)</signal>
18956+
<receiver>userdro0</receiver>
18957+
<slot>setAxisLetter(QString)</slot>
18958+
<hints>
18959+
<hint type="sourcelabel">
18960+
<x>28</x>
18961+
<y>417</y>
18962+
</hint>
18963+
<hint type="destinationlabel">
18964+
<x>70</x>
18965+
<y>411</y>
18966+
</hint>
18967+
</hints>
18968+
</connection>
1880518969
</connections>
1880618970
<designerdata>
1880718971
<property name="gridDeltaX">
@@ -18885,8 +19049,8 @@ SCROLL</string>
1888519049
<slot>btn_systemtool_toggled()</slot>
1888619050
</slots>
1888719051
<buttongroups>
19052+
<buttongroup name="page_buttonGroup"/>
1888819053
<buttongroup name="selectButtonGroup"/>
1888919054
<buttongroup name="mode_buttonGroup"/>
18890-
<buttongroup name="page_buttonGroup"/>
1889119055
</buttongroups>
1889219056
</ui>

share/qtvcp/screens/qtdragon_lathe/qtdragon_lathe_handler.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,6 +1924,12 @@ def adjust_stacked_widgets(self,requestedIndex,mode_change=False):
19241924
self.w.frame_top_left.show()
19251925
self.w.frm_backplot.show()
19261926

1927+
1928+
if main_index == TAB_MAIN and mode =='':
1929+
self.w.userReferenceWidget.show()
1930+
else:
1931+
self.w.userReferenceWidget.hide()
1932+
19271933
# adjust window splitter size as per saved adjustments
19281934

19291935
name = 'splitterSettings-{}{}'.format(tabId,mode)

0 commit comments

Comments
 (0)