44
55#include < QDebug>
66
7- Q_PLUGIN_METADATA (IID " studio.manivault.ExampleActionsPlugin" )
7+ #include < actions/TriggerAction.h>
8+ #include < actions/TriggersAction.h>
9+ #include < actions/ToggleAction.h>
10+ #include < actions/OptionAction.h>
11+ #include < actions/OptionsAction.h>
12+ #include < actions/ColorAction.h>
13+ #include < actions/ColorMap1DAction.h>
814
9- using namespace mv;
15+ Q_PLUGIN_METADATA (IID " studio.manivault.ExampleActionsPlugin " ) using namespace mv;
1016
1117ExampleActionsPlugin::ExampleActionsPlugin (const PluginFactory* factory) :
1218 ViewPlugin(factory)
@@ -22,13 +28,19 @@ void ExampleActionsPlugin::init()
2228
2329 getWidget ().setLayout (layout);
2430
25- _actionsWidget.addAction (" Textual " , " String " , [this ](QWidget* parent) -> WidgetAction* {
26- return new StringAction (this , " Example string action" , " Initial string value " );
31+ _actionsWidget.addAction (" Trigger " , " Trigger " , [this ](QWidget* parent) -> WidgetAction* {
32+ return new TriggerAction (this , " Example trigger action" );
2733 }, {
28- { " Label" , 1 },
29- { " LineEdit" , 2 },
30- { " TextEdit" , 4 }
31- }, { " LineEdit" });
34+ { " Icon" , 1 },
35+ { " Text" , 2 },
36+ }, { " Icon" , " Text" });
37+
38+ _actionsWidget.addAction (" Trigger" , " Triggers" , [this ](QWidget* parent) -> WidgetAction* {
39+ return new TriggersAction (this , " Example Triggers action" , { { " Trigger 1" , " Action 1" }, { " Trigger 2" , " Action 2" } });
40+ }, {
41+ { " Horizontal" , 1 },
42+ { " Vertical" , 2 },
43+ }, { " Horizontal" });
3244
3345 _actionsWidget.addAction (" Textual" , " Strings" , [this ](QWidget* parent) -> WidgetAction* {
3446 return new StringsAction (this , " Example strings action" , { " String 1" , " String 2" , " String 3" });
@@ -65,6 +77,17 @@ void ExampleActionsPlugin::init()
6577 { " File" , 8 },
6678 { " Tags" , 10 }
6779 }, { " ComboBox" });
80+
81+ _actionsWidget.addAction (" Color" , " Color" , [this ](QWidget* parent) -> WidgetAction* {
82+ return new ColorAction (this , " Example color action" );
83+ });
84+
85+ _actionsWidget.addAction (" Color" , " 1D color map" , [this ](QWidget* parent) -> WidgetAction* {
86+ return new ColorMap1DAction (this , " Example 1D color map action" );
87+ }, {
88+ { " Settings" , 1 },
89+ { " EditRange" , 2 }
90+ }, { " Settings" });
6891}
6992
7093ExampleActionsPluginFactory::ExampleActionsPluginFactory ()
0 commit comments