Changeset View
Changeset View
Standalone View
Standalone View
libs/flake/KoToolManager.h
Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Line(s) | 145 | public: | |||
---|---|---|---|---|---|
151 | /** | 151 | /** | ||
152 | * Register actions for switching to tools at the actionCollection parameter. | 152 | * Register actions for switching to tools at the actionCollection parameter. | ||
153 | * The actions will have the text / shortcut as stated by the toolFactory. | 153 | * The actions will have the text / shortcut as stated by the toolFactory. | ||
154 | * If the application calls this in their KoView extending class they will have all the benefits | 154 | * If the application calls this in their KoView extending class they will have all the benefits | ||
155 | * from allowing this in the menus and to allow the use to configure the shortcuts used. | 155 | * from allowing this in the menus and to allow the use to configure the shortcuts used. | ||
156 | * @param ac the actionCollection that will be the parent of the actions. | 156 | * @param ac the actionCollection that will be the parent of the actions. | ||
157 | * @param controller tools registered with this controller will have all their actions added as well. | 157 | * @param controller tools registered with this controller will have all their actions added as well. | ||
158 | */ | 158 | */ | ||
159 | void registerTools(KActionCollection *ac, KoCanvasController *controller); | 159 | void registerToolActions(KActionCollection *ac, KoCanvasController *controller); | ||
160 | 160 | | |||
161 | /** | 161 | /** | ||
162 | * Register a new canvas controller | 162 | * Register a new canvas controller | ||
163 | * @param controller the view controller that this toolmanager will manage the tools for | 163 | * @param controller the view controller that this toolmanager will manage the tools for | ||
164 | */ | 164 | */ | ||
165 | void addController(KoCanvasController *controller); | 165 | void addController(KoCanvasController *controller); | ||
166 | 166 | | |||
167 | /** | 167 | /** | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | |||||
219 | QString preferredToolForSelection(const QList<KoShape*> &shapes); | 219 | QString preferredToolForSelection(const QList<KoShape*> &shapes); | ||
220 | 220 | | |||
221 | /** | 221 | /** | ||
222 | * Returns the list of toolActions for the current tools. | 222 | * Returns the list of toolActions for the current tools. | ||
223 | * @returns lists of toolActions for the current tools. | 223 | * @returns lists of toolActions for the current tools. | ||
224 | */ | 224 | */ | ||
225 | QList<KoToolAction*> toolActionList() const; | 225 | QList<KoToolAction*> toolActionList() const; | ||
226 | 226 | | |||
227 | /// Update the internal shortcuts of each tool. (Activation shortcuts are exposed already.) | ||||
228 | void updateToolShortcuts(); | ||||
229 | | ||||
227 | /// Request tool activation for the given canvas controller | 230 | /// Request tool activation for the given canvas controller | ||
228 | void requestToolActivation(KoCanvasController *controller); | 231 | void requestToolActivation(KoCanvasController *controller); | ||
229 | 232 | | |||
230 | /// Injects an input event from a plugin based input device | 233 | /// Injects an input event from a plugin based input device | ||
231 | void injectDeviceEvent(KoInputDeviceHandlerEvent *event); | 234 | void injectDeviceEvent(KoInputDeviceHandlerEvent *event); | ||
232 | 235 | | |||
233 | /// Returns the toolId of the currently active tool | 236 | /// Returns the toolId of the currently active tool | ||
234 | QString activeToolId() const; | 237 | QString activeToolId() const; | ||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |