KoMacro::Manager Class Reference
#include <manager.h>
Detailed Description
The Manager class acts as window-wide manager for macros.Example how KoMacro could be used.
// We have a class that inheritates from QObject and // implements some public signals and slots that will // be accessible by Macros once a class-instance // got published. class PublishedObject : public QObject {}; // Somewhere we have our KMainWindow. KMainWindow* mainwindow = new KMainWindow(); // Create a new KoMacro::Manager instance to access the // Macro-framework. KoMacro::Manager* manager = new KoMacro::Manager( mainwindow ); // Now we like to publish a QObject PublishedObject* publishedobject = new PublishedObject(); manager->publishObject(publishedobject); // ... here we are able to use manager->createAction() to // create Action instances on the fly and work with them. // Finally free the publishedobject instance we created. We // need to free it manualy cause PublishedObject doesn't // got a QObject parent as argument. delete publishedobject; // Finally free the manager-instance. It's always needed // to free the instance by yourself! delete manager;
Definition at line 75 of file manager.h.
Public Member Functions | |
| KXMLGUIClient * | guiClient () const |
| bool | hasMacro (const QString ¯oname) |
| KSharedPtr< Macro > | getMacro (const QString ¯oname) |
| void | addMacro (const QString ¯oname, KSharedPtr< Macro > macro) |
| Add a new Macro to the list of known macros. | |
| void | removeMacro (const QString ¯oname) |
Remove the Macro defined with macroname . | |
| KSharedPtr< Macro > | createMacro (const QString ¯oname) |
| Factory function to create a new Macro instances. | |
| KSharedPtr< Action > | action (const QString &name) const |
| QMap< QString, KSharedPtr< Action > > | actions () const |
| QStringList | actionNames () const |
| void | publishAction (KSharedPtr< Action > action) |
Publish the Action action . | |
| void | publishObject (const QString &name, QObject *object) |
Publish the passed QObject object. | |
| QGuardedPtr< QObject > | object (const QString &name) const |
| QMap< QString, QGuardedPtr< QObject > > | objects () const |
Static Public Member Functions | |
| static void | init (KXMLGUIClient *xmlguiclient) |
| Initialize this Manager singleton. | |
| static Manager * | self () |
Friends | |
| class | KStaticDeleter< ::KoMacro::Manager > |
Member Function Documentation
|
|
Definition at line 132 of file manager.cpp. |
|
|
Definition at line 142 of file manager.cpp. |
|
|
Definition at line 137 of file manager.cpp. |
|
||||||||||||
|
Add a new Macro to the list of known macros.
If there exists already a Macro instance with the defined
Definition at line 116 of file manager.cpp. |
|
|
Factory function to create a new Macro instances. The returned new Macro instance will not be added to the list of known macros. Use addMacro if you like to attach the returned new Macro to this Manager instance. Definition at line 126 of file manager.cpp. |
|
|
Definition at line 111 of file manager.cpp. |
|
|
Definition at line 101 of file manager.cpp. |
|
|
Definition at line 106 of file manager.cpp. |
|
|
Initialize this Manager singleton. This function needs to be called exactly once to initialize the Manager singleton before self() got used. Definition at line 65 of file manager.cpp. References KoMacro::_manager, and KoMacro::_self. Referenced by KexiMacroPart::initPartActions(). |
|
|
Definition at line 162 of file manager.cpp. |
|
|
Definition at line 167 of file manager.cpp. |
|
|
Publish the Action The published Action will be accessible via it's unique name. Definition at line 147 of file manager.cpp. |
|
||||||||||||
|
Publish the passed QObject Those object will provide it's slots as callable functions. Definition at line 156 of file manager.cpp. |
|
|
Remove the Macro defined with
If we don't know about a Macro with that Definition at line 121 of file manager.cpp. |
|
|
Definition at line 76 of file manager.cpp. References KoMacro::_self. Referenced by KoMacro::Action::Action(), KexiMacroPart::createView(), KexiMacro::KexiAction::KexiAction(), KexiMacroDesignView::KexiMacroDesignView(), and KoMacro::XMLHandler::parseXML(). |
Friends And Related Function Documentation
|
|
|
The documentation for this class was generated from the following files:
