Commit be08d8bf authored by Jan Möbius's avatar Jan Möbius

Make PluginInfo a class

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3439 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6f414908
......@@ -825,8 +825,8 @@ void Core::slotSetSlotDescription(QString _slotName, QString _slotDescrip
if (plugins[i].plugin == sender())
pluginInfo = &plugins[i];
if (pluginInfo == 0){
emit log(LOGERR, "Unable to set slot-description. Plugin not found!");
if (pluginInfo == 0){
emit log(LOGERR, "Unable to set slot-description. Plugin not found!");
return;
}
......@@ -907,7 +907,7 @@ void Core::setDescriptions(){
QString("Rotation axis., Rotation Angle., Rotation Center.").split(","));
emit setSlotDescription("setViewingDirection(Vector,Vector)", "Set the viewing direction",
QString("direction,upVector").split(","),
QString("Viewing direction., Up-Vector.").split(","));
QString("Viewing direction., Up-Vector.").split(","));
emit setSlotDescription("fullscreen()", "Toggle fullscreen mode", QStringList(), QStringList());
emit setSlotDescription("logger()", "Toggle logging window visibility", QStringList(), QStringList());
emit setSlotDescription("toolbox()", "Toggle toolbox visibility", QStringList(), QStringList());
......
#ifndef PLUGININFO_HH
#define PLUGININFO_HH
......@@ -23,7 +24,37 @@ struct SlotInfo{
};
/** Type defining a currently loaded Plugin */
struct PluginInfo{
class PluginInfo{
public :
PluginInfo() {
plugin = 0;
name = "";
description = "";
version = "";
path = "";
rpcName = "";
rpcFunctions.clear();
slotInfos.clear();
keys.clear();
widget = 0;
}
PluginInfo( const PluginInfo& _i) {
plugin = _i.plugin;
name = _i.name;
description = _i.description;
version = _i.version;
path = _i.path;
rpcName = _i.rpcName;
rpcFunctions = _i.rpcFunctions;
slotInfos = _i.slotInfos;
keys = _i.keys;
widget = _i.widget;
}
/// Pointer to the loaded plugin (Already casted when loading it)
QObject* plugin;
......
......@@ -570,8 +570,13 @@ void Core::loadPlugin(QString filename, bool silent){
widget->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum);
widget->setMinimumWidth(300);
widget->setMaximumWidth(600);
dock->setObjectName( "ToolWidget" + QString::number(toolboxindex_++) );
int newNumber = toolboxindex_;
toolboxindex_++;
QString number = QString::number(newNumber);
dock->setObjectName( "ToolWidget" + number );
coreWidget_->setDockOptions(QMainWindow::AllowTabbedDocks | QMainWindow::VerticalTabs);
coreWidget_->addDockWidget(Qt::RightDockWidgetArea,dock);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment