1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-21 23:35:12 +03:00
* X10 simu images

* X10 simu UI
This commit is contained in:
Martin Hotar 2017-11-16 21:49:39 +01:00 committed by Andre Bernet
parent 2e14773f1a
commit c8dfccc365
34 changed files with 333 additions and 30 deletions

View file

@ -47,21 +47,32 @@
<file>images/simulator/icons/svg/trainer-active.svg</file>
<file>images/simulator/icons/svg/word_wrap.svg</file>
<file>images/simulator/icons/svg/word_wrap-on.svg</file>
<file>images/simulator/Horus/middle.png</file>
<file>images/simulator/Horus/left.png</file>
<file>images/simulator/Horus/right.png</file>
<file>images/simulator/Horus/top.png</file>
<file>images/simulator/Horus/bottom.png</file>
<file>images/simulator/Horus/led.png</file>
<file>images/simulator/Horus/border-right.png</file>
<file>images/simulator/Horus/left_btn1.png</file>
<file>images/simulator/Horus/left_btn2.png</file>
<file>images/simulator/Horus/left_scrnsht.png</file>
<file>images/simulator/Horus/right_btnU.png</file>
<file>images/simulator/Horus/right_btnL.png</file>
<file>images/simulator/Horus/right_btnD.png</file>
<file>images/simulator/Horus/right_btnR.png</file>
<file>images/simulator/Horus/right_ent.png</file>
<file>images/simulator/X12/middle.png</file>
<file>images/simulator/X12/left.png</file>
<file>images/simulator/X12/right.png</file>
<file>images/simulator/X12/top.png</file>
<file>images/simulator/X12/bottom.png</file>
<file>images/simulator/X12/led.png</file>
<file>images/simulator/X12/border-right.png</file>
<file>images/simulator/X12/left_btn1.png</file>
<file>images/simulator/X12/left_btn2.png</file>
<file>images/simulator/X12/left_scrnsht.png</file>
<file>images/simulator/X12/right_btnU.png</file>
<file>images/simulator/X12/right_btnL.png</file>
<file>images/simulator/X12/right_btnD.png</file>
<file>images/simulator/X12/right_btnR.png</file>
<file>images/simulator/X12/right_ent.png</file>
<file>images/simulator/X10/left.png</file>
<file>images/simulator/X10/right.png</file>
<file>images/simulator/X10/top.png</file>
<file>images/simulator/X10/bottom.png</file>
<file>images/simulator/X10/left_mdl.png</file>
<file>images/simulator/X10/left_page.png</file>
<file>images/simulator/X10/left_scrnsht.png</file>
<file>images/simulator/X10/left_rtn.png</file>
<file>images/simulator/X10/left_sys.png</file>
<file>images/simulator/X10/left_tele.png</file>
<file>images/simulator/X10/right_ent.png</file>
<file>images/simulator/9X/9xdb.png</file>
<file>images/simulator/9X/9xdl.png</file>
<file>images/simulator/9X/9xdr.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 987 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Before After
Before After

View file

