19#include "kivio_pluginmanager.h"
22#include <tdeparts/plugin.h>
24#include "kivio_plugin.h"
27 PluginManager::PluginManager(KivioView* parent, const char* name) : TQObject(parent, name)
31 m_delegateEvents = true;
34 PluginManager::~PluginManager()
38 bool PluginManager::delegateEvent(TQEvent* e)
60 kdDebug(43000) << "Default tool activated! " << defaultTool()->name() << endl;
67 if(tool != m_activeTool) {
69 kdDebug(43000) << "Deactivate tool: " << m_activeTool->name() << endl;
70 m_activeTool->setActivated( false);
73 kdDebug(43000) << "Activate new tool: " << tool->name() << endl;
81 kdDebug(43000) << "New default tool: " << tool->name() << endl;
84 Kivio::Plugin* PluginManager::findPlugin( const TQString& name)
86 TQPtrList<KParts::Plugin> plugins = KParts::Plugin::pluginObjects(parent());
87 KParts::Plugin* p = plugins.first();
91 if(p->name() == name) {
102#include "kivio_pluginmanager.moc"
void activate(Kivio::MouseTool *tool) Makes.
void setDefaultTool(Kivio::MouseTool *tool) Make.
Kivio::MouseTool * activeTool() Returns the tool that is in use.
Kivio::MouseTool * defaultTool() Returns the default tool.
void activateDefaultTool() Makes the default tool active.
This class provides the base for all plugins in Kivio.
|