Loading...
Searching...
No Matches
BALLPlugin.h
Go to the documentation of this file.
#ifndef BALL_PLUGIN_BALLPLUGIN_H
#define BALL_PLUGIN_BALLPLUGIN_H
#ifndef BALL_COMMON_GLOBAL_H
# include <BALL/COMMON/global.h>
#endif
#include <QtCore/QString>
#include <QtCore/QtPlugin>
#include <QtCore/QVariant>
class QPixmap;
class QDialog;
namespace BALL
{
class PluginHandler;
class BALL_EXPORT BALLPlugin
{
public:
virtual ~BALLPlugin() {}
virtual QString getName() const = 0;
virtual QString getDescription() const = 0;
virtual bool isActive() = 0;
virtual bool activate() = 0;
virtual bool deactivate() = 0;
};
}
template<typename T>
T qobject_cast(BALL::BALLPlugin* plugin)
{
return qobject_cast<T>(dynamic_cast<QObject*>(plugin));
}
Q_DECLARE_METATYPE(BALL::BALLPlugin*)
Q_DECLARE_INTERFACE(BALL::BALLPlugin, "org.ball-project.Plugin.BALLPlugin/1.0")
#endif //BALL_PLUGIN_BALLPLUGIN_H
qobject_cast
T qobject_cast(BALL::BALLPlugin *plugin)
Definition BALLPlugin.h:63
global.h
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::BALLPlugin
Definition BALLPlugin.h:21
BALL::BALLPlugin::deactivate
virtual bool deactivate()=0
BALL::BALLPlugin::getDescription
virtual QString getDescription() const =0
BALL::BALLPlugin::activate
virtual bool activate()=0
BALL::BALLPlugin::getName
virtual QString getName() const =0
BALL::BALLPlugin::isActive
virtual bool isActive()=0
BALL::BALLPlugin::~BALLPlugin
virtual ~BALLPlugin()
Definition BALLPlugin.h:23
BALL::PluginHandler
Definition pluginHandler.h:28
QDialog
QObject
BALL
Definition constants.h:13