##// END OF EJS Templates
Removed annoying GUI bug with dock widget handling:...
Jeandet Alexis -
r12:a31c7daed0d6 default
parent child
Show More
@@ -16,8 +16,8
16 16 <hr>
17 17 <div align="center">
18 18 <B>SocExplorer Version $VERSION$.</B><BR><BR>
19 <B> Changeset $Changeset$.</B><BR><BR>
20 <B> Branch $Branch$.</B><BR><BR>
19 <B> Build from Changeset $Changeset$.</B><BR><BR>
20 <B> Branch $Branch$.</B><BR><BR>
21 21 Copyright (C) 2011-2014 Plasmas Physic Laboratory.<BR>
22 22 This is free software; licenced under the terms of the GPLV2 license.<BR><BR>
23 23 This program uses:
@@ -25,8 +25,9
25 25 <ul>
26 26 <LI><a href="http://qt.nokia.com" title="Qt">Qt</a> (Copyright 2008-2013 Digia Plc).</LI>
27 27 <LI><a href="http://pythonqt.sourceforge.net" title="PythonQt">PythonQt</a> </LI>
28 <LI><a href="http://commons.wikimedia.org/wiki/GNOME_Desktop_icons" title="Gnome Icons">Gnome Icons</a> </LI>
28 29 <LI><a href="http://nsis.sourceforge.net/Main_Page" title="NSIS">NSIS</a> (Nullsoft Scriptable Install System) </LI>
29 <LI>LppSerial</LI>
30 <LI><a href="https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/lppserial" title="LppSerial">LppSerial</a></LI>
30 31 <LI><a href="http://www.qcustomplot.com/index.php/introduction" title="qhexedit">QCustomPlot</a></LI>
31 32 <LI><a href="http://code.google.com/p/qhexedit2/" title="qhexedit">QHexEdit</a></LI>
32 33 </ul>
@@ -190,15 +190,15 void socexplorerproxy::changeSysDriverIn
190 190 emit _self->treeChanged(QList<socexplorerplugin*>(*drivers));
191 191 }
192 192
193 void socexplorerproxy::loadChild(socexplorerplugin *parent)
194 {
195 if(!_self)init();
196 parent = parent;
197 pluginmanagerWDGT* pluginmanager0 = new pluginmanagerWDGT;
198 pluginmanager0->setChildLoadable(true);
199 pluginmanager0->connect(pluginmanager0,SIGNAL(loadSysDrviver(QString)),_self,SLOT(loadSysDriverToParent(QString)));
200 pluginmanager0->show();
201 }
193 //void socexplorerproxy::loadChild(socexplorerplugin *parent)
194 //{
195 // if(!_self)init();
196 // parent = parent;
197 // pluginmanagerWDGT* pluginmanager0 = new pluginmanagerWDGT;
198 // pluginmanager0->setChildLoadable(true);
199 // pluginmanager0->connect(pluginmanager0,SIGNAL(loadSysDrviver(QString)),_self,SLOT(loadSysDriverToParent(QString)));
200 // pluginmanager0->show();
201 //}
202 202
203 203
204 204 void socexplorerproxy::connectChildToParent(socexplorerplugin *parent, socexplorerplugin *child)
@@ -318,6 +318,7 void socexplorerproxy::closeSysDriver(so
318 318 if(!_self)init();
319 319 if(driver!=NULL)
320 320 {
321 emit _self->removePluginGUI(driver);
321 322 if(driver->parent==NULL)SocExplorerEngine::removeSOC(driver);
322 323 while(driver->childs.count()!=0)closeSysDriver(driver->childs.first());
323 324 linearDriverList->removeOne(driver);
@@ -337,7 +338,7 void socexplorerproxy::closeSysDriver(so
337 338 if(!recursive)
338 339 {
339 340 emit _self->clearMenu();
340 emit _self->registermenu(mainWindow);
341 emit _self->registermenu(mainWindow);
341 342 emit _self->treeChanged(QList<socexplorerplugin*>(*drivers));
342 343 }
343 344 }
@@ -59,6 +59,7 public:
59 59
60 60 signals:
61 61 void addPluginGUI(QDockWidget* plugin);
62 void removePluginGUI(QDockWidget* plugin);
62 63 int registermenu(QMainWindow* menuHolder);
63 64 void clearMenu();
64 65 QStringList findDrivers(int VID,int PID);
@@ -77,7 +78,7 public slots:
77 78 QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadSysDriverToParent(socexplorerplugin *driver,socexplorerplugin *parent, const QString instanceName);
78 79 QT_ENSURE_STACK_ALIGNED_FOR_SSE void changeSysDriverInstName(const QString instanceName);
79 80 QT_ENSURE_STACK_ALIGNED_FOR_SSE void changeSysDriverInstName(const QString newinstanceName,const QString previnstanceName);
80 QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadChild(socexplorerplugin* parent);
81 // QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadChild(socexplorerplugin* parent);
81 82 void updateText();
82 83 QT_ENSURE_STACK_ALIGNED_FOR_SSE void closeSysDriverFromDriver(socexplorerplugin* driver);
83 84 QT_ENSURE_STACK_ALIGNED_FOR_SSE void closeSysDriver(socexplorerplugin* driver,bool recursive=false);
@@ -36,15 +36,13 LPMONMainWindow::LPMONMainWindow(QString
36 36 this->setAcceptDrops(true);
37 37 this->pluginManager->setRootLoadable(true);
38 38 this->PythonConsoleInst->pyConsoleRunFile(ScriptToEval);
39 // QProgressBar* test = SocExplorerEngine::getProgressBar("test",10);
40 // statusBar()->setFixedHeight(statusBar()->height());
41 // SocExplorerEngine::deleteProgressBar(test);
42 39 }
43 40
44 41
45 42 void LPMONMainWindow::makeObjects(QString ScriptToEval)
46 43 {
47 44 Q_UNUSED(ScriptToEval)
45 this->p_pluginGUIlist = new QList<QDockWidget*>();
48 46 pluginsDockContainer = new QMainWindow;
49 47 pluginsDockContainer->setWindowFlags(Qt::Widget);
50 48 pluginsDockContainer->setDockNestingEnabled(true);
@@ -64,13 +62,13 void LPMONMainWindow::makeObjects(QStrin
64 62 SocExplorerEngine::xmlModel()->scanXmlFiles();
65 63 this->regExplorer = new regsExplorer();
66 64 this->regExplorer->setAllowedAreas(Qt::AllDockWidgetAreas);
67 // this->pluginsDockContainer->addDockWidget(Qt::TopDockWidgetArea,this->regExplorer);
68 65 this->addPluginInterface(this->regExplorer);
69 66 this->PythonConsoleInst = new PythonConsole(socexplorerproxy::self());
70 67 this->PythonConsoleInst->addObject("SocExplorerEngine",SocExplorerEngine::self());
71 68 this->pluginManager = new dockablePluginManager();
72 69 this->toolpane = new toolBar;
73 70 this->p_about = new aboutsocexplorer();
71
74 72 }
75 73
76 74 void LPMONMainWindow::makeLayout()
@@ -89,6 +87,7 void LPMONMainWindow::makeConnections()
89 87 connect(socexplorerproxy::self(),SIGNAL(clearMenu()),this,SLOT(clearMenu()));
90 88 connect(this,SIGNAL(translateSig()),socexplorerproxy::self(),SLOT(updateText()));
91 89 connect(socexplorerproxy::self(),SIGNAL(addPluginGUI(QDockWidget*)),this,SLOT(addPluginInterface(QDockWidget*)));
90 connect(socexplorerproxy::self(),SIGNAL(removePluginGUI(QDockWidget*)),this,SLOT(removePluginInterface(QDockWidget*)));
92 91 connect(this->ManagePlugins,SIGNAL(triggered()),this,SLOT(launchPluginManager()));
93 92 connect(this->Quit,SIGNAL(triggered()),qApp,SLOT(quit()));
94 93 connect(this,SIGNAL(registerObject(QObject*,QString)),this->PythonConsoleInst,SLOT(registerObject(QObject*,QString)));
@@ -122,15 +121,20 void LPMONMainWindow::launchPluginManage
122 121
123 122 void LPMONMainWindow::addPluginInterface(QDockWidget *plugin)
124 123 {
125 static QDockWidget* last=NULL;
126 124 plugin->setAllowedAreas(Qt::AllDockWidgetAreas);
127 125 this->pluginsDockContainer->addDockWidget(Qt::TopDockWidgetArea,plugin);
128 if(last!=NULL)
129 this->pluginsDockContainer->tabifyDockWidget(last,plugin);
130 last = plugin;
126 if(p_pluginGUIlist->count()!=0)
127 this->pluginsDockContainer->tabifyDockWidget(p_pluginGUIlist->last(),plugin);
128 p_pluginGUIlist->append(plugin);
131 129
132 130 }
133 131
132 void LPMONMainWindow::removePluginInterface(QDockWidget *plugin)
133 {
134 p_pluginGUIlist->removeOne(plugin);
135 this->pluginsDockContainer->removeDockWidget(plugin);
136 }
137
134 138
135 139 void LPMONMainWindow::clearMenu()
136 140 {
@@ -159,6 +163,7 void LPMONMainWindow::makeMenu()
159 163 LPMONMainWindow::~LPMONMainWindow()
160 164 {
161 165 delete this->p_about;
166 delete this->p_pluginGUIlist;
162 167 }
163 168
164 169
@@ -215,7 +220,6 void LPMONMainWindow::pluginselected(con
215 220 socexplorerplugin* drv=socexplorerproxy::self()->getSysDriver(instanceName);
216 221 if(drv)
217 222 drv->raise();
218 // TODO add plugin widget auto focus
219 223 }
220 224
221 225
@@ -58,6 +58,7 public:
58 58 public slots:
59 59 void launchPluginManager();
60 60 void addPluginInterface(QDockWidget* plugin);
61 void removePluginInterface(QDockWidget* plugin);
61 62 void clearMenu();
62 63 void updateText();
63 64 void setLangage(QAction* action);
@@ -79,7 +80,7 private:
79 80 dockablePluginManager* pluginManager;
80 81 regsExplorer* regExplorer;
81 82 aboutsocexplorer* p_about;
82
83 QList<QDockWidget*>* p_pluginGUIlist;
83 84 };
84 85
85 86 #endif // MAINWINDOW_H
General Comments 0
You need to be logged in to leave comments. Login now