|
@ -136,6 +136,14 @@
|
|||
<file>images/simulator/X9E/right.png</file>
|
||||
<file>images/simulator/X9E/right_enter.png</file>
|
||||
<file>images/simulator/X9E/top.png</file>
|
||||
<file>images/simulator/X9D2019/bottom.png</file>
|
||||
<file>images/simulator/X9D2019/left.png</file>
|
||||
<file>images/simulator/X9D2019/left_exit.png</file>
|
||||
<file>images/simulator/X9D2019/left_menu.png</file>
|
||||
<file>images/simulator/X9D2019/left_page.png</file>
|
||||
<file>images/simulator/X9D2019/right.png</file>
|
||||
<file>images/simulator/X9D2019/right_enter.png</file>
|
||||
<file>images/simulator/X9D2019/top.png</file>
|
||||
<file>images/simulator/X9LITE/bottom.png</file>
|
||||
<file>images/simulator/X9LITE/left.png</file>
|
||||
<file>images/simulator/X9LITE/left_exit.png</file>
|
||||
|
|
28
companion/src/images/simulator/X9D2019/Readme.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
# "Taranis X9D+ 2019" dark blue 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 424x128px (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 |
|
||||
| `bottom_scrnshot.png`| central lower band with the SCREENSHOT button activated|
|
||||
| `right_ent.png` | right part with the ENTER button activated |
|
||||
| `right.png` | right part with inactive elements |
|
||||
| `top.png` | central upper band |
|
||||
|
||||
`X9DP2019_Companion_image.png` is the image displayed here.
|
||||
|
||||
|
||||
## Software used :
|
||||
- **Inkscape** : vector drawing software (http://www.inkscape.org/)
|
||||
- **Gimp** : image editor (http://www.gimp.org/)
|
After Width: | Height: | Size: 52 KiB |
BIN
companion/src/images/simulator/X9D2019/bottom.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
companion/src/images/simulator/X9D2019/bottom_scrnshot.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
companion/src/images/simulator/X9D2019/center_LCD.png
Normal file
After Width: | Height: | Size: 557 B |
BIN
companion/src/images/simulator/X9D2019/left.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
companion/src/images/simulator/X9D2019/left_exit.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
companion/src/images/simulator/X9D2019/left_menu.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
companion/src/images/simulator/X9D2019/left_page.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
companion/src/images/simulator/X9D2019/right.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
companion/src/images/simulator/X9D2019/right_enter.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
companion/src/images/simulator/X9D2019/top.png
Normal file
After Width: | Height: | Size: 8 KiB |
|
@ -9,6 +9,7 @@ set(simulation_SRCS
|
|||
simulateduiwidgetX9.cpp
|
||||
simulateduiwidgetXLITE.cpp
|
||||
simulateduiwidgetX9E.cpp
|
||||
simulateduiwidgetX9D2019.cpp
|
||||
simulateduiwidgetX10.cpp
|
||||
simulateduiwidgetX12.cpp
|
||||
simulateduiwidgetJumperT12.cpp
|
||||
|
@ -32,6 +33,7 @@ set(simulation_UIS
|
|||
simulateduiwidgetX9.ui
|
||||
simulateduiwidgetXLITE.ui
|
||||
simulateduiwidgetX9E.ui
|
||||
simulateduiwidgetX9D2019.ui
|
||||
simulateduiwidgetX10.ui
|
||||
simulateduiwidgetX12.ui
|
||||
simulateduiwidgetJumperT12.ui
|
||||
|
|
|
@ -108,6 +108,7 @@ namespace Ui {
|
|||
class SimulatedUIWidgetX9;
|
||||
class SimulatedUIWidgetXLITE;
|
||||
class SimulatedUIWidgetX9E;
|
||||
class SimulatedUIWidgetX9D2019;
|
||||
class SimulatedUIWidgetX10;
|
||||
class SimulatedUIWidgetX12;
|
||||
class SimulatedUIWidgetJumperT12;
|
||||
|
@ -190,6 +191,18 @@ class SimulatedUIWidgetX9E: public SimulatedUIWidget
|
|||
Ui::SimulatedUIWidgetX9E * ui;
|
||||
};
|
||||
|
||||
class SimulatedUIWidgetX9D2019: public SimulatedUIWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SimulatedUIWidgetX9D2019(SimulatorInterface * simulator, QWidget * parent = nullptr);
|
||||
virtual ~SimulatedUIWidgetX9D2019();
|
||||
|
||||
private:
|
||||
Ui::SimulatedUIWidgetX9D2019 * ui;
|
||||
};
|
||||
|
||||
class SimulatedUIWidgetX10: public SimulatedUIWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
83
companion/src/simulation/simulateduiwidgetX9D2019.cpp
Normal file
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
// NOTE: RadioUiAction(NUMBER,...): NUMBER relates to enum EnumKeys in the specific board.h
|
||||
|
||||
#include "simulateduiwidget.h"
|
||||
#include "ui_simulateduiwidgetX9D2019.h"
|
||||
|
||||
SimulatedUIWidgetX9D2019::SimulatedUIWidgetX9D2019(SimulatorInterface *simulator, QWidget * parent):
|
||||
SimulatedUIWidget(simulator, parent),
|
||||
ui(new Ui::SimulatedUIWidgetX9D2019)
|
||||
{
|
||||
RadioUiAction * act;
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
// add actions in order of appearance on the help menu
|
||||
|
||||
QPoint ctr(70, 100);
|
||||
|
||||
act = new RadioUiAction(0, QList<int>() << Qt::Key_Up << Qt::Key_PageUp, SIMU_STR_HLP_KEYS_GO_UP, SIMU_STR_HLP_ACT_MENU);
|
||||
addRadioWidget(ui->leftbuttons->addArea(QRect(25, 40, 80, 35), "X9D2019/left_menu.png", act));
|
||||
|
||||
act = new RadioUiAction(3, QList<int>() << Qt::Key_Down << Qt::Key_PageDown, SIMU_STR_HLP_KEYS_GO_DN, SIMU_STR_HLP_ACT_PAGE);
|
||||
addRadioWidget(ui->leftbuttons->addArea(QRect(25, 85, 80, 35), "X9D2019/left_page.png", act));
|
||||
|
||||
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(QRect(25, 140, 80, 35), "X9D2019/left_exit.png", act));
|
||||
|
||||
m_scrollUpAction = addRadioAction(new RadioUiAction(-1, QList<int>() << Qt::Key_Minus << Qt::Key_Left, SIMU_STR_HLP_KEYS_GO_LFT, SIMU_STR_HLP_ACT_ROT_LFT));
|
||||
m_scrollDnAction = addRadioAction(new RadioUiAction(-1, QList<int>() << Qt::Key_Plus << Qt::Key_Equal << Qt::Key_Right, SIMU_STR_HLP_KEYS_GO_RGT, SIMU_STR_HLP_ACT_ROT_RGT));
|
||||
connectScrollActions();
|
||||
|
||||
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(QRect(40, 30, 80, 130), "X9D2019/right_enter.png", m_mouseMidClickAction));
|
||||
|
||||
addRadioWidget(ui->leftbuttons->addArea(QRect(10, 170, 30, 30), "X9D2019/left_scrnshot.png", m_screenshotAction));
|
||||
|
||||
m_backlightColors << QColor(47, 123, 227); // Taranis Blue
|
||||
m_backlightColors << QColor(166,247,159);
|
||||
m_backlightColors << QColor(247,159,166);
|
||||
m_backlightColors << QColor(255,195,151);
|
||||
m_backlightColors << QColor(247,242,159);
|
||||
|
||||
setLcd(ui->lcd);
|
||||
|
||||
QString css = "#radioUiWidget {"
|
||||
"background-color: qlineargradient(spread:pad, x1:1, y1:0.9, x2:0, y2:0,"
|
||||
"stop:0 rgba(255, 255, 255, 255),"
|
||||
"stop:0.35 rgba(250, 250, 250, 255), stop:0.5 rgba(242, 241, 241, 255),"
|
||||
"stop:0.61 rgba(241, 241, 241, 255), stop:1.0 rgba(251, 251, 251, 255));"
|
||||
"}";
|
||||
|
||||
QTimer * tim = new QTimer(this);
|
||||
tim->setSingleShot(true);
|
||||
connect(tim, &QTimer::timeout, [this, css]() {
|
||||
emit customStyleRequest(css);
|
||||
});
|
||||
tim->start(100);
|
||||
}
|
||||
|
||||
SimulatedUIWidgetX9D2019::~SimulatedUIWidgetX9D2019()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
166
companion/src/simulation/simulateduiwidgetX9D2019.ui
Normal file
|
@ -0,0 +1,166 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SimulatedUIWidgetX9D2019</class>
|
||||
<widget class="QWidget" name="SimulatedUIWidgetX9D2019">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>756</width>
|
||||
<height>258</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>756</width>
|
||||
<height>258</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>756</width>
|
||||
<height>258</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" rowspan="3">
|
||||
<widget class="ButtonsWidget" name="leftbuttons" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>166</width>
|
||||
<height>258</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:url(:/images/simulator/X9D2019/left.png);</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" 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>424</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:url(:/images/simulator/X9D2019/top.png)</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>166</width>
|
||||
<height>258</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:url(:/images/simulator/X9D2019/right.png)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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>424</width>
|
||||
<height>128</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>424</width>
|
||||
<height>128</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QWidget" name="bottom" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>424</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:url(:/images/simulator/X9D2019/bottom.png)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LcdWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>lcdwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ButtonsWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>buttonswidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -68,9 +68,11 @@ SimulatorWidget::SimulatorWidget(QWidget * parent, SimulatorInterface * simulato
|
|||
break;
|
||||
case Board::BOARD_TARANIS_X9D:
|
||||
case Board::BOARD_TARANIS_X9DP:
|
||||
case Board::BOARD_TARANIS_X9DP_2019:
|
||||
radioUiWidget = new SimulatedUIWidgetX9(simulator, this);
|
||||
break;
|
||||
case Board::BOARD_TARANIS_X9DP_2019:
|
||||
radioUiWidget = new SimulatedUIWidgetX9D2019(simulator, this);
|
||||
break;
|
||||
case Board::BOARD_TARANIS_XLITE:
|
||||
case Board::BOARD_TARANIS_XLITES:
|
||||
radioUiWidget = new SimulatedUIWidgetXLITE(simulator, this);
|
||||
|
|