Skip to content

Commit fc52123

Browse files
committed
qtdragon_hd -add gcode zoom buttons just like qtdragon
1 parent 6f53868 commit fc52123

2 files changed

Lines changed: 112 additions & 8 deletions

File tree

share/qtvcp/screens/qtdragon_hd/qtdragon_hd.ui

Lines changed: 107 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6058,7 +6058,7 @@ LOG</string>
60586058
<item>
60596059
<widget class="QGroupBox" name="groupBox">
60606060
<property name="title">
6061-
<string>Spindle Raise</string>
6061+
<string>SPINDLE RAISE</string>
60626062
</property>
60636063
<property name="alignment">
60646064
<set>Qt::AlignCenter</set>
@@ -6219,6 +6219,71 @@ LOG</string>
62196219
</layout>
62206220
</widget>
62216221
</item>
6222+
<item>
6223+
<widget class="QGroupBox" name="groupBox_gcode_zoom">
6224+
<property name="title">
6225+
<string>GCODE ZOOM</string>
6226+
</property>
6227+
<property name="alignment">
6228+
<set>Qt::AlignCenter</set>
6229+
</property>
6230+
<layout class="QHBoxLayout" name="horizontalLayout_70" stretch="0,0">
6231+
<property name="spacing">
6232+
<number>4</number>
6233+
</property>
6234+
<property name="leftMargin">
6235+
<number>0</number>
6236+
</property>
6237+
<property name="topMargin">
6238+
<number>5</number>
6239+
</property>
6240+
<property name="rightMargin">
6241+
<number>0</number>
6242+
</property>
6243+
<property name="bottomMargin">
6244+
<number>4</number>
6245+
</property>
6246+
<item>
6247+
<widget class="PushButton" name="btn_gcode_zoomin">
6248+
<property name="minimumSize">
6249+
<size>
6250+
<width>50</width>
6251+
<height>30</height>
6252+
</size>
6253+
</property>
6254+
<property name="maximumSize">
6255+
<size>
6256+
<width>50</width>
6257+
<height>30</height>
6258+
</size>
6259+
</property>
6260+
<property name="text">
6261+
<string>+</string>
6262+
</property>
6263+
</widget>
6264+
</item>
6265+
<item>
6266+
<widget class="PushButton" name="btn_gcode_zoomout">
6267+
<property name="minimumSize">
6268+
<size>
6269+
<width>50</width>
6270+
<height>30</height>
6271+
</size>
6272+
</property>
6273+
<property name="maximumSize">
6274+
<size>
6275+
<width>50</width>
6276+
<height>30</height>
6277+
</size>
6278+
</property>
6279+
<property name="text">
6280+
<string>-</string>
6281+
</property>
6282+
</widget>
6283+
</item>
6284+
</layout>
6285+
</widget>
6286+
</item>
62226287
<item>
62236288
<spacer name="verticalSpacer_7">
62246289
<property name="orientation">
@@ -15757,7 +15822,7 @@ ANGULAR</string>
1575715822
<number>2</number>
1575815823
</property>
1575915824
<property name="text">
15760-
<string>06:44:18 PM</string>
15825+
<string>08:22:38 PM</string>
1576115826
</property>
1576215827
<property name="alignment">
1576315828
<set>Qt::AlignCenter</set>
@@ -16583,8 +16648,8 @@ ANGULAR</string>
1658316648
<slot>chk_lock_wph_changed()</slot>
1658416649
<hints>
1658516650
<hint type="sourcelabel">
16586-
<x>495</x>
16587-
<y>678</y>
16651+
<x>533</x>
16652+
<y>716</y>
1658816653
</hint>
1658916654
<hint type="destinationlabel">
1659016655
<x>520</x>
@@ -16695,8 +16760,8 @@ ANGULAR</string>
1669516760
<slot>btn_home_clicked()</slot>
1669616761
<hints>
1669716762
<hint type="sourcelabel">
16698-
<x>1048</x>
16699-
<y>745</y>
16763+
<x>1096</x>
16764+
<y>799</y>
1670016765
</hint>
1670116766
<hint type="destinationlabel">
1670216767
<x>1060</x>
@@ -16784,6 +16849,38 @@ ANGULAR</string>
1678416849
</hint>
1678516850
</hints>
1678616851
</connection>
16852+
<connection>
16853+
<sender>btn_gcode_zoomout</sender>
16854+
<signal>clicked(bool)</signal>
16855+
<receiver>MainWindow</receiver>
16856+
<slot>btn_gcode_zoomout_clicked()</slot>
16857+
<hints>
16858+
<hint type="sourcelabel">
16859+
<x>1086</x>
16860+
<y>604</y>
16861+
</hint>
16862+
<hint type="destinationlabel">
16863+
<x>1289</x>
16864+
<y>-10</y>
16865+
</hint>
16866+
</hints>
16867+
</connection>
16868+
<connection>
16869+
<sender>btn_gcode_zoomin</sender>
16870+
<signal>clicked(bool)</signal>
16871+
<receiver>MainWindow</receiver>
16872+
<slot>btn_gcode_zoomin_clicked()</slot>
16873+
<hints>
16874+
<hint type="sourcelabel">
16875+
<x>930</x>
16876+
<y>605</y>
16877+
</hint>
16878+
<hint type="destinationlabel">
16879+
<x>878</x>
16880+
<y>-13</y>
16881+
</hint>
16882+
</hints>
16883+
</connection>
1678716884
</connections>
1678816885
<designerdata>
1678916886
<property name="gridDeltaX">
@@ -16862,9 +16959,12 @@ ANGULAR</string>
1686216959
<slot>btn_about_clicked()</slot>
1686316960
<slot>btn_spindle_z_up_clicked()</slot>
1686416961
<slot>btn_spindle_z_down_clicked()</slot>
16962+
<slot>btn_gcode_zoomout_clicked()</slot>
16963+
<slot>slot1()</slot>
16964+
<slot>btn_gcode_zoomin_clicked()</slot>
1686516965
</slots>
1686616966
<buttongroups>
16867-
<buttongroup name="mode_buttonGroup"/>
1686816967
<buttongroup name="page_buttonGroup"/>
16968+
<buttongroup name="mode_buttonGroup"/>
1686916969
</buttongroups>
1687016970
</ui>

share/qtvcp/screens/qtdragon_hd/qtdragon_hd_handler.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,8 +980,12 @@ def btn_about_clicked(self):
980980
info = ACTION.GET_ABOUT_INFO()
981981
self.w.aboutDialog_.showdialog()
982982

983+
def btn_gcode_zoomin_clicked(self):
984+
self.w.gcode_viewer.editor.zoomIn()
985+
def btn_gcode_zoomout_clicked(self):
986+
self.w.gcode_viewer.editor.zoomOut()
987+
983988
def btn_spindle_z_up_clicked(self):
984-
print(self.w.lineEdit_eoffset_count.text())
985989
fval = int(self.w.lineEdit_eoffset_count.text())
986990
if INFO.MACHINE_IS_METRIC:
987991
fval += 5

0 commit comments

Comments
 (0)