Changeset View
Changeset View
Standalone View
Standalone View
krita/ui/kis_action_manager.h
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | |||||
52 | { | 52 | { | ||
53 | 53 | | |||
54 | public: | 54 | public: | ||
55 | KisActionManager(KisViewManager* viewManager); | 55 | KisActionManager(KisViewManager* viewManager); | ||
56 | virtual ~KisActionManager(); | 56 | virtual ~KisActionManager(); | ||
57 | 57 | | |||
58 | void setView(QPointer<KisView> imageView); | 58 | void setView(QPointer<KisView> imageView); | ||
59 | 59 | | |||
60 | /** | ||||
61 | * Add an existing action to the action manager. | ||||
62 | */ | ||||
60 | void addAction(const QString& name, KisAction* action); | 63 | void addAction(const QString& name, KisAction* action); | ||
64 | | ||||
65 | /** | ||||
66 | * Stop managing an action. | ||||
67 | */ | ||||
61 | void takeAction(KisAction* action); | 68 | void takeAction(KisAction* action); | ||
62 | 69 | | |||
70 | /** | ||||
71 | * Create a new KisAction. Looks up data from the .action data files. | ||||
72 | */ | ||||
73 | KisAction *createAction(const QString &name); | ||||
74 | | ||||
75 | /** | ||||
76 | * Look up an action by name. | ||||
77 | */ | ||||
63 | KisAction *actionByName(const QString &name) const; | 78 | KisAction *actionByName(const QString &name) const; | ||
64 | 79 | | |||
65 | void registerOperationUIFactory(KisOperationUIFactory* factory); | | |||
66 | 80 | | |||
67 | void registerOperation(KisOperation* operation); | | |||
68 | 81 | | |||
69 | void runOperation(const QString &id); | | |||
70 | 82 | | |||
83 | | ||||
84 | void registerOperationUIFactory(KisOperationUIFactory* factory); | ||||
85 | void registerOperation(KisOperation* operation); | ||||
86 | void runOperation(const QString &id); | ||||
71 | void runOperationFromConfiguration(KisOperationConfiguration* config); | 87 | void runOperationFromConfiguration(KisOperationConfiguration* config); | ||
72 | 88 | | |||
73 | 89 | | |||
74 | /// Update actions handled by kis_action_manager to set enabled/disabled. | 90 | /** | ||
75 | /// This is used to grey out buttons that can't be pressed. | 91 | * Update actions handled by kis_action_manager to set enabled. | ||
92 | * This is used to grey out buttons that can't be pressed. | ||||
93 | */ | ||||
76 | void updateGUI(); | 94 | void updateGUI(); | ||
77 | 95 | | |||
78 | /// Create a KisAction based on a KStandardAction. The KStandardAction is deleted. | 96 | /** | ||
97 | * Create a KisAction based on a KStandardAction. The KStandardAction is deleted. | ||||
98 | */ | ||||
79 | KisAction *createStandardAction(KStandardAction::StandardAction, | 99 | KisAction *createStandardAction(KStandardAction::StandardAction, | ||
80 | const QObject *receiver, const char *member); | 100 | const QObject *receiver, const char *member); | ||
81 | 101 | | |||
82 | private: | 102 | private: | ||
83 | void dumpActionFlags(); | 103 | void dumpActionFlags(); | ||
84 | 104 | | |||
85 | class Private; | 105 | class Private; | ||
86 | Private* const d; | 106 | Private* const d; | ||
87 | }; | 107 | }; | ||
88 | 108 | | |||
89 | #endif // KIS_ACTION_MANAGER_H | 109 | #endif // KIS_ACTION_MANAGER_H |