[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
+18 -2
View File
@@ -428,7 +428,9 @@ QString Profile::groupId()
// ** AppData class********************
// Get declarations
QStringList AppData::recentFiles() { return _recentFiles; }
QStringList AppData::recentFiles() { return _recentFiles; }
QStringList AppData::simuDbgFilters() { return _simuDbgFilters; }
QByteArray AppData::mainWinGeo() { return _mainWinGeo; }
QByteArray AppData::mainWinState() { return _mainWinState; }
QByteArray AppData::modelEditGeo() { return _modelEditGeo; }
@@ -475,9 +477,12 @@ int AppData::id() { return _id; }
int AppData::theme() { return _theme; }
int AppData::warningId() { return _warningId; }
int AppData::simuLastProfId() { return _simuLastProfId; }
int AppData::sessionId() { return _sessionId; }
// Set declarations
void AppData::recentFiles (const QStringList x) { store(x, _recentFiles, "recentFileList" );}
void AppData::simuDbgFilters (const QStringList x) { store(x, _simuDbgFilters, "simuDbgFilters" );}
void AppData::mainWinGeo (const QByteArray x) { store(x, _mainWinGeo, "mainWindowGeometry" );}
void AppData::mainWinState (const QByteArray x) { store(x, _mainWinState, "mainWindowState" );}
void AppData::modelEditGeo (const QByteArray x) { store(x, _modelEditGeo, "modelEditGeometry" );}
@@ -520,11 +525,19 @@ void AppData::generalEditTab (const int x) { store(x, _generalEditTab,
void AppData::iconSize (const int x) { store(x, _iconSize, "icon_size" );}
void AppData::historySize (const int x) { store(x, _historySize, "history_size" );}
void AppData::jsCtrl (const int x) { store(x, _jsCtrl, "js_ctrl" );}
void AppData::id (const int x) { store(x, _id, "profileId" );}
void AppData::theme (const int x) { store(x, _theme, "theme" );}
void AppData::warningId (const int x) { store(x, _warningId, "warningId" );}
void AppData::simuLastProfId (const int x) { store(x, _simuLastProfId, "simuLastProfId" );}
void AppData::id(const int x)
{
store(x, _id, "profileId");
sessionId(x);
}
// currently loaded radio profile ID, NOT saved to persistent storage
void AppData::sessionId (const int x) { _sessionId = x; }
// Constructor
AppData::AppData()
{
@@ -667,6 +680,8 @@ void AppData::init()
getset( _tempString, "settings_version" ,"220" ); // This is a version marker. Will be used to upgrade the settings later on.
getset( _recentFiles, "recentFileList" ,"" );
getset( _simuDbgFilters, "simuDbgFilters" ,"" );
getset( _mainWinGeo, "mainWindowGeometry" ,"" );
getset( _mainWinState, "mainWindowState" ,"" );
getset( _modelEditGeo, "modelEditGeometry" ,"" );
@@ -722,6 +737,7 @@ void AppData::init()
getset( _warningId, "warningId" ,0 );
getset( _simuLastProfId, "simuLastProfId" ,-1 );
sessionId(id());
}
QMap<int, QString> AppData::getActiveProfiles()