X9lite simu (#6830)
* #6821 - Skin of the X9-Lite Companion simulator (#6822) * X9Lite simulator code * missing files * fine tune * Revert "missing files" This reverts commit a181775f3d8b030757e3871e7aaec40fb9b0df8a. * Remove unused images
@@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
# X9-Lite skin for the Companion simulator
|
||||||
|

|
||||||
|
|
||||||
|
## The different parts of the image
|
||||||
|
|
||||||
|
The image is divided into 4 pieces: top, bottom, left and right.
|
||||||
|
For the images concerned, there is the version with the activated element and the version without the activated element (such as a button, a rotary encoder, clicking on the rotary encoder).
|
||||||
|
|
||||||
|
| File name | What is this image ? |
|
||||||
|
|:---------------------|:----------------------------------------------|
|
||||||
|
| `bottom.png` | central lower band |
|
||||||
|
| `center_LCD.png` | central LCD 256x128px (useless for simulator) |
|
||||||
|
| `left.png` | left part with inactive elements |
|
||||||
|
| `left_exit.png` | left part with the EXIT button activated |
|
||||||
|
| `left_menu.png` | left part with the MENU button activated |
|
||||||
|
| `left_page.png` | left part with the PAGE button activated |
|
||||||
|
| `left_scrnshot.png `| left part with the SCREENSHOT button activated|
|
||||||
|
| `right_ent.png` | right part with the ENT button activated |
|
||||||
|
| `right_rotcoder.png` | right part with the Rotary Encoder actuated |
|
||||||
|
| `right.png` | right part with inactive elements |
|
||||||
|
| `top.png` | central upper band |
|
||||||
|
`X9-Lite_Companion_image.png` is the image displayed here.
|
||||||
|
|
||||||
|
When turning the rotary encoder, it is possible to make a motion effect by displaying `right_rotcoder.png` and `right.png`.
|
||||||
|
|
||||||
|
## Software used :
|
||||||
|
- **Inkscape** : vector drawing software (http://www.inkscape.org/)
|
||||||
|
- **Gimp** : image editor (http://www.gimp.org/)
|
||||||
|
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 3.8 KiB |
@@ -8,24 +8,21 @@ SimulatedUIWidgetX9LITE::SimulatedUIWidgetX9LITE(SimulatorInterface *simulator,
|
|||||||
ui(new Ui::SimulatedUIWidgetX9LITE)
|
ui(new Ui::SimulatedUIWidgetX9LITE)
|
||||||
{
|
{
|
||||||
RadioUiAction * act;
|
RadioUiAction * act;
|
||||||
QPolygon polygon;
|
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
// add actions in order of appearance on the help menu
|
// add actions in order of appearance on the help menu
|
||||||
|
|
||||||
QPoint ctr(70, 91);
|
QPoint ctr(70, 91);
|
||||||
polygon << polyArc(ctr.x(), ctr.y(), 50, -90, 90) << polyArc(ctr.x(), ctr.y(), 22, -90, 90);
|
|
||||||
act = new RadioUiAction(0, QList<int>() << Qt::Key_PageUp << Qt::Key_Up, SIMU_STR_HLP_KEYS_GO_UP, SIMU_STR_HLP_ACT_MENU_ICN);
|
act = new RadioUiAction(0, QList<int>() << Qt::Key_PageUp << Qt::Key_Up, SIMU_STR_HLP_KEYS_GO_UP, SIMU_STR_HLP_ACT_MENU_ICN);
|
||||||
addRadioWidget(ui->leftbuttons->addArea(polyArc(ctr.x(), ctr.y(), 20), "X9LITE/left_menu.png", act));
|
addRadioWidget(ui->leftbuttons->addArea(QRect(80, 20, 40, 35), "X9LITE/left_menu.png", act));
|
||||||
|
|
||||||
act = new RadioUiAction(3, QList<int>() << Qt::Key_PageDown << Qt::Key_Down, SIMU_STR_HLP_KEYS_GO_DN, SIMU_STR_HLP_ACT_PAGE);
|
act = new RadioUiAction(3, QList<int>() << Qt::Key_PageDown << Qt::Key_Down, SIMU_STR_HLP_KEYS_GO_DN, SIMU_STR_HLP_ACT_PAGE);
|
||||||
addRadioWidget(ui->leftbuttons->addArea(polygon, "X9LITE/left_page.png", act));
|
addRadioWidget(ui->leftbuttons->addArea(QRect(80, 65, 40, 35), "X9LITE/left_page.png", act));
|
||||||
|
|
||||||
polygon.clear();
|
|
||||||
polygon << polyArc(ctr.x(), ctr.y(), 50, 90, 270) << polyArc(ctr.x(), ctr.y(), 22, 90, 270);
|
|
||||||
act = new RadioUiAction(1, QList<int>() << Qt::Key_Delete << Qt::Key_Escape << Qt::Key_Backspace, SIMU_STR_HLP_KEYS_EXIT, SIMU_STR_HLP_ACT_EXIT);
|
act = new RadioUiAction(1, QList<int>() << Qt::Key_Delete << Qt::Key_Escape << Qt::Key_Backspace, SIMU_STR_HLP_KEYS_EXIT, SIMU_STR_HLP_ACT_EXIT);
|
||||||
addRadioWidget(ui->leftbuttons->addArea(polygon, "X9LITE/left_exit.png", act));
|
addRadioWidget(ui->leftbuttons->addArea(QRect(80, 130, 40, 35), "X9LITE/left_exit.png", act));
|
||||||
|
|
||||||
m_scrollUpAction = new RadioUiAction(-1, QList<int>() << Qt::Key_Minus << Qt::Key_Equal << Qt::Key_Left, SIMU_STR_HLP_KEYS_GO_LFT, SIMU_STR_HLP_ACT_ROT_LFT);
|
m_scrollUpAction = new RadioUiAction(-1, QList<int>() << Qt::Key_Minus << Qt::Key_Equal << Qt::Key_Left, SIMU_STR_HLP_KEYS_GO_LFT, SIMU_STR_HLP_ACT_ROT_LFT);
|
||||||
m_scrollDnAction = new RadioUiAction(-1, QList<int>() << Qt::Key_Plus << Qt::Key_Right, SIMU_STR_HLP_KEYS_GO_RGT, SIMU_STR_HLP_ACT_ROT_RGT);
|
m_scrollDnAction = new RadioUiAction(-1, QList<int>() << Qt::Key_Plus << Qt::Key_Right, SIMU_STR_HLP_KEYS_GO_RGT, SIMU_STR_HLP_ACT_ROT_RGT);
|
||||||
@@ -34,7 +31,7 @@ SimulatedUIWidgetX9LITE::SimulatedUIWidgetX9LITE(SimulatorInterface *simulator,
|
|||||||
m_mouseMidClickAction = new RadioUiAction(2, QList<int>() << Qt::Key_Enter << Qt::Key_Return, SIMU_STR_HLP_KEYS_ACTIVATE, SIMU_STR_HLP_ACT_ROT_DN);
|
m_mouseMidClickAction = new RadioUiAction(2, QList<int>() << Qt::Key_Enter << Qt::Key_Return, SIMU_STR_HLP_KEYS_ACTIVATE, SIMU_STR_HLP_ACT_ROT_DN);
|
||||||
addRadioWidget(ui->rightbuttons->addArea(polyArc(88, 92, 33), "X9LITE/right_ent.png", m_mouseMidClickAction));
|
addRadioWidget(ui->rightbuttons->addArea(polyArc(88, 92, 33), "X9LITE/right_ent.png", m_mouseMidClickAction));
|
||||||
|
|
||||||
addRadioWidget(ui->leftbuttons->addArea(QRect(9, 154, 30, 30), "X9LITE/left_scrnshot.png", m_screenshotAction));
|
addRadioWidget(ui->leftbuttons->addArea(QRect(30, 154, 30, 30), "X9LITE/left_scrnshot.png", m_screenshotAction));
|
||||||
|
|
||||||
m_backlightColors << QColor(215, 243, 255); // X9LITE Blue
|
m_backlightColors << QColor(215, 243, 255); // X9LITE Blue
|
||||||
m_backlightColors << QColor(166,247,159);
|
m_backlightColors << QColor(166,247,159);
|
||||||
@@ -45,10 +42,10 @@ SimulatedUIWidgetX9LITE::SimulatedUIWidgetX9LITE(SimulatorInterface *simulator,
|
|||||||
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: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:1,"
|
||||||
"stop:0 rgba(255, 255, 255, 255),"
|
"stop:0 rgba(255, 255, 255, 255),"
|
||||||
"stop:0.757062 rgba(241, 238, 238, 255),"
|
"stop:0.757062 rgba(241, 238, 238, 255),"
|
||||||
"stop:1 rgba(247, 245, 245, 255));"
|
"stop:1 rgba(247, 245, 245, 255));"
|
||||||
"}";
|
"}";
|
||||||
|
|
||||||
QTimer * tim = new QTimer(this);
|
QTimer * tim = new QTimer(this);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>570</width>
|
<width>650</width>
|
||||||
<height>208</height>
|
<height>208</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -18,14 +18,14 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>570</width>
|
<width>603</width>
|
||||||
<height>208</height>
|
<height>235</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>570</width>
|
<width>603</width>
|
||||||
<height>208</height>
|
<height>240</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -60,14 +60,14 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>157</width>
|
<width>173</width>
|
||||||
<height>186</height>
|
<height>210</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>157</width>
|
<width>173</width>
|
||||||
<height>186</height>
|
<height>210</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
@@ -85,14 +85,14 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>256</width>
|
<width>602</width>
|
||||||
<height>128</height>
|
<height>129</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>424</width>
|
<width>602</width>
|
||||||
<height>128</height>
|
<height>129</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
@@ -110,14 +110,14 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>157</width>
|
<width>174</width>
|
||||||
<height>186</height>
|
<height>210</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>157</width>
|
<width>174</width>
|
||||||
<height>186</height>
|
<height>210</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
@@ -135,14 +135,14 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>256</width>
|
<width>258</width>
|
||||||
<height>48</height>
|
<height>35</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>256</width>
|
<width>258</width>
|
||||||
<height>48</height>
|
<height>35</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
@@ -160,14 +160,14 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>256</width>
|
<width>258</width>
|
||||||
<height>10</height>
|
<height>46</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>256</width>
|
<width>258</width>
|
||||||
<height>10</height>
|
<height>46</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
|
|||||||