libs/flake
KoCopyController Class Reference
This class takes care of the copy actions integration into flake. More...
#include <KoCopyController.h>

Public Slots | |
| void | hasSelection (bool selection) |
Signals | |
| void | copyRequested () |
Public Member Functions | |
| KoCopyController (KoCanvasBase *canvas, QAction *copyAction) | |
| virtual | ~KoCopyController () |
Protected Attributes | |
| KoCopyControllerPrivate *const | d |
Detailed Description
This class takes care of the copy actions integration into flake.
Whenever the copy (KStandardAction::Copy) action is triggered the controller will use the currently selected tool and try to copy to the clipboard using that tool. Additionally; when the tool does not allow copying (KoTool::hasSelection() returns false) the signal copyRequested will be emitted for applications to connect to.
Definition at line 37 of file KoCopyController.h.
Constructor & Destructor Documentation
| KoCopyController::KoCopyController | ( | KoCanvasBase * | canvas, | |
| QAction * | copyAction | |||
| ) |
Constructor.
- Parameters:
-
canvas the canvas this controller will work on. copyAction the action that we will listen to and respond to when it is activated. Additionally, the action is used as a parent for the QObject for memory management purposes.
Definition at line 79 of file KoCopyController.cpp.
| KoCopyController::~KoCopyController | ( | ) | [virtual] |
Definition at line 88 of file KoCopyController.cpp.
Member Function Documentation
| void KoCopyController::copyRequested | ( | ) | [signal] |
emitted when the user pressed copy and the current tool had no selection.
| void KoCopyController::hasSelection | ( | bool | selection | ) | [slot] |
Notify whether the application has a selection.
The copy-action will only be enabled when either the current tool or the application has a selection.
- Parameters:
-
selection if true the application is marked to allow copying.
- See also:
- copyRequested()
Definition at line 93 of file KoCopyController.cpp.
Member Data Documentation
KoCopyControllerPrivate* const KoCopyController::d [protected] |
Definition at line 69 of file KoCopyController.h.
The documentation for this class was generated from the following files:
