TestControl: prepare a location in the UI for test and diagnostics (#1074)
This commit is contained in:
parent
245a07bc16
commit
7f760d77e5
5 changed files with 208 additions and 5 deletions
|
|
@ -70,8 +70,8 @@ namespace ctrl {
|
|||
|
||||
|
||||
/**
|
||||
* A helper class which registers and handles
|
||||
* user action events.
|
||||
* A helper class which registers global user actions
|
||||
* and populates the main menu and toolbar.
|
||||
*/
|
||||
class Actions
|
||||
: util::NonCopyable
|
||||
|
|
@ -130,6 +130,7 @@ namespace ctrl {
|
|||
|
||||
menu("HelpMenu", _("_Help"));
|
||||
entry ([&]() { globalCtx_.wizard_.show_HelpAbout(); } , "HelpAbout", Stock::ABOUT);
|
||||
entry ([&]() { globalCtx_.wizard_.launchTestCtrl(); } , "HelpTest", _("Self _Tests..."));
|
||||
|
||||
|
||||
menu("WindowMenu", _("_Window"));
|
||||
|
|
@ -202,6 +203,7 @@ namespace ctrl {
|
|||
</menu>
|
||||
<menu action='HelpMenu'>
|
||||
<menuitem action='HelpAbout'/>
|
||||
<menuitem action='HelpTest'/>
|
||||
</menu>
|
||||
</menubar>
|
||||
<toolbar name='ToolBar'>
|
||||
|
|
|
|||
99
src/gui/dialog/test-control.hpp
Normal file
99
src/gui/dialog/test-control.hpp
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
TEST-CONTROL.hpp - child window to trigger self tests and diagnostics
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2018, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
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.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/** @file test-control.hpp
|
||||
** Non-modal dialog window to trigger diagnostics and self test routines.
|
||||
** This window can be launched from the help menu as child window of the current
|
||||
** top-level workspace window and stays outside of the regular window and perspective
|
||||
** management of the Lumiera UI. This window allows for quick-n-dirty development
|
||||
** helper routines to be hooked up easily within the UI. Actions launched from here
|
||||
** perform within the same environment as regular user interactions.
|
||||
**
|
||||
** @todo as of 9/2018, this is a first rough draft, relevant for #1099 ////////////////////////////TICKET #1074 gradually augment the self-diagnostics controls in the UI
|
||||
*/
|
||||
|
||||
|
||||
#ifndef GUI_DIALOG_TEST_CONTROL_H
|
||||
#define GUI_DIALOG_TEST_CONTROL_H
|
||||
|
||||
|
||||
#include "gui/gtk-base.hpp"
|
||||
#include "gui/dialog/dialog.hpp"
|
||||
|
||||
namespace gui {
|
||||
namespace dialog {
|
||||
|
||||
|
||||
class TestControl
|
||||
: public Gtk::Dialog
|
||||
{
|
||||
Gtk::Notebook notebook_;
|
||||
|
||||
Gtk::Box page_1_;
|
||||
Gtk::Button trigger_1_;
|
||||
|
||||
public:
|
||||
TestControl (Gtk::Window &parent)
|
||||
: Dialog(_("Test and Diagnostics"), parent, Gtk::DIALOG_DESTROY_WITH_PARENT)
|
||||
, page_1_{Gtk::ORIENTATION_VERTICAL}
|
||||
{
|
||||
using namespace Gtk;
|
||||
|
||||
// Setup the overall dialog layout
|
||||
set_border_width (BorderPadding);
|
||||
get_content_area()->pack_start (notebook_);
|
||||
|
||||
//-----Page-1------------------------------
|
||||
trigger_1_.set_label ("_doIt");
|
||||
trigger_1_.set_use_underline();
|
||||
trigger_1_.set_tooltip_markup (_("<b>Ticket #1099</b>:\ntrigger Proc-GUI roundtrip"));
|
||||
trigger_1_.signal_clicked().connect(
|
||||
mem_fun(*this, &TestControl::demoGuiRoundtrip));
|
||||
|
||||
page_1_.pack_start (trigger_1_, PACK_SHRINK);
|
||||
notebook_.append_page (page_1_, _("#1099"));
|
||||
|
||||
|
||||
show_all_children();
|
||||
}
|
||||
|
||||
|
||||
private: /* ==== individual Test/Diagnostics routines ==== */
|
||||
|
||||
/**
|
||||
* Ticket #1099 : perform a dummy round-trip to verify Proc-GUI integration.
|
||||
* This routine invokes the command 'xxx' down in Proc-Layer, passing the settings
|
||||
* from the radio buttons to select the flavour of feedback, and the text for feedback content.
|
||||
* The expected behaviour is for the invoked command to send a feedback via UI-Bus towards
|
||||
* the ErrorLogDisplay within the InfoboxPanel.
|
||||
*/
|
||||
void
|
||||
demoGuiRoundtrip()
|
||||
{
|
||||
UNIMPLEMENTED ("collect command arguments and then send the command message for #1099");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace gui::dialog
|
||||
#endif /*GUI_DIALOG_TEST_CONTROL_H*/
|
||||
|
|
@ -115,5 +115,18 @@ namespace interact {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Launch a non modal child window to trigger self-test actions.
|
||||
* This is a tool for developers and diagnostics. The operations exposed here
|
||||
* allow to trigger some hard wired actions and test routines, performing within
|
||||
* the regular UI environment and on equal footing with user operated controls.
|
||||
*/
|
||||
void
|
||||
Wizard::launchTestCtrl()
|
||||
{
|
||||
UNIMPLEMENTED ("create and attach a non-modal child dialog box page");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}}// namespace gui::interact
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ namespace ctrl {
|
|||
class GlobalCtx;
|
||||
class NotificationHub;
|
||||
}
|
||||
namespace dialog {
|
||||
class TestControl;
|
||||
}
|
||||
namespace interact {
|
||||
|
||||
using std::unique_ptr;
|
||||
|
|
@ -90,6 +93,7 @@ namespace interact {
|
|||
~Wizard ();
|
||||
|
||||
void show_HelpAbout();
|
||||
void launchTestCtrl();
|
||||
|
||||
static ID getErrorLogID() { return proc::asset::meta::theErrorLog_ID; }
|
||||
|
||||
|
|
|
|||
|
|
@ -2712,9 +2712,94 @@
|
|||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533689225658" ID="ID_662017160" MODIFIED="1533689310654" TEXT="Pling! -Button">
|
||||
<icon BUILTIN="full-5"/>
|
||||
<node CREATED="1533689235200" ID="ID_1760873318" MODIFIED="1533689242460" TEXT="in der Test-Timeline"/>
|
||||
<node CREATED="1533689243871" ID="ID_1745090225" MODIFIED="1533689254514" TEXT="triggert Dummy-Command"/>
|
||||
<node CREATED="1533689255174" ID="ID_821013695" MODIFIED="1533689263657" TEXT="dieses ruft die Notification_Facade auf"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533689235200" ID="ID_1760873318" MODIFIED="1537836493850" TEXT="non-modal TestControl">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537836495530" ID="ID_182389429" MODIFIED="1537836505458" TEXT="per Menüeintrag öffnen">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1537841662854" ID="ID_451055929" MODIFIED="1537841679676" TEXT="Menüeintrag im Hilfe-Menü">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1537841672261" ID="ID_1740266874" MODIFIED="1537841678780" TEXT="wird gemanaged vom Wizard">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537836597844" ID="ID_1217826524" MODIFIED="1537836608179" TEXT="Konstrukt wie im Tutorial">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1537836612210" ID="ID_225351262" LINK="https://developer.gnome.org/gtkmm-tutorial/stable/sec-about-dialog.html.en#aboutdialog-example" MODIFIED="1537836626843" TEXT="non-modal about dialog">
|
||||
<icon BUILTIN="info"/>
|
||||
</node>
|
||||
<node CREATED="1537838250303" ID="ID_1190002074" MODIFIED="1537841497288" TEXT="ist ein sub-window besser">
|
||||
<icon BUILTIN="button_cancel"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537838265916" ID="ID_920100816" MODIFIED="1537841473971" TEXT="wie?">
|
||||
<icon BUILTIN="help"/>
|
||||
<node CREATED="1537838337960" ID="ID_1900235846" MODIFIED="1537838337960" TEXT="set_transient_for (Window& parent)"/>
|
||||
<node CREATED="1537838432423" ID="ID_1065922306" MODIFIED="1537838432423" TEXT="set_type_hint (Gdk::WindowTypeHint hint)">
|
||||
<node CREATED="1537838435238" ID="ID_1301145489" MODIFIED="1537838439809" TEXT="nicht klar ob relevant"/>
|
||||
</node>
|
||||
<node CREATED="1537838544449" ID="ID_1666779438" LINK="https://developer.gnome.org/gtkmm/3.22/classGtk_1_1Window.html#a1f70b3c35e8c477ab3c1f9503a37a6a1" MODIFIED="1537838555867" TEXT="set_modal (bool modal=true)"/>
|
||||
<node CREATED="1537838781593" MODIFIED="1537838781593" TEXT="property_destroy_with_parent ()"/>
|
||||
</node>
|
||||
<node CREATED="1537841505883" ID="ID_1112461783" MODIFIED="1537841514485" TEXT="geht wohl, ist aber etwas umständlich"/>
|
||||
</node>
|
||||
<node CREATED="1537841516945" ID="ID_1578548739" MODIFIED="1537841529797" TEXT="Dialog-Basisklasse non-modal">
|
||||
<icon BUILTIN="idea"/>
|
||||
<node CREATED="1537841531352" ID="ID_1190471518" MODIFIED="1537841543154" TEXT="hat eigene Konstruktoren, die den Dialog non-modal machen"/>
|
||||
<node CREATED="1537841543886" ID="ID_59238198" MODIFIED="1537841558488" TEXT="regelt schon automatisch das Verhältnis zum Vaterfenster"/>
|
||||
<node CREATED="1537846114160" ID="ID_1907327221" MODIFIED="1537846128474" TEXT="Vorbild: Joel's PreferencesDialog">
|
||||
<node CREATED="1537846129846" ID="ID_984655666" MODIFIED="1537846137073" TEXT="muß nur noch non-modal sein..."/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537836550411" ID="ID_899229612" MODIFIED="1537836572756" TEXT="hängt (passiv) am UI-Bus">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537836522950" ID="ID_87203159" MODIFIED="1537836526719" TEXT="Radiobuttons">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537834955977" ID="ID_556296967" MODIFIED="1537834965289" TEXT="Argument-Textbox">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537836579647" ID="ID_951515368" MODIFIED="1537836584271" TEXT="Pling!">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533689243871" ID="ID_1745090225" MODIFIED="1537834968776" TEXT="triggert Dummy-Command">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533689255174" ID="ID_821013695" MODIFIED="1537835685388" TEXT="Aufruf via Notification_Facade">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1537835197558" ID="ID_1477928890" MODIFIED="1537835197558" TEXT="displayInfo"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537835015601" ID="ID_1684094906" MODIFIED="1537835021881" TEXT="direkte Bus-Aufrufe">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537835220978" ID="ID_1439086949" MODIFIED="1537835698918" TEXT="markError">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537835228018" ID="ID_1420898810" MODIFIED="1537835700414" TEXT="markNote">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537835741000" ID="ID_1072038781" MODIFIED="1537835764630" TEXT="mark">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537835767228" ID="ID_400466516" MODIFIED="1537835899052" TEXT="FLASH">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537835848674" ID="ID_1915433481" MODIFIED="1537835898316" TEXT="REVEAL">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537835859576" ID="ID_968868056" MODIFIED="1537835897556" TEXT="CLEAR_ERR">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537835874382" ID="ID_252957072" MODIFIED="1537835896708" TEXT="CLEAR_MSG">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537835880405" ID="ID_992909467" MODIFIED="1537835895900" TEXT="RESET">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537835889996" ID="ID_5762574" MODIFIED="1537835895044" TEXT="GenNode">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1534721737507" ID="ID_1467431829" MODIFIED="1534721762112" TEXT="verifizieren">
|
||||
<icon BUILTIN="full-6"/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue