Debian Codegraph @

sdk/libraries/extensiongenerator/resources/Standard/Action.h.in

raw
1 $licenseComment$
2
3 #ifndef __$upperSnakeCase(name)$_ACTION__
4 #define __$upperSnakeCase(name)$_ACTION__
5
6 #include <Action.h>
7
8 @if@ $headerIncludes$
9 // Additional includes
10 $headerIncludes$
11 @endif@
12
13 //
14 // Generated source for action "$title(name)$"
15 // $date()$ - $time()$
16 //
17
18 class $upperCamelCase(name)$ : public camitk::Action {
19 Q_OBJECT
20
21 public:
22 /// Default Constructor
23 /// Calls user-defined init()
24 $upperCamelCase(name)$(camitk::ActionExtension *);
25
26 /// Default Destructor
27 virtual ~$upperCamelCase(name)$() = default;
28
29 /// Call user-defined targetDefined() and getUI()
30 virtual QWidget* getWidget() override;
31
32 /// manage property change immediately
33 virtual bool event(QEvent* e) override;
34
35 public slots:
36 /** this method is automatically called when the action is triggered.
37 * Call getTargets() method to get the list of components to use.
38 * \note getTargets() is automatically filtered so that it only contains compatible components,
39 * i.e., instances of "$componentClass$" (or a subclass).
40 */
41 virtual camitk::Action::ApplyStatus apply() override;
42
43 private:
44
45 /// Called from the constructor for user-defined initialization
46 void init();
47
48 /// Called from apply() for user-defined processing
49 camitk::Action::ApplyStatus process();
50
51 @if@ equals($gui$,"Custom GUI")
52 /// Called from getWidget() to get the user-defined widget
53 /// If getUI() returns nullptr, use the default action widget
54 QWidget* getUI();
55 @endif@
56
57 /// Called from getWidget to notify the user
58 /// (the user might have to update something in the action logic)
59 /// Note: call getTargets() at any time to get the list of current targets
60 void targetDefined();
61
62 /// Called from event to notify when the user has changed the parameter
63 /// of the given name
64 void parameterChanged(QString parameterName);
65
66 /// do not manage event during initialization
67 bool initializationPending;
68
69 ///@name user-defined members
70 /// add the public: / private: / public slots: /...
71 /// to define the targeted member section
72 ///@{
73 $classMembers$
74 ///@}
75 };
76
77 #endif // __$upperSnakeCase(name)$_ACTION__