@ -7,6 +7,7 @@ set(simulation_SRCS
simulateduiwidgetX7.cpp
simulateduiwidgetX9.cpp
simulateduiwidgetX9E.cpp
simulateduiwidgetX10.cpp
simulateduiwidgetX12.cpp
simulatorinterface.cpp
simulatormainwindow.cpp
@ -25,6 +26,7 @@ set(simulation_UIS
simulateduiwidgetX7.ui
simulateduiwidgetX9.ui
simulateduiwidgetX9E.ui
simulateduiwidgetX10.ui
simulateduiwidgetX12.ui
simulatormainwindow.ui
simulatorstartupdialog.ui

View file

@ -107,6 +107,7 @@ namespace Ui {
class SimulatedUIWidgetX7;
class SimulatedUIWidgetX9;
class SimulatedUIWidgetX9E;
class SimulatedUIWidgetX10;
class SimulatedUIWidgetX12;
}
@ -162,6 +163,18 @@ class SimulatedUIWidgetX9E: public SimulatedUIWidget
Ui::SimulatedUIWidgetX9E * ui;
};
class SimulatedUIWidgetX10: public SimulatedUIWidget
{
Q_OBJECT
public:
explicit SimulatedUIWidgetX10(SimulatorInterface * simulator, QWidget * parent = NULL);
virtual ~SimulatedUIWidgetX10();
private:
Ui::SimulatedUIWidgetX10 * ui;
};
class SimulatedUIWidgetX12: public SimulatedUIWidget
{
Q_OBJECT

View file

@ -0,0 +1,78 @@
/*
* 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.
*/
#include "simulateduiwidget.h"
#include "ui_simulateduiwidgetX10.h"
SimulatedUIWidgetX10::SimulatedUIWidgetX10(SimulatorInterface *simulator, QWidget * parent):
SimulatedUIWidget(simulator, parent),
ui(new Ui::SimulatedUIWidgetX10)
{
RadioUiAction * act;
QPolygon polygon;
ui->setupUi(this);
// add actions in order of appearance on the help menu
int x = 74, y = 148, oR = 63, iR = 40;
polygon.clear();
polygon << polyArc(x, y, oR, -45, 45) << polyArc(x, y, iR, -45, 45);
act = new RadioUiAction(3, QList<int>() << Qt::Key_Up, SIMU_STR_HLP_KEY_UP, SIMU_STR_HLP_ACT_MDL);
addRadioWidget(ui->leftbuttons->addArea(polygon, "X10/left_mdl.png", act));
polygon.clear();
polygon << polyArc(x, y, oR, 225, 315) << polyArc(x, y, iR, 225, 315);
act = new RadioUiAction(6, QList<int>() << Qt::Key_Left, SIMU_STR_HLP_KEY_LFT, SIMU_STR_HLP_ACT_SYS);
addRadioWidget(ui->leftbuttons->addArea(polygon, "X10/left_sys.png", act));
polygon.clear();
polygon << polyArc(x, y, oR, 45, 135) << polyArc(x, y, iR, 45, 135);
act = new RadioUiAction(5, QList<int>() << Qt::Key_Right, SIMU_STR_HLP_KEY_RGT, SIMU_STR_HLP_ACT_TELE);
addRadioWidget(ui->leftbuttons->addArea(polygon, "X10/left_tele.png", act));
polygon.clear();
polygon << polyArc(x, y, oR, 135, 225) << polyArc(x, y, iR, 135, 225);
act = new RadioUiAction(4, QList<int>() << Qt::Key_Down << Qt::Key_Delete << Qt::Key_Escape << Qt::Key_Backspace,
SIMU_STR_HLP_KEY_DN % "<br>" % SIMU_STR_HLP_KEYS_EXIT, SIMU_STR_HLP_ACT_RTN);
addRadioWidget(ui->leftbuttons->addArea(polygon, "X10/left_rtn.png", act));
act = new RadioUiAction(1, QList<int>() << Qt::Key_PageDown, SIMU_STR_HLP_KEY_PGDN, SIMU_STR_HLP_ACT_PGDN);
addRadioWidget(ui->leftbuttons->addArea(polyArc(x, y, iR), "X10/left_page.png", act));
m_scrollUpAction = new RadioUiAction(-1, QList<int>() << Qt::Key_Minus, SIMU_STR_HLP_KEY_MIN % "|" % SIMU_STR_HLP_MOUSE_UP, SIMU_STR_HLP_ACT_ROT_LFT);
m_scrollDnAction = new RadioUiAction(-1, QList<int>() << Qt::Key_Plus << Qt::Key_Equal, SIMU_STR_HLP_KEY_PLS % "|" % SIMU_STR_HLP_MOUSE_DN, 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(polyArc(x, y, iR), "X10/right_ent.png", m_mouseMidClickAction));
addRadioWidget(ui->leftbuttons->addArea(QRect(10, 252, 30, 30), "X10/left_scrnsht.png", m_screenshotAction));
m_backlightColors << QColor(47, 123, 227);
setLcd(ui->lcd);
}
SimulatedUIWidgetX10::~SimulatedUIWidgetX10()
{
delete ui;
}

View file

@ -0,0 +1,197 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SimulatedUIWidgetX10</class>
<widget class="QWidget" name="SimulatedUIWidgetX10">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>825</width>
<height>292</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>825</width>
<height>292</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>825</width>
<height>292</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<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>174</width>
<height>292</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>174</width>
<height>292</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/X10/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>480</width>
<height>272</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>480</width>
<height>272</height>
</size>
</property>
<property name="font">
<font>
<pointsize>5</pointsize>
</font>
</property>
</widget>
</item>
<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>174</width>
<height>292</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>174</width>
<height>292</height>
</size>
</property>
<property name="mouseTracking">
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/X10/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>480</width>
<height>9</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>480</width>
<height>9</height>
</size>
</property>
<property name="font">
<font>
<pointsize>5</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/X10/top.png)</string>
</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>480</width>
<height>11</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>480</width>
<height>11</height>
</size>
</property>
<property name="font">
<font>
<pointsize>5</pointsize>
<kerning>false</kerning>
</font>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/X10/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>

View file

@ -36,42 +36,42 @@ SimulatedUIWidgetX12::SimulatedUIWidgetX12(SimulatorInterface *simulator, QWidge
polygon << polyArc(x, y, oR, 225, 315) << polyArc(x, y, iR, 225, 315);
act = new RadioUiAction(0, QList<int>() << Qt::Key_PageUp, SIMU_STR_HLP_KEY_PGUP, SIMU_STR_HLP_ACT_PGUP);
addRadioWidget(ui->leftbuttons->addArea(polygon, "Horus/left_btn1.png", act));
addRadioWidget(ui->leftbuttons->addArea(polygon, "X12/left_btn1.png", act));
polygon.clear();
polygon << polyArc(x, y, oR, 135, 225) << polyArc(x, y, iR, 135, 225);
act = new RadioUiAction(1, QList<int>() << Qt::Key_PageDown, SIMU_STR_HLP_KEY_PGDN, SIMU_STR_HLP_ACT_PGDN);
addRadioWidget(ui->leftbuttons->addArea(polygon, "Horus/left_btn2.png", act));
addRadioWidget(ui->leftbuttons->addArea(polygon, "X12/left_btn2.png", act));
polygon.clear();
polygon << polyArc(x, y, oR, -45, 45) << polyArc(x, y, iR, -45, 45);
act = new RadioUiAction(3, QList<int>() << Qt::Key_Up, SIMU_STR_HLP_KEY_UP, SIMU_STR_HLP_ACT_MDL);
addRadioWidget(ui->rightbuttons->addArea(polygon, "Horus/right_btnU.png", act));
addRadioWidget(ui->rightbuttons->addArea(polygon, "X12/right_btnU.png", act));
polygon.clear();
polygon << polyArc(x, y, oR, 225, 315) << polyArc(x, y, iR, 225, 315);
act = new RadioUiAction(6, QList<int>() << Qt::Key_Left, SIMU_STR_HLP_KEY_LFT, SIMU_STR_HLP_ACT_SYS);
addRadioWidget(ui->rightbuttons->addArea(polygon, "Horus/right_btnL.png", act));
addRadioWidget(ui->rightbuttons->addArea(polygon, "X12/right_btnL.png", act));
polygon.clear();
polygon << polyArc(x, y, oR, 45, 135) << polyArc(x, y, iR, 45, 135);
act = new RadioUiAction(5, QList<int>() << Qt::Key_Right, SIMU_STR_HLP_KEY_RGT, SIMU_STR_HLP_ACT_TELE);
addRadioWidget(ui->rightbuttons->addArea(polygon, "Horus/right_btnR.png", act));
addRadioWidget(ui->rightbuttons->addArea(polygon, "X12/right_btnR.png", act));
polygon.clear();
polygon << polyArc(x, y, oR, 135, 225) << polyArc(x, y, iR, 135, 225);
act = new RadioUiAction(4, QList<int>() << Qt::Key_Down << Qt::Key_Delete << Qt::Key_Escape << Qt::Key_Backspace,
SIMU_STR_HLP_KEY_DN % "<br>" % SIMU_STR_HLP_KEYS_EXIT, SIMU_STR_HLP_ACT_RTN);
addRadioWidget(ui->rightbuttons->addArea(polygon, "Horus/right_btnD.png", act));
addRadioWidget(ui->rightbuttons->addArea(polygon, "X12/right_btnD.png", act));
m_scrollUpAction = new RadioUiAction(-1, QList<int>() << Qt::Key_Minus, SIMU_STR_HLP_KEY_MIN % "|" % SIMU_STR_HLP_MOUSE_UP, SIMU_STR_HLP_ACT_ROT_LFT);
m_scrollDnAction = new RadioUiAction(-1, QList<int>() << Qt::Key_Plus << Qt::Key_Equal, SIMU_STR_HLP_KEY_PLS % "|" % SIMU_STR_HLP_MOUSE_DN, 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(polyArc(x, y, iR), "Horus/right_ent.png", m_mouseMidClickAction));
addRadioWidget(ui->rightbuttons->addArea(polyArc(x, y, iR), "X12/right_ent.png", m_mouseMidClickAction));
addRadioWidget(ui->leftbuttons->addArea(QRect(9, 259, 30, 30), "Horus/left_scrnsht.png", m_screenshotAction));
addRadioWidget(ui->leftbuttons->addArea(QRect(9, 259, 30, 30), "X12/left_scrnsht.png", m_screenshotAction));
m_backlightColors << QColor(47, 123, 227);

View file

@ -68,7 +68,7 @@
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/Horus/left.png);</string>
<string notr="true">background:url(:/images/simulator/X12/left.png);</string>
</property>
</widget>
</item>
@ -93,7 +93,7 @@
</size>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/Horus/led.png)</string>
<string notr="true">background:url(:/images/simulator/X12/led.png)</string>
</property>
</widget>
</item>
@ -123,7 +123,7 @@
</font>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/Horus/top.png)</string>
<string notr="true">background:url(:/images/simulator/X12/top.png)</string>
</property>
</widget>
</item>
@ -148,7 +148,7 @@
</size>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/Horus/border-right.png)</string>
<string notr="true">background:url(:/images/simulator/X12/border-right.png)</string>
</property>
</widget>
</item>
@ -173,7 +173,7 @@
</size>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/Horus/right.png)</string>
<string notr="true">background:url(:/images/simulator/X12/right.png)</string>
</property>
</widget>
</item>
@ -231,7 +231,7 @@
</font>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/Horus/bottom.png)</string>
<string notr="true">background:url(:/images/simulator/X12/bottom.png)</string>
</property>
</widget>
</item>

View file

@ -80,9 +80,11 @@ SimulatorWidget::SimulatorWidget(QWidget * parent, SimulatorInterface * simulato
radioUiWidget = new SimulatedUIWidgetX9E(simulator, this);
break;
case Board::BOARD_X12S :
case Board::BOARD_X10 :
radioUiWidget = new SimulatedUIWidgetX12(simulator, this);
break;
case Board::BOARD_X10 :
radioUiWidget = new SimulatedUIWidgetX10(simulator, this);
break;
default:
radioUiWidget = new SimulatedUIWidget9X(simulator, this);
break;