1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-06 21:54:15 +01:00

Cosmetic graphical display changes to the RC input config display.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2909 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
pip 2011-02-27 19:52:03 +00:00 committed by pip
parent 4e89c1f245
commit f15bd6259e
3 changed files with 179 additions and 148 deletions

View File

@ -275,6 +275,8 @@ void ConfigServoWidget::onTelemetryConnect()
void ConfigServoWidget::onTelemetryDisconnect() void ConfigServoWidget::onTelemetryDisconnect()
{ {
enableControls(false); enableControls(false);
m_config->doRCInputCalibration->setChecked(false);
} }
// ************************************ // ************************************
@ -296,6 +298,8 @@ void ConfigServoWidget::enableControls(bool enable)
m_config->saveRCOutputToSD->setEnabled(enable); m_config->saveRCOutputToSD->setEnabled(enable);
m_config->saveRCOutputToRAM->setEnabled(enable); m_config->saveRCOutputToRAM->setEnabled(enable);
m_config->getRCOutputCurrent->setEnabled(enable); m_config->getRCOutputCurrent->setEnabled(enable);
m_config->doRCInputCalibration->setEnabled(enable);
} }
/** /**

View File

@ -17,7 +17,7 @@
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>1</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="tab"> <widget class="QWidget" name="tab">
<attribute name="title"> <attribute name="title">
@ -26,8 +26,8 @@
<widget class="QLabel" name="ch0Max"> <widget class="QLabel" name="ch0Max">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>30</x> <x>530</x>
<y>10</y> <y>40</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -53,8 +53,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch0Cur"> <widget class="QLabel" name="ch0Cur">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>30</x> <x>160</x>
<y>160</y> <y>40</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -79,8 +79,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch1Min"> <widget class="QLabel" name="ch1Min">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>100</x> <x>210</x>
<y>130</y> <y>60</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -102,12 +102,15 @@ p, li { white-space: pre-wrap; }
<property name="text"> <property name="text">
<string>1000</string> <string>1000</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
<widget class="QLabel" name="ch6Min"> <widget class="QLabel" name="ch6Min">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>450</x> <x>210</x>
<y>130</y> <y>160</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -129,12 +132,15 @@ p, li { white-space: pre-wrap; }
<property name="text"> <property name="text">
<string>1000</string> <string>1000</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
<widget class="QLabel" name="ch7Cur"> <widget class="QLabel" name="ch7Cur">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>520</x> <x>160</x>
<y>160</y> <y>180</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -159,8 +165,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch4Max"> <widget class="QLabel" name="ch4Max">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>310</x> <x>530</x>
<y>10</y> <y>120</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -186,8 +192,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch7Min"> <widget class="QLabel" name="ch7Min">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>520</x> <x>210</x>
<y>130</y> <y>180</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -209,12 +215,15 @@ p, li { white-space: pre-wrap; }
<property name="text"> <property name="text">
<string>1000</string> <string>1000</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
<widget class="QPushButton" name="getRCInputCurrent"> <widget class="QPushButton" name="getRCInputCurrent">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>250</x> <x>250</x>
<y>240</y> <y>210</y>
<width>93</width> <width>93</width>
<height>27</height> <height>27</height>
</rect> </rect>
@ -229,8 +238,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch2Min"> <widget class="QLabel" name="ch2Min">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>170</x> <x>210</x>
<y>130</y> <y>80</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -252,12 +261,15 @@ p, li { white-space: pre-wrap; }
<property name="text"> <property name="text">
<string>1000</string> <string>1000</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
<widget class="QLabel" name="ch6Max"> <widget class="QLabel" name="ch6Max">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>450</x> <x>530</x>
<y>10</y> <y>160</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -283,8 +295,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch5Max"> <widget class="QLabel" name="ch5Max">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>380</x> <x>530</x>
<y>10</y> <y>140</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -310,8 +322,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch3Max"> <widget class="QLabel" name="ch3Max">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>240</x> <x>530</x>
<y>10</y> <y>100</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -337,8 +349,8 @@ p, li { white-space: pre-wrap; }
<widget class="QPushButton" name="saveRCInputToSD"> <widget class="QPushButton" name="saveRCInputToSD">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>470</x> <x>430</x>
<y>240</y> <y>210</y>
<width>93</width> <width>93</width>
<height>27</height> <height>27</height>
</rect> </rect>
@ -354,8 +366,8 @@ Applies and Saves all settings to SD</string>
<widget class="QLabel" name="ch4Cur"> <widget class="QLabel" name="ch4Cur">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>310</x> <x>160</x>
<y>160</y> <y>120</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -380,8 +392,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch4Min"> <widget class="QLabel" name="ch4Min">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>310</x> <x>210</x>
<y>130</y> <y>120</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -403,12 +415,15 @@ p, li { white-space: pre-wrap; }
<property name="text"> <property name="text">
<string>1000</string> <string>1000</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
<widget class="QPushButton" name="saveRCInputToRAM"> <widget class="QPushButton" name="saveRCInputToRAM">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>360</x> <x>340</x>
<y>240</y> <y>210</y>
<width>93</width> <width>93</width>
<height>27</height> <height>27</height>
</rect> </rect>
@ -424,9 +439,9 @@ Be sure to set the Neutral position on all sliders before sending!</string>
<widget class="QComboBox" name="ch0Assign"> <widget class="QComboBox" name="ch0Assign">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>20</x>
<y>180</y> <y>40</y>
<width>68</width> <width>131</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>
@ -449,8 +464,8 @@ Be sure to set the Neutral position on all sliders before sending!</string>
<widget class="QLabel" name="ch3Min"> <widget class="QLabel" name="ch3Min">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>240</x> <x>210</x>
<y>130</y> <y>100</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -472,12 +487,15 @@ p, li { white-space: pre-wrap; }
<property name="text"> <property name="text">
<string>1000</string> <string>1000</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
<widget class="QLabel" name="ch7Max"> <widget class="QLabel" name="ch7Max">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>520</x> <x>530</x>
<y>10</y> <y>180</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -503,8 +521,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch2Cur"> <widget class="QLabel" name="ch2Cur">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>170</x> <x>160</x>
<y>160</y> <y>80</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -529,8 +547,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch5Cur"> <widget class="QLabel" name="ch5Cur">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>380</x> <x>160</x>
<y>160</y> <y>140</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -555,8 +573,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch5Min"> <widget class="QLabel" name="ch5Min">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>380</x> <x>210</x>
<y>130</y> <y>140</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -578,12 +596,15 @@ p, li { white-space: pre-wrap; }
<property name="text"> <property name="text">
<string>1000</string> <string>1000</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
<widget class="QLabel" name="ch1Cur"> <widget class="QLabel" name="ch1Cur">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>100</x> <x>160</x>
<y>160</y> <y>60</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -608,7 +629,7 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch6Cur"> <widget class="QLabel" name="ch6Cur">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>450</x> <x>160</x>
<y>160</y> <y>160</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
@ -634,8 +655,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch3Cur"> <widget class="QLabel" name="ch3Cur">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>240</x> <x>160</x>
<y>160</y> <y>100</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -660,8 +681,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch2Max"> <widget class="QLabel" name="ch2Max">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>170</x> <x>530</x>
<y>10</y> <y>80</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -687,8 +708,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch1Max"> <widget class="QLabel" name="ch1Max">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>100</x> <x>530</x>
<y>10</y> <y>60</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -714,8 +735,8 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="ch0Min"> <widget class="QLabel" name="ch0Min">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>30</x> <x>210</x>
<y>130</y> <y>40</y>
<width>31</width> <width>31</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -737,13 +758,16 @@ p, li { white-space: pre-wrap; }
<property name="text"> <property name="text">
<string>1000</string> <string>1000</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
<widget class="QComboBox" name="ch1Assign"> <widget class="QComboBox" name="ch1Assign">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>80</x> <x>20</x>
<y>180</y> <y>60</y>
<width>68</width> <width>131</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>
@ -757,9 +781,9 @@ p, li { white-space: pre-wrap; }
<widget class="QComboBox" name="ch2Assign"> <widget class="QComboBox" name="ch2Assign">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>150</x> <x>20</x>
<y>180</y> <y>80</y>
<width>68</width> <width>131</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>
@ -773,9 +797,9 @@ p, li { white-space: pre-wrap; }
<widget class="QComboBox" name="ch3Assign"> <widget class="QComboBox" name="ch3Assign">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>220</x> <x>20</x>
<y>180</y> <y>100</y>
<width>68</width> <width>131</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>
@ -789,9 +813,9 @@ p, li { white-space: pre-wrap; }
<widget class="QComboBox" name="ch4Assign"> <widget class="QComboBox" name="ch4Assign">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>290</x> <x>20</x>
<y>180</y> <y>120</y>
<width>68</width> <width>131</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>
@ -805,9 +829,9 @@ p, li { white-space: pre-wrap; }
<widget class="QComboBox" name="ch5Assign"> <widget class="QComboBox" name="ch5Assign">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>360</x> <x>20</x>
<y>180</y> <y>140</y>
<width>68</width> <width>131</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>
@ -821,9 +845,9 @@ p, li { white-space: pre-wrap; }
<widget class="QComboBox" name="ch6Assign"> <widget class="QComboBox" name="ch6Assign">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>430</x> <x>20</x>
<y>180</y> <y>160</y>
<width>68</width> <width>131</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>
@ -837,9 +861,9 @@ p, li { white-space: pre-wrap; }
<widget class="QComboBox" name="ch7Assign"> <widget class="QComboBox" name="ch7Assign">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>500</x> <x>20</x>
<y>180</y> <y>180</y>
<width>68</width> <width>131</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>
@ -854,7 +878,7 @@ p, li { white-space: pre-wrap; }
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>20</x> <x>20</x>
<y>240</y> <y>210</y>
<width>131</width> <width>131</width>
<height>22</height> <height>22</height>
</rect> </rect>
@ -874,7 +898,7 @@ Neutral should be put at the bottom of the slider for the throttle.</string>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>250</x> <x>250</x>
<y>210</y> <y>10</y>
<width>311</width> <width>311</width>
<height>20</height> <height>20</height>
</rect> </rect>
@ -896,9 +920,9 @@ Neutral should be put at the bottom of the slider for the throttle.</string>
<widget class="QComboBox" name="receiverType"> <widget class="QComboBox" name="receiverType">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>130</x> <x>140</x>
<y>210</y> <y>10</y>
<width>89</width> <width>91</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>
@ -912,8 +936,8 @@ Neutral should be put at the bottom of the slider for the throttle.</string>
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>20</x>
<y>210</y> <y>10</y>
<width>111</width> <width>111</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -929,7 +953,7 @@ Neutral should be put at the bottom of the slider for the throttle.</string>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>20</x> <x>20</x>
<y>270</y> <y>240</y>
<width>531</width> <width>531</width>
<height>41</height> <height>41</height>
</rect> </rect>
@ -943,44 +967,13 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; color:#ff0000;&quot;&gt;when running calibration!&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; color:#ff0000;&quot;&gt;when running calibration!&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
<widget class="WidgetBar" name="widgetBarCH0" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>68</width>
<height>100</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>1</width>
<height>1</height>
</size>
</property>
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(165, 165, 165);</string>
</property>
</widget>
<widget class="WidgetBar" name="widgetBarCH1" native="true"> <widget class="WidgetBar" name="widgetBarCH1" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>80</x> <x>250</x>
<y>30</y> <y>60</y>
<width>68</width> <width>271</width>
<height>100</height> <height>21</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -1008,10 +1001,10 @@ p, li { white-space: pre-wrap; }
<widget class="WidgetBar" name="widgetBarCH2" native="true"> <widget class="WidgetBar" name="widgetBarCH2" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>150</x> <x>250</x>
<y>30</y> <y>80</y>
<width>68</width> <width>271</width>
<height>100</height> <height>21</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -1039,10 +1032,10 @@ p, li { white-space: pre-wrap; }
<widget class="WidgetBar" name="widgetBarCH3" native="true"> <widget class="WidgetBar" name="widgetBarCH3" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>220</x> <x>250</x>
<y>30</y> <y>100</y>
<width>68</width> <width>271</width>
<height>100</height> <height>21</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -1070,10 +1063,10 @@ p, li { white-space: pre-wrap; }
<widget class="WidgetBar" name="widgetBarCH4" native="true"> <widget class="WidgetBar" name="widgetBarCH4" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>290</x> <x>250</x>
<y>30</y> <y>120</y>
<width>68</width> <width>271</width>
<height>100</height> <height>21</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -1101,10 +1094,10 @@ p, li { white-space: pre-wrap; }
<widget class="WidgetBar" name="widgetBarCH5" native="true"> <widget class="WidgetBar" name="widgetBarCH5" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>360</x> <x>250</x>
<y>30</y> <y>140</y>
<width>68</width> <width>271</width>
<height>100</height> <height>21</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -1132,10 +1125,10 @@ p, li { white-space: pre-wrap; }
<widget class="WidgetBar" name="widgetBarCH6" native="true"> <widget class="WidgetBar" name="widgetBarCH6" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>430</x> <x>250</x>
<y>30</y> <y>160</y>
<width>68</width> <width>271</width>
<height>100</height> <height>21</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -1163,10 +1156,41 @@ p, li { white-space: pre-wrap; }
<widget class="WidgetBar" name="widgetBarCH7" native="true"> <widget class="WidgetBar" name="widgetBarCH7" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>500</x> <x>250</x>
<y>30</y> <y>180</y>
<width>68</width> <width>271</width>
<height>100</height> <height>21</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>1</width>
<height>1</height>
</size>
</property>
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(165, 165, 165);</string>
</property>
</widget>
<widget class="WidgetBar" name="widgetBarCH0" native="true">
<property name="geometry">
<rect>
<x>250</x>
<y>40</y>
<width>271</width>
<height>21</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">

View File

@ -37,7 +37,8 @@
m_minimum = 1000; m_minimum = 1000;
m_value = 1500; m_value = 1500;
m_orientation = Qt::Vertical; // m_orientation = Qt::Vertical;
m_orientation = Qt::Horizontal;
setBackgroundRole(QPalette::Base); setBackgroundRole(QPalette::Base);
setAutoFillBackground(true); setAutoFillBackground(true);
@ -120,7 +121,8 @@ void WidgetBar::paintEvent(QPaintEvent * /* event */)
// background // background
// painter.setPen(QColor(160, 160, 160)); // painter.setPen(QColor(160, 160, 160));
// painter.setBrush(QColor(255, 255, 255)); // painter.setBrush(QColor(255, 255, 255));
painter.setPen(QColor(80, 80, 80)); // painter.setPen(QColor(80, 80, 80));
painter.setPen(QColor(160, 160, 160));
painter.setBrush(QColor(160, 160, 160)); painter.setBrush(QColor(160, 160, 160));
painter.drawRect(QRect(0, 0, width() - 1, height() - 1)); painter.drawRect(QRect(0, 0, width() - 1, height() - 1));
@ -139,10 +141,11 @@ void WidgetBar::paintEvent(QPaintEvent * /* event */)
else else
// painter.setPen(QColor(0, 255, 0)); // green // painter.setPen(QColor(0, 255, 0)); // green
painter.setPen(QColor(128, 128, 255)); // blue painter.setPen(QColor(128, 128, 255)); // blue
if (m_orientation == Qt::Vertical)
painter.drawLine(rect.left(), rect.bottom() + 1 - i, rect.right() + 1, rect.bottom() + 1 - i); // vertical bar if (m_orientation == Qt::Horizontal)
painter.drawLine(rect.left() + i, rect.top(), rect.left() + i, rect.bottom() + 1); // horizontal bar
else else
painter.drawLine(rect.top(), rect.left() + i, rect.bottom(), rect.left() + i); // horizontal bar painter.drawLine(rect.left(), rect.bottom() + 1 - i, rect.right() + 1, rect.bottom() + 1 - i); // vertical bar
} }
} }
} }