diff --git a/.hgsubstate b/.hgsubstate --- a/.hgsubstate +++ b/.hgsubstate @@ -1,4 +1,4 @@ -9790824220ca06014e65a5c13aa4ed37f89d7593 src/SocExplorerEngine/PeripheralWidget +1cb664ab4bb3c531d706b1948a378ed9810c0dda src/SocExplorerEngine/PeripheralWidget cc958c79ba0939809a70e63b8bac798930160243 src/common/genericBinaryFiles 2dce25b198558be573f56c1cf337aa95ddd666d6 src/common/lppserial 923afde9cc96bb419cf898560d080ec96991aeca src/common/qhexedit diff --git a/doc/PythonExamples/PythonPlugin.py b/doc/PythonExamples/PythonPlugin.py --- a/doc/PythonExamples/PythonPlugin.py +++ b/doc/PythonExamples/PythonPlugin.py @@ -2,5 +2,9 @@ class test(PySocExplorerEngine.socexplorerplugin): def hello(self): - print "hello" + print "hello" + def VID(self): + return 10 + def PID(self): + return 100 diff --git a/ressources/Styles/SocExplorer.css b/ressources/Styles/SocExplorer.css --- a/ressources/Styles/SocExplorer.css +++ b/ressources/Styles/SocExplorer.css @@ -11,6 +11,7 @@ QGroupBox::title { } QWidget#CollapsablePeripheralWidget { - border: 1px solid gray; - border-radius: 9px; + border: 2px solid gray; + border-radius: 6px; + margin-top: 0.5em; } diff --git a/src/PyWdgt/pythonconsole.cpp b/src/PyWdgt/pythonconsole.cpp --- a/src/PyWdgt/pythonconsole.cpp +++ b/src/PyWdgt/pythonconsole.cpp @@ -62,7 +62,8 @@ void PythonConsole::changeSysDriverInstN socexplorerplugin* obj= this->proxy->getSysDriver(previnstanceName); if(obj==NULL)obj= this->proxy->getSysDriver(newinstanceName); if(obj==NULL)return; - this->mainContext->addObject(newinstanceName,obj->getPyObjectWrapper()); +// this->mainContext->addObject(newinstanceName,obj->getPyObjectWrapper()); + this->mainContext->addObject(newinstanceName,obj); this->mainContext->removeVariable(previnstanceName); } diff --git a/src/SocExplorerEngine/SOC/socexplorerenumdevice.h b/src/SocExplorerEngine/SOC/socexplorerenumdevice.h --- a/src/SocExplorerEngine/SOC/socexplorerenumdevice.h +++ b/src/SocExplorerEngine/SOC/socexplorerenumdevice.h @@ -38,6 +38,9 @@ public: QString name(){return *_devName;} bool visible(){return _visible;} void setVisible(bool visible){_visible=visible;} + const QString& socName(){return _SOC->name();} + bool sameSoc(socExplorerEnumDevice* dev){return sameSoc(_SOC);} + bool sameSoc(SOCModel* soc){return soc==_SOC;} signals: public slots: diff --git a/src/SocExplorerEngine/SOC/socmodel.h b/src/SocExplorerEngine/SOC/socmodel.h --- a/src/SocExplorerEngine/SOC/socmodel.h +++ b/src/SocExplorerEngine/SOC/socmodel.h @@ -87,6 +87,7 @@ public: } bool enumDeviceExists(qint32 baseAddress); socExplorerEnumDevice *getEnumDevice(qint32 baseAddress); + const QString& name(){return p_name;} public slots: qint32 getEnumDeviceBaseAddress(int VID,int PID,int count=0); qint32 getEnumDeviceCount(int VID,int PID); @@ -96,6 +97,7 @@ public slots: qint32 readReg(qint32 address); bool isLitleEndian(); private: + QString p_name; socexplorerplugin* p_rootDev; QList p_enumeratedDevices; QList clktree; diff --git a/src/SocExplorerEngine/SocExplorerEngine.pro b/src/SocExplorerEngine/SocExplorerEngine.pro --- a/src/SocExplorerEngine/SocExplorerEngine.pro +++ b/src/SocExplorerEngine/SocExplorerEngine.pro @@ -103,7 +103,6 @@ INCLUDEPATH += engine \ HEADERS += \ pluginloader/pluginscache.h \ pluginloader/pluginloader.h \ - plugins/genericPySysdriver.h \ pluginManagerWdgt/plugintree.h \ pluginManagerWdgt/pluginmanagerWDGT.h \ pluginManagerWdgt/pluginlist.h \ @@ -150,7 +149,6 @@ SOURCES += \ PeripheralWidget/src/registerwidget.cpp \ PeripheralWidget/src/socregsviewer.cpp \ SOC/socclk.cpp \ - plugins/genericPySysdriver.cpp \ engine/socexplorerengine.cpp \ engine/socexplorerxmlfile.cpp \ proxy/socexplorerproxy.cpp \ diff --git a/src/SocExplorerEngine/plugins/genericPySysdriver.cpp b/src/SocExplorerEngine/plugins/genericPySysdriver.cpp deleted file mode 100644 --- a/src/SocExplorerEngine/plugins/genericPySysdriver.cpp +++ /dev/null @@ -1,75 +0,0 @@ - -#include -#include -#ifdef WIN32 -#include -#define socexplorerBswap32(X) _byteswap_ulong(X) -#else -#ifdef UNIX -#include -#define socexplorerBswap32(X) bswap_32(X) -#endif -#endif - -#include - - -genericPySysdriver::genericPySysdriver(socexplorerplugin* plugin,QObject* parent): - QObject(parent) -{ - Q_UNUSED(parent) - this->plugin = plugin; -} - -QVariantList genericPySysdriver::Read(unsigned int address,unsigned int count) -{ - unsigned int data[count]; - QVariantList result; - this->plugin->Read(data,count,address); - for(unsigned int i = 0;i dataList) -{ - unsigned int data[dataList.count()]; - for(int i = 0;iplugin->Write(data,dataList.count(),address); -} - -bool genericPySysdriver::dumpMemory(unsigned int address,unsigned int count,QString file) -{ - return this->plugin->dumpMemory(address,count,file); -} - -bool genericPySysdriver::memSet(unsigned int address,int value, unsigned int count) -{ - return this->plugin->memSet(address,value,count); -} - -bool genericPySysdriver::loadbin(unsigned int address,QString file) -{ - return this->plugin->loadbin(address,file); - -} - -bool genericPySysdriver::loadfile(abstractBinFile *file) -{ - return this->plugin->loadfile(file); -} - -bool genericPySysdriver::dumpMemory(unsigned int address, unsigned int count, QString file, const QString &format) -{ - return this->plugin->dumpMemory(address,count,file,format); -} - -QString genericPySysdriver::instance() -{ - return plugin->instanceName(); -} - diff --git a/src/SocExplorerEngine/plugins/genericPySysdriver.h b/src/SocExplorerEngine/plugins/genericPySysdriver.h deleted file mode 100644 --- a/src/SocExplorerEngine/plugins/genericPySysdriver.h +++ /dev/null @@ -1,61 +0,0 @@ -/*------------------------------------------------------------------------------ --- This file is a part of the SocExplorer Software --- Copyright (C) 2011, Plasma Physics Laboratory - CNRS --- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --------------------------------------------------------------------------------*/ -/*-- Author : Alexis Jeandet --- Mail : alexis.jeandet@lpp.polytechnique.fr -----------------------------------------------------------------------------*/ -#ifndef GENERICPYSYSDRIVER_H -#define GENERICPYSYSDRIVER_H -#include -#include -#include -#include -#include -#include -#include -#include -#if defined(SOCEXPLORER_SDK_BUILD) -# define SOCEXPLORER_SDK_EXPORT Q_DECL_EXPORT -#else -# define SOCEXPLORER_SDK_EXPORT Q_DECL_IMPORT -#endif -class socexplorerplugin; - -class SOCEXPLORER_SDK_EXPORT genericPySysdriver : public QObject -{ - Q_OBJECT - -public: - - explicit genericPySysdriver(socexplorerplugin* plugin,QObject* parent=0); -signals: -public slots: - QVariantList Read(unsigned int address,unsigned int count); - void Write(unsigned int address,QList dataList); - bool dumpMemory(unsigned int address,unsigned int count,QString file); - bool memSet(unsigned int address,int value, unsigned int count); - bool loadbin(unsigned int address,QString file); - bool loadfile(abstractBinFile* file); - bool dumpMemory(unsigned int address, unsigned int count, QString file, const QString &format); - QString instance(); -private: - socexplorerplugin* plugin; - -}; - -#endif // GENERICPYSYSDRIVER_H diff --git a/src/SocExplorerEngine/plugins/socexplorerplugin.cpp b/src/SocExplorerEngine/plugins/socexplorerplugin.cpp --- a/src/SocExplorerEngine/plugins/socexplorerplugin.cpp +++ b/src/SocExplorerEngine/plugins/socexplorerplugin.cpp @@ -48,7 +48,7 @@ int socexplorerplugin::registermenu(QMen { this->childs.at(i)->registermenu(this->ChildsMenu); } - if(this->pyObject!=NULL)emit this->registerObject((QObject*)this->pyObject,this->instanceName()); + emit this->registerObject((QObject*)this,this->instanceName()); return 0; } @@ -75,6 +75,29 @@ unsigned int socexplorerplugin::Read(uns return 0; } +QVariantList socexplorerplugin::Read(unsigned int address,unsigned int count) +{ + unsigned int data[count]; + QVariantList result; + Read(data,count,address); + for(unsigned int i = 0;i dataList) +{ + unsigned int data[dataList.count()]; + for(int i = 0;iclosePlugin(this);} void socexplorerplugin::activate(bool flag){this->setEnabled(flag);emit this->activateSig(flag);} @@ -238,7 +261,4 @@ bool socexplorerplugin::dumpMemory(unsig return false; } -void socexplorerplugin::makeGenericPyWrapper() -{ - this->pyObject = new genericPySysdriver(this); -} + diff --git a/src/SocExplorerEngine/plugins/socexplorerplugin.h b/src/SocExplorerEngine/plugins/socexplorerplugin.h --- a/src/SocExplorerEngine/plugins/socexplorerplugin.h +++ b/src/SocExplorerEngine/plugins/socexplorerplugin.h @@ -42,7 +42,6 @@ #include #include #include -#include #include #ifndef driver_Name #define driver_Name "Plugin" @@ -102,10 +101,6 @@ public: _canBeRoot = driver_can_be_root; _VID = driver_VID; _PID = driver_PID; - if(createPyObject) - { - this->makeGenericPyWrapper(); - } } //! Tells if the plugin is connected, it is used to enable or disable all childrens interfaces. virtual int isConnected(); @@ -126,11 +121,11 @@ public: //! be set by SocExplorer and it can be user accessible if you want. virtual void setBaseAddress(unsigned int baseAddress); - genericPySysdriver* getPyObjectWrapper(){return this->pyObject;} QList childs; socexplorerplugin* parent; QAction* closeAction; QString instanceName(); + QString instance(){return instanceName();} QMenu* menu; QMenu* ChildsMenu; @@ -168,11 +163,11 @@ public slots: virtual bool loadbin(unsigned int address,QString file); virtual bool loadfile(abstractBinFile* file); virtual bool dumpMemory(unsigned int address,unsigned int count,QString file,const QString& format); + QVariantList Read(unsigned int address, unsigned int count); + void Write(unsigned int address, QList dataList); protected: - void makeGenericPyWrapper(); int BaseAddress; bool Connected; - genericPySysdriver* pyObject; QString* _Name; QString* _Author; QString* _Version; diff --git a/src/SocExplorerEngine/pythonQtOut/generated_cpp/PySocExplorerEngine/PySocExplorerEngine0.cpp b/src/SocExplorerEngine/pythonQtOut/generated_cpp/PySocExplorerEngine/PySocExplorerEngine0.cpp --- a/src/SocExplorerEngine/pythonQtOut/generated_cpp/PySocExplorerEngine/PySocExplorerEngine0.cpp +++ b/src/SocExplorerEngine/pythonQtOut/generated_cpp/PySocExplorerEngine/PySocExplorerEngine0.cpp @@ -1542,6 +1542,11 @@ bool PythonQtWrapper_socexplorerplugin: return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_dumpMemory(address, count, file, format)); } +QString PythonQtWrapper_socexplorerplugin::instance(socexplorerplugin* theWrappedObject) +{ + return ( theWrappedObject->instance()); +} + QString PythonQtWrapper_socexplorerplugin::instanceName(socexplorerplugin* theWrappedObject) { return ( theWrappedObject->instanceName()); @@ -1557,11 +1562,6 @@ bool PythonQtWrapper_socexplorerplugin: return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_loadbin(address, file)); } -void PythonQtWrapper_socexplorerplugin::makeGenericPyWrapper(socexplorerplugin* theWrappedObject) -{ - ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_makeGenericPyWrapper()); -} - bool PythonQtWrapper_socexplorerplugin::memSet(socexplorerplugin* theWrappedObject, unsigned int address, int value, unsigned int count) { return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_memSet(address, value, count)); diff --git a/src/SocExplorerEngine/pythonQtOut/generated_cpp/PySocExplorerEngine/PySocExplorerEngine0.h b/src/SocExplorerEngine/pythonQtOut/generated_cpp/PySocExplorerEngine/PySocExplorerEngine0.h --- a/src/SocExplorerEngine/pythonQtOut/generated_cpp/PySocExplorerEngine/PySocExplorerEngine0.h +++ b/src/SocExplorerEngine/pythonQtOut/generated_cpp/PySocExplorerEngine/PySocExplorerEngine0.h @@ -125,7 +125,6 @@ inline bool promoted_dumpMemory(unsigne inline bool promoted_dumpMemory(unsigned int address, unsigned int count, QString file, const QString& format) { return socexplorerplugin::dumpMemory(address, count, file, format); } inline int promoted_isConnected() { return socexplorerplugin::isConnected(); } inline bool promoted_loadbin(unsigned int address, QString file) { return socexplorerplugin::loadbin(address, file); } -inline void promoted_makeGenericPyWrapper() { socexplorerplugin::makeGenericPyWrapper(); } inline bool promoted_memSet(unsigned int address, int value, unsigned int count) { return socexplorerplugin::memSet(address, value, count); } inline void promoted_postInstantiationTrigger() { socexplorerplugin::postInstantiationTrigger(); } inline int promoted_registermenu(QMenu* menu) { return socexplorerplugin::registermenu(menu); } @@ -149,10 +148,10 @@ void delete_socexplorerplugin(socexplore void closeMe(socexplorerplugin* theWrappedObject); bool dumpMemory(socexplorerplugin* theWrappedObject, unsigned int address, unsigned int count, QString file); bool dumpMemory(socexplorerplugin* theWrappedObject, unsigned int address, unsigned int count, QString file, const QString& format); + QString instance(socexplorerplugin* theWrappedObject); QString instanceName(socexplorerplugin* theWrappedObject); int isConnected(socexplorerplugin* theWrappedObject); bool loadbin(socexplorerplugin* theWrappedObject, unsigned int address, QString file); - void makeGenericPyWrapper(socexplorerplugin* theWrappedObject); bool memSet(socexplorerplugin* theWrappedObject, unsigned int address, int value, unsigned int count); void postInstantiationTrigger(socexplorerplugin* theWrappedObject); int registermenu(socexplorerplugin* theWrappedObject, QMenu* menu); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -66,7 +66,7 @@ void SocExplorerMainWindow::makeObjects( socexplorerproxy::setMainWindow(this); SocExplorerEngine::setMainWindow(this); SocExplorerEngine::xmlModel()->scanXmlFiles(); - this->regExplorer = new regsExplorer(); + this->regExplorer = new RegsExplorer(); this->regExplorer->setAllowedAreas(Qt::AllDockWidgetAreas); this->addPluginInterface(this->regExplorer); this->PythonConsoleInst = new PythonConsole(socexplorerproxy::self()); @@ -74,7 +74,6 @@ void SocExplorerMainWindow::makeObjects( this->pluginManager = new dockablePluginManager(); this->toolpane = new toolBar; this->p_about = new aboutsocexplorer(); - } void SocExplorerMainWindow::makeLayout() @@ -132,7 +131,6 @@ void SocExplorerMainWindow::addPluginInt if(p_pluginGUIlist->count()!=0) this->pluginsDockContainer->tabifyDockWidget(p_pluginGUIlist->last(),plugin); p_pluginGUIlist->append(plugin); - } void SocExplorerMainWindow::removePluginInterface(QDockWidget *plugin) diff --git a/src/mainwindow.h b/src/mainwindow.h --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -78,7 +78,7 @@ private: QSplitter* mainWidget; PythonConsole* PythonConsoleInst; dockablePluginManager* pluginManager; - regsExplorer* regExplorer; + RegsExplorer* regExplorer; aboutsocexplorer* p_about; QList* p_pluginGUIlist; }; diff --git a/src/regsExplorer/regsexplorer.cpp b/src/regsExplorer/regsexplorer.cpp --- a/src/regsExplorer/regsexplorer.cpp +++ b/src/regsExplorer/regsexplorer.cpp @@ -1,50 +1,58 @@ #include "regsexplorer.h" +#include "ui_regsexplorernew.h" #include "socmodel.h" -regsExplorer::regsExplorer(QWidget *parent) : - QDockWidget(parent) +RegsExplorer::RegsExplorer(QWidget *parent) : + QDockWidget(parent), + ui(new Ui::RegsExplorerNew) { - mainWidget = new QTabWidget; - cfg = new regsExplorerCfg; - socViewer = new SocRegsViewerNew(tr("No soc Detected"),this); - this->setWidget(this->mainWidget); - this->mainWidget->addTab(this->cfg,"Config"); - this->mainWidget->addTab(this->socViewer,"View"); - this->setWindowTitle(tr("Regs Explorer")); + ui->setupUi(this); connect(SocExplorerEngine::self(),SIGNAL(enumDeviceAdded(socExplorerEnumDevice*)),this,SLOT(addDev(socExplorerEnumDevice*))); + delegate.device=NULL; +} + +RegsExplorer::~RegsExplorer() +{ + delete ui; } - -void regsExplorer::addDev(socExplorerEnumDevice *device) +void RegsExplorer::addDev(socExplorerEnumDevice *device) { - delegate.device = device; - peripheralWidget* peripheral=new peripheralWidget(device->name(),device->baseAddress(),&delegate,this); - this->socViewer->addPeripheral(peripheral); - peripheralModel periphM=SocExplorerEngine::xmlModel()->getPeripheral(device->name()); - int startIndex,stopIndex; - QString desc; - QString name; - bool rw; - for(int i=0;isameSoc(device))||(delegate.device==NULL)) { - peripheral->addRegister(periphM.registers.at(i).name,device->baseAddress() + periphM.registers.at(i).offset); - for(int j=0;jname(),device->baseAddress(),&delegate,this); + this->ui->regsViewer->addPeripheral(peripheral); + peripheralModel periphM=SocExplorerEngine::xmlModel()->getPeripheral(device->name()); + int startIndex,stopIndex; + QString desc; + QString name; + bool rw; + this->ui->regsViewer->setSocName(device->socName()); + for(int i=0;iregisterAt(i)->setBitFieldAttribute(startIndex,stopIndex,name,desc,rw); + peripheral->addRegister(periphM.registers.at(i).name,device->baseAddress() + periphM.registers.at(i).offset); + for(int j=0;jregisterAt(i)->setBitFieldAttribute(startIndex,stopIndex,name,desc,rw); + } } } -// connect(peripheral,SIGNAL(readRegSig(qint32)),device,SLOT(readReg(qint32))); -// connect(peripheral,SIGNAL(writeRegSig(qint32,qint32)),device,SLOT(writeReg(qint32,qint32))); -// QCheckBox* chkbx = this->cfg->addDev(device); -// chkbx->setChecked(true); -// connect(chkbx,SIGNAL(toggled(bool)),peripheral,SLOT(setVisible(bool))); } - - - +void RegsExplorer::changeEvent(QEvent *e) +{ + QDockWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} diff --git a/src/regsExplorer/regsexplorer.h b/src/regsExplorer/regsexplorer.h --- a/src/regsExplorer/regsexplorer.h +++ b/src/regsExplorer/regsexplorer.h @@ -1,41 +1,16 @@ -/*------------------------------------------------------------------------------ --- This file is a part of the SocExplorer Software --- Copyright (C) 2011, Plasma Physics Laboratory - CNRS --- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --------------------------------------------------------------------------------*/ -/*-- Author : Alexis Jeandet --- Mail : alexis.jeandet@lpp.polytechnique.fr -----------------------------------------------------------------------------*/ -#ifndef REGSEXPLORER_H -#define REGSEXPLORER_H +#ifndef REGSEXPLORERNEW_H +#define REGSEXPLORERNEW_H -#include -#include #include -#include "regsexplorercfg.h" -#include "regsviewer.h" -#include #include #include -#include #include - +namespace Ui { +class RegsExplorerNew; +} -class regsExplorer : public QDockWidget +class RegsExplorer : public QDockWidget { Q_OBJECT class regExplorerReadWriteDelegate: public peripheralWidget::readWriteProxy @@ -47,20 +22,16 @@ class regsExplorer : public QDockWidget socExplorerEnumDevice* device; }; public: - explicit regsExplorer(QWidget *parent = 0); - -signals: - + explicit RegsExplorer(QWidget *parent = 0); + ~RegsExplorer(); public slots: - void addDev(socExplorerEnumDevice* device); +protected: + void changeEvent(QEvent *e); private: - QTabWidget* mainWidget; - regsExplorerCfg* cfg; -// socRegsViewer* socViewer; - SocRegsViewerNew* socViewer; + Ui::RegsExplorerNew *ui; regExplorerReadWriteDelegate delegate; }; -#endif // REGSEXPLORER_H +#endif // REGSEXPLORERNEW_H diff --git a/src/regsExplorer/regsexplorercfg.cpp b/src/regsExplorer/regsexplorercfg.cpp deleted file mode 100644 --- a/src/regsExplorer/regsexplorercfg.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include "regsexplorercfg.h" -#include -#include - -regsExplorerCfg::regsExplorerCfg(QWidget *parent) : - QWidget(parent) -{ - this->mainLayout = new QGridLayout; - this->setLayout(this->mainLayout); - this->regsList = new QList(); -} - -QCheckBox *regsExplorerCfg::addDev(socExplorerEnumDevice *device) -{ - QCheckBox* chkbx = new QCheckBox(device->name() + QString(" @0x%1").arg((uint)device->baseAddress(),8,16)); - this->regsList->append(chkbx); - this->mainLayout->addWidget(this->regsList->last()); - return chkbx; -} - -void regsExplorerCfg::updateRegList() -{ - this->clear(); - QCheckBox* tmp; - QList* socs = SocExplorerEngine::getSOCs(); -// for(int i=0;i<->count();i++) -// { -// tmp = new QCheckBox(devs->at(i)->name()); -// this->regsList->append(tmp); -// this->mainLayout->addWidget(tmp); -// } -} - - - -void regsExplorerCfg::clear() -{ - QCheckBox* tmp; - for(int i=0;iregsList->count();i++) - { - this->mainLayout->removeWidget(this->regsList->last()); - tmp = this->regsList->last(); - this->regsList->removeLast(); - delete tmp; - } -} - - - - - - - - - diff --git a/src/regsExplorer/regsexplorercfg.h b/src/regsExplorer/regsexplorercfg.h deleted file mode 100644 --- a/src/regsExplorer/regsexplorercfg.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef REGSEXPLORERCFG_H -#define REGSEXPLORERCFG_H - -#include -#include -#include -#include -#include - -class regsExplorerCfg : public QWidget -{ - Q_OBJECT -public: - explicit regsExplorerCfg(QWidget *parent = 0); - -signals: - -public slots: - void updateRegList(); - QCheckBox* addDev(socExplorerEnumDevice *device); - void clear(); -private: - QGridLayout* mainLayout; - QList* regsList; - -}; - -#endif // REGSEXPLORERCFG_H diff --git a/src/regsExplorer/regsexplorernew.ui b/src/regsExplorer/regsexplorernew.ui new file mode 100644 --- /dev/null +++ b/src/regsExplorer/regsexplorernew.ui @@ -0,0 +1,44 @@ + + + RegsExplorerNew + + + + 0 + 0 + 400 + 300 + + + + Regs Explorer + + + + + + + + + + Root Plugin + + + + + + + + + + + + SocRegsViewerNew + QWidget +
socregsviewernew.h
+ 1 +
+
+ + +
diff --git a/src/regsExplorer/regsviewer.cpp b/src/regsExplorer/regsviewer.cpp deleted file mode 100644 --- a/src/regsExplorer/regsviewer.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "regsviewer.h" - -regsViewer::regsViewer(QWidget *parent) : - QScrollArea(parent) -{ -} diff --git a/src/regsExplorer/regsviewer.h b/src/regsExplorer/regsviewer.h deleted file mode 100644 --- a/src/regsExplorer/regsviewer.h +++ /dev/null @@ -1,40 +0,0 @@ -/*------------------------------------------------------------------------------ --- This file is a part of the SocExplorer Software --- Copyright (C) 2011, Plasma Physics Laboratory - CNRS --- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --------------------------------------------------------------------------------*/ -/*-- Author : Alexis Jeandet --- Mail : alexis.jeandet@lpp.polytechnique.fr -----------------------------------------------------------------------------*/ -#ifndef REGSVIEWER_H -#define REGSVIEWER_H - -#include -#include - -class regsViewer : public QScrollArea -{ - Q_OBJECT -public: - explicit regsViewer(QWidget *parent = 0); - -signals: - -public slots: - -}; - -#endif // REGSVIEWER_H diff --git a/src/src.pro b/src/src.pro --- a/src/src.pro +++ b/src/src.pro @@ -72,10 +72,8 @@ SOURCES += main.cpp\ dockablepluginmanager.cpp \ toolbar.cpp \ toolbarcontainer.cpp \ - regsExplorer/regsexplorer.cpp \ - regsExplorer/regsviewer.cpp \ - regsExplorer/regsexplorercfg.cpp \ - aboutsocexplorer.cpp + aboutsocexplorer.cpp \ + regsExplorer/regsexplorer.cpp HEADERS += mainwindow.h \ PyWdgt/pythonconsole.h \ @@ -83,12 +81,10 @@ HEADERS += mainwindow.h \ dockablepluginmanager.h \ toolbar.h \ toolbarcontainer.h \ - regsExplorer/regsexplorer.h \ - regsExplorer/regsviewer.h \ - regsExplorer/regsexplorercfg.h \ socexplorer.h \ SocExplorerEngine/plugins/socexplorerplugin.h \ - aboutsocexplorer.h + aboutsocexplorer.h \ + regsExplorer/regsexplorer.h include ( NicePyConsole/NicePyConsole.pri) @@ -104,6 +100,8 @@ unix{ TRANSLATIONS = ../translations/socexplorer_fr.ts \ ../translations/socexplorer_en.ts +FORMS += \ + regsExplorer/regsexplorernew.ui @@ -112,3 +110,4 @@ TRANSLATIONS = ../translations/socexplor +