PrintView improvements (#250)

- Allow printer selection directly from PrintView
- Print button bypasses the system print dialog, since label printing is quite different from typical printing tasks
- Separate button to optionally use system print dialog, if needed
This commit is contained in:
Jaye Evins
2025-11-17 17:04:04 -05:00
committed by GitHub
parent b69ada13db
commit bcc6b3ec9d
7 changed files with 463 additions and 33 deletions
+97 -28
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>852</width>
<height>796</height>
<height>874</height>
</rect>
</property>
<property name="sizePolicy">
@@ -53,6 +53,34 @@
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Destination</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QComboBox" name="destinationCombo">
<property name="styleSheet">
<string notr="true">text-align:left; padding:3px;</string>
</property>
<property name="currentText">
<string/>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="placeholderText">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="printRangeBox">
<property name="sizePolicy">
@@ -449,7 +477,7 @@
<string notr="true">text-align:left; padding:3px;</string>
</property>
<property name="text">
<string>Print...</string>
<string>Print</string>
</property>
<property name="icon">
<iconset theme="glabels-print">
@@ -531,6 +559,13 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="systemDialogButton">
<property name="text">
<string>Use system print dialog...</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
@@ -645,8 +680,8 @@
<slot>onFormChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>175</x>
<y>122</y>
<x>164</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>2</x>
@@ -661,8 +696,8 @@
<slot>onFormChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>182</x>
<y>444</y>
<x>216</x>
<y>574</y>
</hint>
<hint type="destinationlabel">
<x>2</x>
@@ -677,8 +712,8 @@
<slot>onFormChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>152</x>
<y>475</y>
<x>186</x>
<y>608</y>
</hint>
<hint type="destinationlabel">
<x>6</x>
@@ -693,8 +728,8 @@
<slot>onFormChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>156</x>
<y>506</y>
<x>190</x>
<y>642</y>
</hint>
<hint type="destinationlabel">
<x>6</x>
@@ -709,8 +744,8 @@
<slot>onFormChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>641</x>
<y>760</y>
<x>639</x>
<y>827</y>
</hint>
<hint type="destinationlabel">
<x>1</x>
@@ -725,8 +760,8 @@
<slot>onPrintButtonClicked()</slot>
<hints>
<hint type="sourcelabel">
<x>291</x>
<y>589</y>
<x>312</x>
<y>724</y>
</hint>
<hint type="destinationlabel">
<x>5</x>
@@ -741,8 +776,8 @@
<slot>onFormChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>159</x>
<y>243</y>
<x>156</x>
<y>390</y>
</hint>
<hint type="destinationlabel">
<x>7</x>
@@ -757,8 +792,8 @@
<slot>onFormChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>59</x>
<y>108</y>
<x>93</x>
<y>258</y>
</hint>
<hint type="destinationlabel">
<x>6</x>
@@ -773,8 +808,8 @@
<slot>onFormChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>142</x>
<y>149</y>
<x>188</x>
<y>299</y>
</hint>
<hint type="destinationlabel">
<x>5</x>
@@ -789,8 +824,8 @@
<slot>onFormChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>226</x>
<y>145</y>
<x>275</x>
<y>299</y>
</hint>
<hint type="destinationlabel">
<x>8</x>
@@ -805,8 +840,8 @@
<slot>onFormChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>52</x>
<y>261</y>
<x>85</x>
<y>401</y>
</hint>
<hint type="destinationlabel">
<x>3</x>
@@ -821,8 +856,8 @@
<slot>onFormChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>231</x>
<y>314</y>
<x>264</x>
<y>449</y>
</hint>
<hint type="destinationlabel">
<x>5</x>
@@ -837,8 +872,8 @@
<slot>onFormChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>199</x>
<y>362</y>
<x>254</x>
<y>679</y>
</hint>
<hint type="destinationlabel">
<x>4</x>
@@ -846,11 +881,45 @@
</hint>
</hints>
</connection>
<connection>
<sender>destinationCombo</sender>
<signal>currentIndexChanged(int)</signal>
<receiver>PrintView</receiver>
<slot>onFormChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>289</x>
<y>110</y>
</hint>
<hint type="destinationlabel">
<x>254</x>
<y>6</y>
</hint>
</hints>
</connection>
<connection>
<sender>systemDialogButton</sender>
<signal>clicked()</signal>
<receiver>PrintView</receiver>
<slot>onSystemDialogButtonClicked()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>836</y>
</hint>
<hint type="destinationlabel">
<x>373</x>
<y>871</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>onPrintButtonClicked()</slot>
<slot>onFormChanged()</slot>
<slot>onPrinterPropertiesButtonClicked()</slot>
<slot>onBrowseButtonClicked()</slot>
<slot>onSystemDialogButtonClicked()</slot>
</slots>
<buttongroups>
<buttongroup name="buttonGroup"/>