From 7051941525ad1a95c6a6d4e160f34dcfc50957cc Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 5 Oct 2020 12:27:52 +0200 Subject: [PATCH] colored plot help --- client/src/proxguiqt.cpp | 56 +++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/client/src/proxguiqt.cpp b/client/src/proxguiqt.cpp index 089b2eb93..02a9b4c7b 100644 --- a/client/src/proxguiqt.cpp +++ b/client/src/proxguiqt.cpp @@ -840,36 +840,32 @@ void Plot::keyPressEvent(QKeyEvent *event) { break; case Qt::Key_H: - puts("\n-----------------------------------------------------------------------"); - puts("PLOT window keystrokes"); - puts("\tKey Action"); - puts("-----------------------------------------------------------------------"); - puts("\tUP Zoom out around yellow cursor"); - puts("\t UP Zoom out around purple cursor"); - puts("\t WHEEL MOUSE UP Zoom out around mouse cursor"); - puts("\tDOWN Zoom in around yellow cursor"); - puts("\t DOWN Zoom in around purple cursor"); - puts("\t WHEEL MOUSE DOWN Zoom in around mouse cursor"); - puts("\tG Toggle grid display"); - puts("\tH Show help"); - puts("\tL Toggle lock grid relative to samples"); - puts("\tQ Hide window"); - puts("\tT Trim data on displayed window or on cursors if defined"); - puts("\tHOME Move to the start of the graph"); - puts("\tEND Move to the end of the graph"); - puts("\tPGUP Page left"); - puts("\tPGDOWN Page right"); - puts("\tLEFT Move left"); - puts("\tRIGHT Move right"); - puts("\tWHEEL MOUSE UP Move left"); - puts("\tWHEEL MOUSE DOWN Move right"); - puts("\t LEFT Move left 1 sample"); - puts("\t RIGHT Move right 1 sample"); - puts("\t LEFT Page left"); - puts("\t RIGHT Page right"); - puts("\tLEFT MOUSE CLICK Set yellow cursor"); - puts("\tRIGHT MOUSE CLICK Set purple cursor"); - puts("-----------------------------------------------------------------------"); + g_printAndLog = PRINTANDLOG_PRINT; + PrintAndLogEx(NORMAL, "\n\n" _CYAN_("PLOT window keystrokes and mouse events")); + PrintAndLogEx(NORMAL, "\n" _GREEN_("Move:")); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9+9, _RED_("Home") "/" _RED_("End"), "Move to the start/end of the graph"); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9, _YELLOW_("Mouse wheel"), "Move left/right"); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9+9, _RED_("Left") "/" _RED_("Right"), "Move left/right"); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9, " + " _RED_("Ctrl"), "... by 1 sample"); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9, " + " _RED_("Shift"), "... by 1 window"); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9+9, _RED_("PgUp") "/" _RED_("PgDown"), "Move left/right by 1 window"); + PrintAndLogEx(NORMAL, "\n" _GREEN_("Zoom:")); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9+9, _RED_("Shift") " + " _YELLOW_("Mouse wheel"), "Zoom in/out around mouse cursor"); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9+9, _RED_("Down") "/" _RED_("Up"), "Zoom in/out around yellow cursor"); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9, " + " _RED_("Ctrl"), "... with smaller increment"); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9, " + " _RED_("Shift"), "... around purple cursor"); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9, _RED_("h"), "Show this help"); + PrintAndLogEx(NORMAL, "\n" _GREEN_("Trim:")); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9, _RED_("t"), "Trim data on window or on cursors if defined"); + PrintAndLogEx(NORMAL, "\n" _GREEN_("Grid:")); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9, _RED_("g"), "Toggle grid display"); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9, _RED_("l"), "Toggle lock grid relative to samples"); + PrintAndLogEx(NORMAL, "\n" _GREEN_("Misc:")); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9, _YELLOW_("Left mouse click"), "Set yellow cursor"); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9, _YELLOW_("Right mouse click"), "Set purple cursor"); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9, _RED_("h"), "Show this help"); + PrintAndLogEx(NORMAL, " %-*s%s", 25+9, _RED_("q"), "Close plot window"); + g_printAndLog = PRINTANDLOG_PRINT | PRINTANDLOG_LOG; break; case Qt::Key_L: