[Simulator] New main UI window, debug console, separate outputs window, more. (#4385)

* [package] Add QtSvg support DLLs for Windows.

* [Simulator] Add images/css resources for new version; Create SimulatorIcon and SimulatorStyle classes; Build with SVG support, remove unused bitmaps.

* [Simulator] Improve and simplify VirtualJoystickWidget resize event (sticks maintain X/Y position) & improve values layout w/out trims.

* [Simulator] Refactor Trainer simulator to use VirtualJoystickWidget, gains lock/hold buttons and X/Y position readout.

* [Simulator] More compact layout for Telemetry simulator, reduces min. width and adds scrolling columns to allow smaller window sizes.

* [Simulator] Add new SimulatorMainWindow and RadioOutputsWidget UI classes.

* [storage] Add non-persistent sessionId() to AppData for tracking currently active radio profile ID.

* [Simulator] Major UI updates:
    * Use a MainWindow interface with dockable/floatable windows, proper toolbar & menu;
    * Persistent size/layout state of all windows/docks/etc between uses, per radio profile;
    * Completely separate radio Outputs window with configurable layout (also persistent between uses);
    * Translations now enabled in standalone Simulator, follows main Companion setting (they need a lot of updates);
    * New custom icons throughout, toolbar icon sizes adhere to user preference in Companion.

* [Simulator] Debug Output console updates:
    * New filter feature with optional full RegEx support, can work in inclusive or exclusive modes (full help text is included in UI);
    * Up to 50 user-defined filters are saved to permanent settings, also a few predefined filters are provided;
    * Saves/restores the last filter used and if it was en/disabled;
    * Added word wrap and clear screen features;
    * Configurable scroll-back buffer size;
    * Increased efficiency & performance of the buffering/printing process.

* [Simulator][OSX] Visual UI tweaks for OS X.

* [Simulator] Fix some debug console settings not being restored properly.

* [Simulator] Add ability to hide/show menu bar; Persist view state of menu bar and radio title bar; Reduce font size on OS X; Other small visual tweaks and improvements.

* [build] Add QtSvg to Linux build scripts (a guess for Dockerfile).

* [build] Fix for Qt 5.3.

* Add OpenTx headers to new files.

* [Companion][storage] Update GeneralSettings() initializer to use current sessionId for profile data retrieval, removes workaround for standalone Simulator being started with arbitrary profile; AppData: always update sessionId when global id() changes.

* [X10] Fixes for new simulator
This commit is contained in:
Max Paperno
2017-02-04 11:59:42 +01:00
committed by Bertrand Songis
parent b493973d7d
commit 2f9d9c1a99
62 changed files with 6357 additions and 3095 deletions
+77
View File
@@ -0,0 +1,77 @@
/*
MainWindow separators and Splitter
*/
QMainWindow::separator,
QSplitter::handle {
border: .05em solid palette(dark);
}
QMainWindow::separator:horizontal {
height: .15em;
margin: .2em 0em;
border-left: 0;
border-right: 0;
}
QMainWindow::separator:vertical {
width: .15em;
margin: 0em .2em;
border-top: 0;
border-bottom: 0;
}
QSplitter[orientation="1"]::handle,
QSplitter[orientation="1"] QSplitterHandle {
margin: 0em .15em 0em;
max-width: .15em;
min-width: .15em;
border-top: 0;
border-bottom: 0;
}
QSplitter[orientation="2"]::handle,
QSplitter[orientation="2"] QSplitterHandle {
margin: .15em 0em 0em;
max-height: .15em;
min-height: .15em;
border-left: 0;
border-right: 0;
}
QSplitterHandle:hover {}
QMainWindow::separator:hover,
QSplitter::handle:hover {
background-color: palette(highlight);
}
/*
Specific UI class styles
*/
/* default radio "case" background */
SimulatorDialog > QWidget {
background-color: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(242, 242, 242, 255), stop:0.757062 rgba(222, 220, 220, 255), stop:1 rgba(232, 230, 230, 255));
}
/* radio LCD/controls area under "case" */
SimulatorDialog #radioUiWidget {
background-color: qlineargradient(spread:reflect, x1:0.22, y1:0, x2:0.55065, y2:0.54, stop:0 rgba(7, 7, 7, 250), stop:0.864407 rgba(66, 66, 66, 255));
margin: 0;
padding: 0;
}
/* outputs display splitter areas (channels, logical switches, global vars) */
RadioOutputsWidget > QSplitter > QWidget {
border: 1px solid #a1a1a1;
}
/* vertical headings with the area names */
RadioOutputsWidget QLabel[heading=true] {
background-color: qlineargradient(spread:reflect, x1:0.22, y1:0, x2:0.5, y2:0.55, stop:0 rgba(20, 20, 20, 250), stop:0.85 rgba(86, 86, 86, 255));
color: rgb(248, 248, 248);
border-color: rgb(180, 180, 180);
padding: 0.8em 0.45em;
font-size: 8pt;
}