-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSubsetAction.h
More file actions
67 lines (53 loc) · 1.76 KB
/
SubsetAction.h
File metadata and controls
67 lines (53 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#pragma once
#include <actions/OptionAction.h>
#include <actions/StringAction.h>
#include <actions/TriggerAction.h>
#include <actions/VerticalGroupAction.h>
using namespace mv::gui;
class ScatterplotPlugin;
/**
* Subset action class
*
* Action class for creating a subset
*
* @author Thomas Kroes
*/
class SubsetAction : public VerticalGroupAction
{
Q_OBJECT
public:
/**
* Construct with \p parent object and \p title
* @param parent Pointer to parent object
* @param title Title
*/
Q_INVOKABLE SubsetAction(QObject* parent, const QString& title);
/**
* Initialize the selection action with \p scatterplotPlugin
* @param scatterplotPlugin Pointer to scatterplot plugin
*/
void initialize(ScatterplotPlugin* scatterplotPlugin);
/**
* Get action context menu
* @return Pointer to menu
*/
QMenu* getContextMenu();
public: // Serialization
/**
* Load selection action from variant
* @param Variant representation of the selection action
*/
void fromVariantMap(const QVariantMap& variantMap) override;
/**
* Save selection action to variant
* @return Variant representation of the selection action
*/
QVariantMap toVariantMap() const override;
private:
ScatterplotPlugin* _scatterplotPlugin; /** Pointer to scatter plot plugin */
StringAction _subsetNameAction; /** String action for configuring the subset name */
OptionAction _sourceDataAction; /** Option action for picking the source dataset */
TriggerAction _createSubsetAction; /** Triggers the subset creation process */
};
Q_DECLARE_METATYPE(SubsetAction)
inline const auto subsetActionMetaTypeId = qRegisterMetaType<SubsetAction*>("SubsetAction");