From ded843b989468184f5bd28ecb256403e6d6a792d Mon Sep 17 00:00:00 2001 From: Max Paperno Date: Mon, 6 Feb 2017 12:27:03 -0500 Subject: [PATCH] [Simulator] UI tweaks for last major update. (#4414) * [Simulator] Debug output: Adjust exclusion filter, help text background color, fix help text typos & mark as translatable. * [Simulator] Radio Outputs: Fix wrong FM highlighted (closes #4408) and current FM not highlighted until switched once; Change highlight color role of active LS/FM so it is always shown (fixes #4393); Active LSs now much more obvious (bold font & sunken frame). * [Simulator] Rework some SimulatorMainWindow functionality: * Fix floating dock widgets appearing behind other applications on Linux (https://github.com/opentx/opentx/issues/4403#issuecomment-277510273); * Fix previously-unused floating dock widgets appearing in top-left corner upon subsequent launches of application (https://github.com/opentx/opentx/pull/4385#issuecomment-277315158); * Fix various anomalies due to not using a "central widget" in QMainWindow (extra separators appearing, vertical resize not working in some cases), radio widget is now central by default; * Add (keep) option to float the radio widget separate from main window, though this may cause the minor visual anomalies mentioned above; * Add options to disable radio widget size constraints while docked. --- companion/src/simulation/debugoutput.cpp | 14 +- .../src/simulation/radiooutputswidget.cpp | 72 +++--- companion/src/simulation/radiooutputswidget.h | 2 +- companion/src/simulation/simulatordialog.ui | 8 +- .../src/simulation/simulatormainwindow.cpp | 231 +++++++++++++----- .../src/simulation/simulatormainwindow.h | 14 +- .../src/simulation/simulatormainwindow.ui | 63 ++++- 7 files changed, 280 insertions(+), 124 deletions(-) diff --git a/companion/src/simulation/debugoutput.cpp b/companion/src/simulation/debugoutput.cpp index f894767df..dafd871c4 100644 --- a/companion/src/simulation/debugoutput.cpp +++ b/companion/src/simulation/debugoutput.cpp @@ -67,7 +67,7 @@ DebugOutput::DebugOutput(QWidget * parent, SimulatorInterface *simulator): QStringList stockFilters; stockFilters << "^lua[A-Z].*"; stockFilters << "/(error|warning|-(E|W)-)/i"; - stockFilters << "!^(GC Use|(play|load|write|find(True)?)File|convert(To|From)Simu|\\tfound( in map)?:|eeprom |f_[a-z]+\\(|(push|(p|P)op(up)?|chain)? ?Menu( .+ display)?|RamBackup).+$"; + stockFilters << "!^(GC Use|(play|load|write|find(True)?)File|convert(To|From)Simu|\\t(not )?found( in map)?:?|eeprom |f_[a-z]+\\(|(push|(p|P)op(up)?|chain)? ?Menu( .+ display)?|RamBackup).+$"; foreach (const QString & fltr, stockFilters) ui->filterText->addItem(fltr, "no_delete"); @@ -267,9 +267,9 @@ void DebugOutput::on_actionClearScr_triggered() void DebugOutput::on_actionShowFilterHelp_triggered() { // TODO : find some place better for this. - QString help = \ - "" - "

The filter supports two syntax types: basic matching with common wildcards and well as full Perl-style (pcre) Regular Expressions.

" + QString help = tr( \ + "" + "

The filter supports two syntax types: basic matching with common wildcards as well as full Perl-style (pcre) Regular Expressions.

" "

By default a filter will only show lines which match (inclusive). To make an exclusive filter which removes matching lines, " "prefix the filter expression with a ! (exclamation mark).

" "

To use Regular Expressions (RegEx), prefix the filter text with a / (slash) or ^ (up caret). " @@ -280,8 +280,9 @@ void DebugOutput::on_actionShowFilterHelp_triggered() "

  • If the RegEx is invalid, the filter edit field should show a red border and you will not be able to enable the filter.
  • " "
  • A useful resource for testing REs (with a full reference) can be found at http://www.regexr.com/
  • " "

    " - "

    To use basic matching just type any text. Wildcards * (asterisk) matches any text and ? (question mark) matches any single character." + "

    To use basic matching just type any text." "