Skip to content

Commit b2b1139

Browse files
committed
Add numerical and disk actions to plugin
Introduced new actions for numerical input (decimal, integral, ranges, rectangles, points) and disk operations (file and directory pickers) to the ExampleActionsPlugin. Updated includes and registered these actions in the plugin initialization.
1 parent c652b79 commit b2b1139

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

ExampleActions/src/ExampleActionsPlugin.cpp

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@
1111
#include <actions/OptionsAction.h>
1212
#include <actions/ColorAction.h>
1313
#include <actions/ColorMap1DAction.h>
14+
#include <actions/DecimalAction.h>
15+
#include <actions/DecimalPointAction.h>
16+
#include <actions/DecimalRangeAction.h>
17+
#include <actions/DecimalRectangleAction.h>
18+
#include <actions/FilePickerAction.h>
19+
#include <actions/IntegralAction.h>
20+
#include <actions/IntegralPointAction.h>
21+
#include <actions/IntegralRangeAction.h>
22+
#include <actions/IntegralRectangleAction.h>
23+
#include <actions/FilePickerAction.h>
24+
#include <actions/DirectoryPickerAction.h>
1425

1526
Q_PLUGIN_METADATA(IID "studio.manivault.ExampleActionsPlugin")using namespace mv;
1627

@@ -88,6 +99,54 @@ void ExampleActionsPlugin::init()
8899
{ "Settings", 1 },
89100
{ "EditRange", 2 }
90101
}, { "Settings" });
102+
103+
_actionsWidget.addAction("Numerical", "Decimal", [this](QWidget* parent) -> WidgetAction* {
104+
return new DecimalAction(this, "Example decimal action", 0.0);
105+
}, {
106+
{ "SpinBox", 1 },
107+
{ "Slider", 2 },
108+
{ "LineEdit", 2 }
109+
}, { "SpinBox", "Slider" });
110+
111+
_actionsWidget.addAction("Numerical", "Decimal point", [this](QWidget* parent) -> WidgetAction* {
112+
return new DecimalPointAction(this, "Example decimal point action");
113+
});
114+
115+
_actionsWidget.addAction("Numerical", "Decimal range", [this](QWidget* parent) -> WidgetAction* {
116+
return new DecimalRangeAction(this, "Example decimal range action", 0.0, 1.0);
117+
});
118+
119+
_actionsWidget.addAction("Numerical", "Decimal rectangle", [this](QWidget* parent) -> WidgetAction* {
120+
return new DecimalRectangleAction(this, "Example decimal rectangle action");
121+
});
122+
123+
_actionsWidget.addAction("Numerical", "Integral", [this](QWidget* parent) -> WidgetAction* {
124+
return new IntegralAction(this, "Example integral action");
125+
}, {
126+
{ "SpinBox", 1 },
127+
{ "Slider", 2 },
128+
{ "LineEdit", 2 }
129+
}, { "SpinBox", "Slider" });
130+
131+
_actionsWidget.addAction("Numerical", "Integral point", [this](QWidget* parent) -> WidgetAction* {
132+
return new IntegralAction(this, "Example integral point action");
133+
});
134+
135+
_actionsWidget.addAction("Numerical", "Integral range", [this](QWidget* parent) -> WidgetAction* {
136+
return new IntegralRangeAction(this, "Example integral range action", 0.0, 1.0);
137+
});
138+
139+
_actionsWidget.addAction("Numerical", "Integral rectangle", [this](QWidget* parent) -> WidgetAction* {
140+
return new IntegralRectangleAction(this, "Example integral rectangle action");
141+
});
142+
143+
_actionsWidget.addAction("Disk", "File picker", [this](QWidget* parent) -> WidgetAction* {
144+
return new FilePickerAction(this, "Example file picker action");
145+
});
146+
147+
_actionsWidget.addAction("Disk", "Directory picker", [this](QWidget* parent) -> WidgetAction* {
148+
return new DirectoryPickerAction(this, "Example directory picker action");
149+
});
91150
}
92151

93152
ExampleActionsPluginFactory::ExampleActionsPluginFactory()

0 commit comments

Comments
 (0)