fix(cpn): screen colors in simulator for B&W OLED radios (#4779)
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.8 KiB |
@@ -29,13 +29,13 @@ SimulatedUIWidgetJumperT20::SimulatedUIWidgetJumperT20(SimulatorInterface *simul
|
|||||||
m_backlightColors << QColor(255,195,151);
|
m_backlightColors << QColor(255,195,151);
|
||||||
m_backlightColors << QColor(247,242,159);
|
m_backlightColors << QColor(247,242,159);
|
||||||
|
|
||||||
|
ui->lcd->setBgDefaultColor(QColor(0, 0, 0));
|
||||||
|
ui->lcd->setFgDefaultColor(QColor(255, 255, 255));
|
||||||
|
|
||||||
setLcd(ui->lcd);
|
setLcd(ui->lcd);
|
||||||
|
|
||||||
QString css = "#radioUiWidget {"
|
QString css = "#radioUiWidget {"
|
||||||
"background-color: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:1,"
|
"background-color: rgb(200, 200, 200);"
|
||||||
"stop:0 rgba(255, 255, 255, 255),"
|
|
||||||
"stop:0.757062 rgba(241, 238, 238, 255),"
|
|
||||||
"stop:1 rgba(247, 245, 245, 255));"
|
|
||||||
"}";
|
"}";
|
||||||
|
|
||||||
QTimer * tim = new QTimer(this);
|
QTimer * tim = new QTimer(this);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "simulateduiwidget.h"
|
#include "simulateduiwidget.h"
|
||||||
#include "ui_simulateduiwidgetJumperTPRO.h"
|
#include "ui_simulateduiwidgetJumperTPRO.h"
|
||||||
|
#include "eeprominterface.h"
|
||||||
|
|
||||||
// NOTE: RadioUiAction(NUMBER,...): NUMBER relates to enum EnumKeys in the specific board.h
|
// NOTE: RadioUiAction(NUMBER,...): NUMBER relates to enum EnumKeys in the specific board.h
|
||||||
|
|
||||||
@@ -31,13 +32,15 @@ SimulatedUIWidgetJumperTPRO::SimulatedUIWidgetJumperTPRO(SimulatorInterface *sim
|
|||||||
m_backlightColors << QColor(255,195,151);
|
m_backlightColors << QColor(255,195,151);
|
||||||
m_backlightColors << QColor(247,242,159);
|
m_backlightColors << QColor(247,242,159);
|
||||||
|
|
||||||
|
if (getCurrentBoard() == Board::BOARD_JUMPER_TPROV2) {
|
||||||
|
ui->lcd->setBgDefaultColor(QColor(0, 0, 0));
|
||||||
|
ui->lcd->setFgDefaultColor(QColor(255, 255, 255));
|
||||||
|
}
|
||||||
|
|
||||||
setLcd(ui->lcd);
|
setLcd(ui->lcd);
|
||||||
|
|
||||||
QString css = "#radioUiWidget {"
|
QString css = "#radioUiWidget {"
|
||||||
"background-color: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:1,"
|
"background-color: rgb(167, 167, 167);"
|
||||||
"stop:0 rgba(255, 255, 255, 255),"
|
|
||||||
"stop:0.757062 rgba(241, 238, 238, 255),"
|
|
||||||
"stop:1 rgba(247, 245, 245, 255));"
|
|
||||||
"}";
|
"}";
|
||||||
|
|
||||||
QTimer * tim = new QTimer(this);
|
QTimer * tim = new QTimer(this);
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>725</width>
|
<width>726</width>
|
||||||
<height>389</height>
|
<height>368</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -18,14 +18,14 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>725</width>
|
<width>726</width>
|
||||||
<height>389</height>
|
<height>368</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>501</width>
|
<width>726</width>
|
||||||
<height>310 </height>
|
<height>368</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="0" rowspan="3">
|
<item row="0" column="0" rowspan="3">
|
||||||
<widget class="ButtonsWidget" name="leftbuttons" native="true">
|
<widget class="ButtonsWidget" name="leftbuttons" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="LcdWidget" name="lcd" native="true">
|
<widget class="LcdWidget" name="lcd" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
@@ -86,13 +86,13 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>256</width>
|
<width>256</width>
|
||||||
<height>231</height>
|
<height>128</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>256</width>
|
<width>256</width>
|
||||||
<height>231</height>
|
<height>128</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2" rowspan="3">
|
<item row="0" column="2" rowspan="3">
|
||||||
<widget class="ButtonsWidget" name="rightbuttons" native="true">
|
<widget class="ButtonsWidget" name="rightbuttons" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QWidget" name="top" native="true">
|
<widget class="QWidget" name="top" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
@@ -135,14 +135,14 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>255</width>
|
<width>256</width>
|
||||||
<height>85</height>
|
<height>97</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>255</width>
|
<width>256</width>
|
||||||
<height>85</height>
|
<height>97</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="ButtonsWidget" name="bottombuttons" native="true">
|
<widget class="ButtonsWidget" name="bottombuttons" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
@@ -160,14 +160,14 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>255</width>
|
<width>256</width>
|
||||||
<height>131</height>
|
<height>143</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>255</width>
|
<width>256</width>
|
||||||
<height>131</height>
|
<height>143</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
@@ -175,68 +175,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" colspan="3">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>10</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>12</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="baseSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>12</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0" colspan="3">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>10</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>10</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background-color: rgb(247, 245, 245);</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
|||||||
@@ -37,6 +37,9 @@ SimulatedUIWidgetLR3PRO::SimulatedUIWidgetLR3PRO(SimulatorInterface *simulator,
|
|||||||
m_backlightColors << QColor(255,195,151);
|
m_backlightColors << QColor(255,195,151);
|
||||||
m_backlightColors << QColor(247,242,159);
|
m_backlightColors << QColor(247,242,159);
|
||||||
|
|
||||||
|
ui->lcd->setBgDefaultColor(QColor(0, 0, 0));
|
||||||
|
ui->lcd->setFgDefaultColor(QColor(255, 255, 255));
|
||||||
|
|
||||||
setLcd(ui->lcd);
|
setLcd(ui->lcd);
|
||||||
|
|
||||||
QString css = "#radioUiWidget {"
|
QString css = "#radioUiWidget {"
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>501</width>
|
<width>500</width>
|
||||||
<height>310</height>
|
<height>287</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -18,14 +18,14 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>501</width>
|
<width>500</width>
|
||||||
<height>310</height>
|
<height>287</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>501</width>
|
<width>500</width>
|
||||||
<height>310</height>
|
<height>287</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -50,7 +50,57 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="0" rowspan="3">
|
<item row="1" column="1">
|
||||||
|
<widget class="LcdWidget" name="lcd" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>256</width>
|
||||||
|
<height>128</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>256</width>
|
||||||
|
<height>128</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: rgb(215, 243, 255);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2" rowspan="3">
|
||||||
|
<widget class="ButtonsWidget" name="rightbuttons" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>122</width>
|
||||||
|
<height>287</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>122</width>
|
||||||
|
<height>287</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background:url(:/images/simulator/LR3PRO/right.png)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" rowspan="3">
|
||||||
<widget class="ButtonsWidget" name="leftbuttons" native="true">
|
<widget class="ButtonsWidget" name="leftbuttons" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
@@ -76,81 +126,6 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="LcdWidget" name="lcd" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>800</width>
|
|
||||||
<height>150</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>800</width>
|
|
||||||
<height>150</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background-color: rgb(215, 243, 255);</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2" rowspan="3">
|
|
||||||
<widget class="ButtonsWidget" name="rightbuttons" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>122</width>
|
|
||||||
<height>287</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>122</width>
|
|
||||||
<height>287</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background:url(:/images/simulator/LR3PRO/right.png)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QWidget" name="top" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>258</width>
|
|
||||||
<height>46</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>258</width>
|
|
||||||
<height>46</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background:url(:/images/simulator/LR3PRO/top.png)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="ButtonsWidget" name="bottombuttons" native="true">
|
<widget class="ButtonsWidget" name="bottombuttons" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
@@ -160,14 +135,14 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>258</width>
|
<width>256</width>
|
||||||
<height>117</height>
|
<height>116</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>258</width>
|
<width>256</width>
|
||||||
<height>117</height>
|
<height>116</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
@@ -175,65 +150,28 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" colspan="3">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QWidget" name="top" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>256</width>
|
||||||
<height>10</height>
|
<height>44</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>256</width>
|
||||||
<height>12</height>
|
<height>44</height>
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="baseSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>12</height>
|
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
<string notr="true">background:url(:/images/simulator/LR3PRO/top.png)</string>
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0" colspan="3">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>10</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>10</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background-color: rgb(247, 245, 245);</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -40,6 +40,11 @@ void LcdWidget::setBgDefaultColor(const QColor &color)
|
|||||||
bgDefaultColor = color;
|
bgDefaultColor = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LcdWidget::setFgDefaultColor(const QColor &color)
|
||||||
|
{
|
||||||
|
fgDefaultColor = color;
|
||||||
|
}
|
||||||
|
|
||||||
void LcdWidget::setBackgroundColor(const QColor &color) { bgColor = color; }
|
void LcdWidget::setBackgroundColor(const QColor &color) { bgColor = color; }
|
||||||
|
|
||||||
void LcdWidget::makeScreenshot(const QString &fileName)
|
void LcdWidget::makeScreenshot(const QString &fileName)
|
||||||
@@ -118,7 +123,7 @@ void LcdWidget::doPaint(QPainter &p)
|
|||||||
p.eraseRect(0, 0, 2 * lcdWidth, 2 * lcdHeight);
|
p.eraseRect(0, 0, 2 * lcdWidth, 2 * lcdHeight);
|
||||||
|
|
||||||
if (lcdDepth == 1) {
|
if (lcdDepth == 1) {
|
||||||
rgb = qRgb(0, 0, 0);
|
rgb = fgDefaultColor.rgb();
|
||||||
p.setPen(rgb);
|
p.setPen(rgb);
|
||||||
p.setBrush(QBrush(rgb));
|
p.setBrush(QBrush(rgb));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ class LcdWidget : public QWidget
|
|||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
localBuf(NULL),
|
localBuf(NULL),
|
||||||
lightEnable(false),
|
lightEnable(false),
|
||||||
bgDefaultColor(QColor(198, 208, 199))
|
bgDefaultColor(QColor(198, 208, 199)),
|
||||||
|
fgDefaultColor(QColor(0, 0, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,6 +60,7 @@ class LcdWidget : public QWidget
|
|||||||
|
|
||||||
void setData(int width, int height, int depth = 1);
|
void setData(int width, int height, int depth = 1);
|
||||||
void setBgDefaultColor(const QColor &color);
|
void setBgDefaultColor(const QColor &color);
|
||||||
|
void setFgDefaultColor(const QColor &color);
|
||||||
void setBackgroundColor(const QColor &color);
|
void setBackgroundColor(const QColor &color);
|
||||||
|
|
||||||
void makeScreenshot(const QString &fileName);
|
void makeScreenshot(const QString &fileName);
|
||||||
@@ -79,6 +81,7 @@ class LcdWidget : public QWidget
|
|||||||
bool lightEnable;
|
bool lightEnable;
|
||||||
QColor bgColor;
|
QColor bgColor;
|
||||||
QColor bgDefaultColor;
|
QColor bgDefaultColor;
|
||||||
|
QColor fgDefaultColor;
|
||||||
QMutex lcdMtx;
|
QMutex lcdMtx;
|
||||||
QElapsedTimer redrawTimer;
|
QElapsedTimer redrawTimer;
|
||||||
|
|
||||||
|
|||||||