diff --git a/ressources/txt/about.html b/ressources/txt/about.html
--- a/ressources/txt/about.html
+++ b/ressources/txt/about.html
@@ -16,8 +16,8 @@
SocExplorer Version $VERSION$.
-
Changeset $Changeset$.
-
Branch $Branch$.
+
Build from Changeset $Changeset$.
+
Branch $Branch$.
Copyright (C) 2011-2014 Plasmas Physic Laboratory.
This is free software; licenced under the terms of the GPLV2 license.
This program uses:
@@ -25,8 +25,9 @@
diff --git a/src/SocExplorerEngine/proxy/socexplorerproxy.cpp b/src/SocExplorerEngine/proxy/socexplorerproxy.cpp
--- a/src/SocExplorerEngine/proxy/socexplorerproxy.cpp
+++ b/src/SocExplorerEngine/proxy/socexplorerproxy.cpp
@@ -190,15 +190,15 @@ void socexplorerproxy::changeSysDriverIn
emit _self->treeChanged(QList
(*drivers));
}
-void socexplorerproxy::loadChild(socexplorerplugin *parent)
-{
- if(!_self)init();
- parent = parent;
- pluginmanagerWDGT* pluginmanager0 = new pluginmanagerWDGT;
- pluginmanager0->setChildLoadable(true);
- pluginmanager0->connect(pluginmanager0,SIGNAL(loadSysDrviver(QString)),_self,SLOT(loadSysDriverToParent(QString)));
- pluginmanager0->show();
-}
+//void socexplorerproxy::loadChild(socexplorerplugin *parent)
+//{
+// if(!_self)init();
+// parent = parent;
+// pluginmanagerWDGT* pluginmanager0 = new pluginmanagerWDGT;
+// pluginmanager0->setChildLoadable(true);
+// pluginmanager0->connect(pluginmanager0,SIGNAL(loadSysDrviver(QString)),_self,SLOT(loadSysDriverToParent(QString)));
+// pluginmanager0->show();
+//}
void socexplorerproxy::connectChildToParent(socexplorerplugin *parent, socexplorerplugin *child)
@@ -318,6 +318,7 @@ void socexplorerproxy::closeSysDriver(so
if(!_self)init();
if(driver!=NULL)
{
+ emit _self->removePluginGUI(driver);
if(driver->parent==NULL)SocExplorerEngine::removeSOC(driver);
while(driver->childs.count()!=0)closeSysDriver(driver->childs.first());
linearDriverList->removeOne(driver);
@@ -337,7 +338,7 @@ void socexplorerproxy::closeSysDriver(so
if(!recursive)
{
emit _self->clearMenu();
- emit _self->registermenu(mainWindow);
+ emit _self->registermenu(mainWindow);
emit _self->treeChanged(QList(*drivers));
}
}
diff --git a/src/SocExplorerEngine/proxy/socexplorerproxy.h b/src/SocExplorerEngine/proxy/socexplorerproxy.h
--- a/src/SocExplorerEngine/proxy/socexplorerproxy.h
+++ b/src/SocExplorerEngine/proxy/socexplorerproxy.h
@@ -59,6 +59,7 @@ public:
signals:
void addPluginGUI(QDockWidget* plugin);
+ void removePluginGUI(QDockWidget* plugin);
int registermenu(QMainWindow* menuHolder);
void clearMenu();
QStringList findDrivers(int VID,int PID);
@@ -77,7 +78,7 @@ public slots:
QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadSysDriverToParent(socexplorerplugin *driver,socexplorerplugin *parent, const QString instanceName);
QT_ENSURE_STACK_ALIGNED_FOR_SSE void changeSysDriverInstName(const QString instanceName);
QT_ENSURE_STACK_ALIGNED_FOR_SSE void changeSysDriverInstName(const QString newinstanceName,const QString previnstanceName);
- QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadChild(socexplorerplugin* parent);
+ // QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadChild(socexplorerplugin* parent);
void updateText();
QT_ENSURE_STACK_ALIGNED_FOR_SSE void closeSysDriverFromDriver(socexplorerplugin* driver);
QT_ENSURE_STACK_ALIGNED_FOR_SSE void closeSysDriver(socexplorerplugin* driver,bool recursive=false);
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -36,15 +36,13 @@ LPMONMainWindow::LPMONMainWindow(QString
this->setAcceptDrops(true);
this->pluginManager->setRootLoadable(true);
this->PythonConsoleInst->pyConsoleRunFile(ScriptToEval);
-// QProgressBar* test = SocExplorerEngine::getProgressBar("test",10);
-// statusBar()->setFixedHeight(statusBar()->height());
-// SocExplorerEngine::deleteProgressBar(test);
}
void LPMONMainWindow::makeObjects(QString ScriptToEval)
{
Q_UNUSED(ScriptToEval)
+ this->p_pluginGUIlist = new QList();
pluginsDockContainer = new QMainWindow;
pluginsDockContainer->setWindowFlags(Qt::Widget);
pluginsDockContainer->setDockNestingEnabled(true);
@@ -64,13 +62,13 @@ void LPMONMainWindow::makeObjects(QStrin
SocExplorerEngine::xmlModel()->scanXmlFiles();
this->regExplorer = new regsExplorer();
this->regExplorer->setAllowedAreas(Qt::AllDockWidgetAreas);
-// this->pluginsDockContainer->addDockWidget(Qt::TopDockWidgetArea,this->regExplorer);
this->addPluginInterface(this->regExplorer);
this->PythonConsoleInst = new PythonConsole(socexplorerproxy::self());
this->PythonConsoleInst->addObject("SocExplorerEngine",SocExplorerEngine::self());
this->pluginManager = new dockablePluginManager();
this->toolpane = new toolBar;
this->p_about = new aboutsocexplorer();
+
}
void LPMONMainWindow::makeLayout()
@@ -89,6 +87,7 @@ void LPMONMainWindow::makeConnections()
connect(socexplorerproxy::self(),SIGNAL(clearMenu()),this,SLOT(clearMenu()));
connect(this,SIGNAL(translateSig()),socexplorerproxy::self(),SLOT(updateText()));
connect(socexplorerproxy::self(),SIGNAL(addPluginGUI(QDockWidget*)),this,SLOT(addPluginInterface(QDockWidget*)));
+ connect(socexplorerproxy::self(),SIGNAL(removePluginGUI(QDockWidget*)),this,SLOT(removePluginInterface(QDockWidget*)));
connect(this->ManagePlugins,SIGNAL(triggered()),this,SLOT(launchPluginManager()));
connect(this->Quit,SIGNAL(triggered()),qApp,SLOT(quit()));
connect(this,SIGNAL(registerObject(QObject*,QString)),this->PythonConsoleInst,SLOT(registerObject(QObject*,QString)));
@@ -122,15 +121,20 @@ void LPMONMainWindow::launchPluginManage
void LPMONMainWindow::addPluginInterface(QDockWidget *plugin)
{
- static QDockWidget* last=NULL;
plugin->setAllowedAreas(Qt::AllDockWidgetAreas);
this->pluginsDockContainer->addDockWidget(Qt::TopDockWidgetArea,plugin);
- if(last!=NULL)
- this->pluginsDockContainer->tabifyDockWidget(last,plugin);
- last = plugin;
+ if(p_pluginGUIlist->count()!=0)
+ this->pluginsDockContainer->tabifyDockWidget(p_pluginGUIlist->last(),plugin);
+ p_pluginGUIlist->append(plugin);
}
+void LPMONMainWindow::removePluginInterface(QDockWidget *plugin)
+{
+ p_pluginGUIlist->removeOne(plugin);
+ this->pluginsDockContainer->removeDockWidget(plugin);
+}
+
void LPMONMainWindow::clearMenu()
{
@@ -159,6 +163,7 @@ void LPMONMainWindow::makeMenu()
LPMONMainWindow::~LPMONMainWindow()
{
delete this->p_about;
+ delete this->p_pluginGUIlist;
}
@@ -215,7 +220,6 @@ void LPMONMainWindow::pluginselected(con
socexplorerplugin* drv=socexplorerproxy::self()->getSysDriver(instanceName);
if(drv)
drv->raise();
-// TODO add plugin widget auto focus
}
diff --git a/src/mainwindow.h b/src/mainwindow.h
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -58,6 +58,7 @@ public:
public slots:
void launchPluginManager();
void addPluginInterface(QDockWidget* plugin);
+ void removePluginInterface(QDockWidget* plugin);
void clearMenu();
void updateText();
void setLangage(QAction* action);
@@ -79,7 +80,7 @@ private:
dockablePluginManager* pluginManager;
regsExplorer* regExplorer;
aboutsocexplorer* p_about;
-
+ QList* p_pluginGUIlist;
};
#endif // MAINWINDOW_H