##// END OF EJS Templates
New register explorer WIP...
jeandet -
r79:3440ba47d0f1 default
parent child
Show More
@@ -0,0 +1,44
1 <?xml version="1.0" encoding="UTF-8"?>
2 <ui version="4.0">
3 <class>RegsExplorerNew</class>
4 <widget class="QDockWidget" name="RegsExplorerNew">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>400</width>
10 <height>300</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Regs Explorer</string>
15 </property>
16 <widget class="QWidget" name="dockWidgetContents">
17 <layout class="QGridLayout" name="gridLayout">
18 <item row="0" column="1">
19 <widget class="QComboBox" name="comboBox"/>
20 </item>
21 <item row="0" column="0">
22 <widget class="QLabel" name="label">
23 <property name="text">
24 <string>Root Plugin</string>
25 </property>
26 </widget>
27 </item>
28 <item row="1" column="0" colspan="2">
29 <widget class="SocRegsViewerNew" name="regsViewer" native="true"/>
30 </item>
31 </layout>
32 </widget>
33 </widget>
34 <customwidgets>
35 <customwidget>
36 <class>SocRegsViewerNew</class>
37 <extends>QWidget</extends>
38 <header location="global">socregsviewernew.h</header>
39 <container>1</container>
40 </customwidget>
41 </customwidgets>
42 <resources/>
43 <connections/>
44 </ui>
@@ -1,4 +1,4
1 9790824220ca06014e65a5c13aa4ed37f89d7593 src/SocExplorerEngine/PeripheralWidget
1 1cb664ab4bb3c531d706b1948a378ed9810c0dda src/SocExplorerEngine/PeripheralWidget
2 cc958c79ba0939809a70e63b8bac798930160243 src/common/genericBinaryFiles
2 cc958c79ba0939809a70e63b8bac798930160243 src/common/genericBinaryFiles
3 2dce25b198558be573f56c1cf337aa95ddd666d6 src/common/lppserial
3 2dce25b198558be573f56c1cf337aa95ddd666d6 src/common/lppserial
4 923afde9cc96bb419cf898560d080ec96991aeca src/common/qhexedit
4 923afde9cc96bb419cf898560d080ec96991aeca src/common/qhexedit
@@ -3,4 +3,8
3 class test(PySocExplorerEngine.socexplorerplugin):
3 class test(PySocExplorerEngine.socexplorerplugin):
4 def hello(self):
4 def hello(self):
5 print "hello"
5 print "hello"
6 def VID(self):
7 return 10
8 def PID(self):
9 return 100
6
10
@@ -11,6 +11,7 QGroupBox::title {
11 }
11 }
12
12
13 QWidget#CollapsablePeripheralWidget {
13 QWidget#CollapsablePeripheralWidget {
14 border: 1px solid gray;
14 border: 2px solid gray;
15 border-radius: 9px;
15 border-radius: 6px;
16 margin-top: 0.5em;
16 }
17 }
@@ -62,7 +62,8 void PythonConsole::changeSysDriverInstN
62 socexplorerplugin* obj= this->proxy->getSysDriver(previnstanceName);
62 socexplorerplugin* obj= this->proxy->getSysDriver(previnstanceName);
63 if(obj==NULL)obj= this->proxy->getSysDriver(newinstanceName);
63 if(obj==NULL)obj= this->proxy->getSysDriver(newinstanceName);
64 if(obj==NULL)return;
64 if(obj==NULL)return;
65 this->mainContext->addObject(newinstanceName,obj->getPyObjectWrapper());
65 // this->mainContext->addObject(newinstanceName,obj->getPyObjectWrapper());
66 this->mainContext->addObject(newinstanceName,obj);
66 this->mainContext->removeVariable(previnstanceName);
67 this->mainContext->removeVariable(previnstanceName);
67 }
68 }
68
69
@@ -38,6 +38,9 public:
38 QString name(){return *_devName;}
38 QString name(){return *_devName;}
39 bool visible(){return _visible;}
39 bool visible(){return _visible;}
40 void setVisible(bool visible){_visible=visible;}
40 void setVisible(bool visible){_visible=visible;}
41 const QString& socName(){return _SOC->name();}
42 bool sameSoc(socExplorerEnumDevice* dev){return sameSoc(_SOC);}
43 bool sameSoc(SOCModel* soc){return soc==_SOC;}
41 signals:
44 signals:
42
45
43 public slots:
46 public slots:
@@ -87,6 +87,7 public:
87 }
87 }
88 bool enumDeviceExists(qint32 baseAddress);
88 bool enumDeviceExists(qint32 baseAddress);
89 socExplorerEnumDevice *getEnumDevice(qint32 baseAddress);
89 socExplorerEnumDevice *getEnumDevice(qint32 baseAddress);
90 const QString& name(){return p_name;}
90 public slots:
91 public slots:
91 qint32 getEnumDeviceBaseAddress(int VID,int PID,int count=0);
92 qint32 getEnumDeviceBaseAddress(int VID,int PID,int count=0);
92 qint32 getEnumDeviceCount(int VID,int PID);
93 qint32 getEnumDeviceCount(int VID,int PID);
@@ -96,6 +97,7 public slots:
96 qint32 readReg(qint32 address);
97 qint32 readReg(qint32 address);
97 bool isLitleEndian();
98 bool isLitleEndian();
98 private:
99 private:
100 QString p_name;
99 socexplorerplugin* p_rootDev;
101 socexplorerplugin* p_rootDev;
100 QList<socExplorerEnumDevice*> p_enumeratedDevices;
102 QList<socExplorerEnumDevice*> p_enumeratedDevices;
101 QList<SOCclk*> clktree;
103 QList<SOCclk*> clktree;
@@ -103,7 +103,6 INCLUDEPATH += engine \
103 HEADERS += \
103 HEADERS += \
104 pluginloader/pluginscache.h \
104 pluginloader/pluginscache.h \
105 pluginloader/pluginloader.h \
105 pluginloader/pluginloader.h \
106 plugins/genericPySysdriver.h \
107 pluginManagerWdgt/plugintree.h \
106 pluginManagerWdgt/plugintree.h \
108 pluginManagerWdgt/pluginmanagerWDGT.h \
107 pluginManagerWdgt/pluginmanagerWDGT.h \
109 pluginManagerWdgt/pluginlist.h \
108 pluginManagerWdgt/pluginlist.h \
@@ -150,7 +149,6 SOURCES += \
150 PeripheralWidget/src/registerwidget.cpp \
149 PeripheralWidget/src/registerwidget.cpp \
151 PeripheralWidget/src/socregsviewer.cpp \
150 PeripheralWidget/src/socregsviewer.cpp \
152 SOC/socclk.cpp \
151 SOC/socclk.cpp \
153 plugins/genericPySysdriver.cpp \
154 engine/socexplorerengine.cpp \
152 engine/socexplorerengine.cpp \
155 engine/socexplorerxmlfile.cpp \
153 engine/socexplorerxmlfile.cpp \
156 proxy/socexplorerproxy.cpp \
154 proxy/socexplorerproxy.cpp \
@@ -48,7 +48,7 int socexplorerplugin::registermenu(QMen
48 {
48 {
49 this->childs.at(i)->registermenu(this->ChildsMenu);
49 this->childs.at(i)->registermenu(this->ChildsMenu);
50 }
50 }
51 if(this->pyObject!=NULL)emit this->registerObject((QObject*)this->pyObject,this->instanceName());
51 emit this->registerObject((QObject*)this,this->instanceName());
52 return 0;
52 return 0;
53 }
53 }
54
54
@@ -75,6 +75,29 unsigned int socexplorerplugin::Read(uns
75 return 0;
75 return 0;
76 }
76 }
77
77
78 QVariantList socexplorerplugin::Read(unsigned int address,unsigned int count)
79 {
80 unsigned int data[count];
81 QVariantList result;
82 Read(data,count,address);
83 for(unsigned int i = 0;i<count;i++)
84 {
85 result.append(QVariant((int)data[i]));
86 }
87 return result;
88 }
89 void socexplorerplugin::Write(unsigned int address,QList<QVariant> dataList)
90 {
91 unsigned int data[dataList.count()];
92 for(int i = 0;i<dataList.count();i++)
93 {
94 data[i] = (unsigned int)dataList.at(i).toUInt();
95 }
96 Write(data,dataList.count(),address);
97 }
98
99
100
78 void socexplorerplugin::closeMe(){emit this->closePlugin(this);}
101 void socexplorerplugin::closeMe(){emit this->closePlugin(this);}
79
102
80 void socexplorerplugin::activate(bool flag){this->setEnabled(flag);emit this->activateSig(flag);}
103 void socexplorerplugin::activate(bool flag){this->setEnabled(flag);emit this->activateSig(flag);}
@@ -238,7 +261,4 bool socexplorerplugin::dumpMemory(unsig
238 return false;
261 return false;
239 }
262 }
240
263
241 void socexplorerplugin::makeGenericPyWrapper()
264
242 {
243 this->pyObject = new genericPySysdriver(this);
244 }
@@ -42,7 +42,6
42 #include <QFile>
42 #include <QFile>
43 #include <stdint.h>
43 #include <stdint.h>
44 #include <QTextStream>
44 #include <QTextStream>
45 #include <genericPySysdriver.h>
46 #include <abstractbinfile.h>
45 #include <abstractbinfile.h>
47 #ifndef driver_Name
46 #ifndef driver_Name
48 #define driver_Name "Plugin"
47 #define driver_Name "Plugin"
@@ -102,10 +101,6 public:
102 _canBeRoot = driver_can_be_root;
101 _canBeRoot = driver_can_be_root;
103 _VID = driver_VID;
102 _VID = driver_VID;
104 _PID = driver_PID;
103 _PID = driver_PID;
105 if(createPyObject)
106 {
107 this->makeGenericPyWrapper();
108 }
109 }
104 }
110 //! Tells if the plugin is connected, it is used to enable or disable all childrens interfaces.
105 //! Tells if the plugin is connected, it is used to enable or disable all childrens interfaces.
111 virtual int isConnected();
106 virtual int isConnected();
@@ -126,11 +121,11 public:
126 //! be set by SocExplorer and it can be user accessible if you want.
121 //! be set by SocExplorer and it can be user accessible if you want.
127 virtual void setBaseAddress(unsigned int baseAddress);
122 virtual void setBaseAddress(unsigned int baseAddress);
128
123
129 genericPySysdriver* getPyObjectWrapper(){return this->pyObject;}
130 QList<socexplorerplugin*> childs;
124 QList<socexplorerplugin*> childs;
131 socexplorerplugin* parent;
125 socexplorerplugin* parent;
132 QAction* closeAction;
126 QAction* closeAction;
133 QString instanceName();
127 QString instanceName();
128 QString instance(){return instanceName();}
134 QMenu* menu;
129 QMenu* menu;
135 QMenu* ChildsMenu;
130 QMenu* ChildsMenu;
136
131
@@ -168,11 +163,11 public slots:
168 virtual bool loadbin(unsigned int address,QString file);
163 virtual bool loadbin(unsigned int address,QString file);
169 virtual bool loadfile(abstractBinFile* file);
164 virtual bool loadfile(abstractBinFile* file);
170 virtual bool dumpMemory(unsigned int address,unsigned int count,QString file,const QString& format);
165 virtual bool dumpMemory(unsigned int address,unsigned int count,QString file,const QString& format);
166 QVariantList Read(unsigned int address, unsigned int count);
167 void Write(unsigned int address, QList<QVariant> dataList);
171 protected:
168 protected:
172 void makeGenericPyWrapper();
173 int BaseAddress;
169 int BaseAddress;
174 bool Connected;
170 bool Connected;
175 genericPySysdriver* pyObject;
176 QString* _Name;
171 QString* _Name;
177 QString* _Author;
172 QString* _Author;
178 QString* _Version;
173 QString* _Version;
@@ -1542,6 +1542,11 bool PythonQtWrapper_socexplorerplugin:
1542 return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_dumpMemory(address, count, file, format));
1542 return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_dumpMemory(address, count, file, format));
1543 }
1543 }
1544
1544
1545 QString PythonQtWrapper_socexplorerplugin::instance(socexplorerplugin* theWrappedObject)
1546 {
1547 return ( theWrappedObject->instance());
1548 }
1549
1545 QString PythonQtWrapper_socexplorerplugin::instanceName(socexplorerplugin* theWrappedObject)
1550 QString PythonQtWrapper_socexplorerplugin::instanceName(socexplorerplugin* theWrappedObject)
1546 {
1551 {
1547 return ( theWrappedObject->instanceName());
1552 return ( theWrappedObject->instanceName());
@@ -1557,11 +1562,6 bool PythonQtWrapper_socexplorerplugin:
1557 return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_loadbin(address, file));
1562 return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_loadbin(address, file));
1558 }
1563 }
1559
1564
1560 void PythonQtWrapper_socexplorerplugin::makeGenericPyWrapper(socexplorerplugin* theWrappedObject)
1561 {
1562 ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_makeGenericPyWrapper());
1563 }
1564
1565 bool PythonQtWrapper_socexplorerplugin::memSet(socexplorerplugin* theWrappedObject, unsigned int address, int value, unsigned int count)
1565 bool PythonQtWrapper_socexplorerplugin::memSet(socexplorerplugin* theWrappedObject, unsigned int address, int value, unsigned int count)
1566 {
1566 {
1567 return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_memSet(address, value, count));
1567 return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_memSet(address, value, count));
@@ -125,7 +125,6 inline bool promoted_dumpMemory(unsigne
125 inline bool promoted_dumpMemory(unsigned int address, unsigned int count, QString file, const QString& format) { return socexplorerplugin::dumpMemory(address, count, file, format); }
125 inline bool promoted_dumpMemory(unsigned int address, unsigned int count, QString file, const QString& format) { return socexplorerplugin::dumpMemory(address, count, file, format); }
126 inline int promoted_isConnected() { return socexplorerplugin::isConnected(); }
126 inline int promoted_isConnected() { return socexplorerplugin::isConnected(); }
127 inline bool promoted_loadbin(unsigned int address, QString file) { return socexplorerplugin::loadbin(address, file); }
127 inline bool promoted_loadbin(unsigned int address, QString file) { return socexplorerplugin::loadbin(address, file); }
128 inline void promoted_makeGenericPyWrapper() { socexplorerplugin::makeGenericPyWrapper(); }
129 inline bool promoted_memSet(unsigned int address, int value, unsigned int count) { return socexplorerplugin::memSet(address, value, count); }
128 inline bool promoted_memSet(unsigned int address, int value, unsigned int count) { return socexplorerplugin::memSet(address, value, count); }
130 inline void promoted_postInstantiationTrigger() { socexplorerplugin::postInstantiationTrigger(); }
129 inline void promoted_postInstantiationTrigger() { socexplorerplugin::postInstantiationTrigger(); }
131 inline int promoted_registermenu(QMenu* menu) { return socexplorerplugin::registermenu(menu); }
130 inline int promoted_registermenu(QMenu* menu) { return socexplorerplugin::registermenu(menu); }
@@ -149,10 +148,10 void delete_socexplorerplugin(socexplore
149 void closeMe(socexplorerplugin* theWrappedObject);
148 void closeMe(socexplorerplugin* theWrappedObject);
150 bool dumpMemory(socexplorerplugin* theWrappedObject, unsigned int address, unsigned int count, QString file);
149 bool dumpMemory(socexplorerplugin* theWrappedObject, unsigned int address, unsigned int count, QString file);
151 bool dumpMemory(socexplorerplugin* theWrappedObject, unsigned int address, unsigned int count, QString file, const QString& format);
150 bool dumpMemory(socexplorerplugin* theWrappedObject, unsigned int address, unsigned int count, QString file, const QString& format);
151 QString instance(socexplorerplugin* theWrappedObject);
152 QString instanceName(socexplorerplugin* theWrappedObject);
152 QString instanceName(socexplorerplugin* theWrappedObject);
153 int isConnected(socexplorerplugin* theWrappedObject);
153 int isConnected(socexplorerplugin* theWrappedObject);
154 bool loadbin(socexplorerplugin* theWrappedObject, unsigned int address, QString file);
154 bool loadbin(socexplorerplugin* theWrappedObject, unsigned int address, QString file);
155 void makeGenericPyWrapper(socexplorerplugin* theWrappedObject);
156 bool memSet(socexplorerplugin* theWrappedObject, unsigned int address, int value, unsigned int count);
155 bool memSet(socexplorerplugin* theWrappedObject, unsigned int address, int value, unsigned int count);
157 void postInstantiationTrigger(socexplorerplugin* theWrappedObject);
156 void postInstantiationTrigger(socexplorerplugin* theWrappedObject);
158 int registermenu(socexplorerplugin* theWrappedObject, QMenu* menu);
157 int registermenu(socexplorerplugin* theWrappedObject, QMenu* menu);
@@ -66,7 +66,7 void SocExplorerMainWindow::makeObjects(
66 socexplorerproxy::setMainWindow(this);
66 socexplorerproxy::setMainWindow(this);
67 SocExplorerEngine::setMainWindow(this);
67 SocExplorerEngine::setMainWindow(this);
68 SocExplorerEngine::xmlModel()->scanXmlFiles();
68 SocExplorerEngine::xmlModel()->scanXmlFiles();
69 this->regExplorer = new regsExplorer();
69 this->regExplorer = new RegsExplorer();
70 this->regExplorer->setAllowedAreas(Qt::AllDockWidgetAreas);
70 this->regExplorer->setAllowedAreas(Qt::AllDockWidgetAreas);
71 this->addPluginInterface(this->regExplorer);
71 this->addPluginInterface(this->regExplorer);
72 this->PythonConsoleInst = new PythonConsole(socexplorerproxy::self());
72 this->PythonConsoleInst = new PythonConsole(socexplorerproxy::self());
@@ -74,7 +74,6 void SocExplorerMainWindow::makeObjects(
74 this->pluginManager = new dockablePluginManager();
74 this->pluginManager = new dockablePluginManager();
75 this->toolpane = new toolBar;
75 this->toolpane = new toolBar;
76 this->p_about = new aboutsocexplorer();
76 this->p_about = new aboutsocexplorer();
77
78 }
77 }
79
78
80 void SocExplorerMainWindow::makeLayout()
79 void SocExplorerMainWindow::makeLayout()
@@ -132,7 +131,6 void SocExplorerMainWindow::addPluginInt
132 if(p_pluginGUIlist->count()!=0)
131 if(p_pluginGUIlist->count()!=0)
133 this->pluginsDockContainer->tabifyDockWidget(p_pluginGUIlist->last(),plugin);
132 this->pluginsDockContainer->tabifyDockWidget(p_pluginGUIlist->last(),plugin);
134 p_pluginGUIlist->append(plugin);
133 p_pluginGUIlist->append(plugin);
135
136 }
134 }
137
135
138 void SocExplorerMainWindow::removePluginInterface(QDockWidget *plugin)
136 void SocExplorerMainWindow::removePluginInterface(QDockWidget *plugin)
@@ -78,7 +78,7 private:
78 QSplitter* mainWidget;
78 QSplitter* mainWidget;
79 PythonConsole* PythonConsoleInst;
79 PythonConsole* PythonConsoleInst;
80 dockablePluginManager* pluginManager;
80 dockablePluginManager* pluginManager;
81 regsExplorer* regExplorer;
81 RegsExplorer* regExplorer;
82 aboutsocexplorer* p_about;
82 aboutsocexplorer* p_about;
83 QList<QDockWidget*>* p_pluginGUIlist;
83 QList<QDockWidget*>* p_pluginGUIlist;
84 };
84 };
@@ -1,30 +1,34
1 #include "regsexplorer.h"
1 #include "regsexplorer.h"
2 #include "ui_regsexplorernew.h"
2 #include "socmodel.h"
3 #include "socmodel.h"
3
4
4 regsExplorer::regsExplorer(QWidget *parent) :
5 RegsExplorer::RegsExplorer(QWidget *parent) :
5 QDockWidget(parent)
6 QDockWidget(parent),
7 ui(new Ui::RegsExplorerNew)
6 {
8 {
7 mainWidget = new QTabWidget;
9 ui->setupUi(this);
8 cfg = new regsExplorerCfg;
9 socViewer = new SocRegsViewerNew(tr("No soc Detected"),this);
10 this->setWidget(this->mainWidget);
11 this->mainWidget->addTab(this->cfg,"Config");
12 this->mainWidget->addTab(this->socViewer,"View");
13 this->setWindowTitle(tr("Regs Explorer"));
14 connect(SocExplorerEngine::self(),SIGNAL(enumDeviceAdded(socExplorerEnumDevice*)),this,SLOT(addDev(socExplorerEnumDevice*)));
10 connect(SocExplorerEngine::self(),SIGNAL(enumDeviceAdded(socExplorerEnumDevice*)),this,SLOT(addDev(socExplorerEnumDevice*)));
11 delegate.device=NULL;
15 }
12 }
16
13
14 RegsExplorer::~RegsExplorer()
15 {
16 delete ui;
17 }
17
18
18 void regsExplorer::addDev(socExplorerEnumDevice *device)
19 void RegsExplorer::addDev(socExplorerEnumDevice *device)
20 {
21 if((delegate.device->sameSoc(device))||(delegate.device==NULL))
19 {
22 {
20 delegate.device = device;
23 delegate.device = device;
21 peripheralWidget* peripheral=new peripheralWidget(device->name(),device->baseAddress(),&delegate,this);
24 peripheralWidget* peripheral=new peripheralWidget(device->name(),device->baseAddress(),&delegate,this);
22 this->socViewer->addPeripheral(peripheral);
25 this->ui->regsViewer->addPeripheral(peripheral);
23 peripheralModel periphM=SocExplorerEngine::xmlModel()->getPeripheral(device->name());
26 peripheralModel periphM=SocExplorerEngine::xmlModel()->getPeripheral(device->name());
24 int startIndex,stopIndex;
27 int startIndex,stopIndex;
25 QString desc;
28 QString desc;
26 QString name;
29 QString name;
27 bool rw;
30 bool rw;
31 this->ui->regsViewer->setSocName(device->socName());
28 for(int i=0;i<periphM.registers.count();i++)
32 for(int i=0;i<periphM.registers.count();i++)
29 {
33 {
30 peripheral->addRegister(periphM.registers.at(i).name,device->baseAddress() + periphM.registers.at(i).offset);
34 peripheral->addRegister(periphM.registers.at(i).name,device->baseAddress() + periphM.registers.at(i).offset);
@@ -38,13 +42,17 void regsExplorer::addDev(socExplorerEnu
38 peripheral->registerAt(i)->setBitFieldAttribute(startIndex,stopIndex,name,desc,rw);
42 peripheral->registerAt(i)->setBitFieldAttribute(startIndex,stopIndex,name,desc,rw);
39 }
43 }
40 }
44 }
41 // connect(peripheral,SIGNAL(readRegSig(qint32)),device,SLOT(readReg(qint32)));
45 }
42 // connect(peripheral,SIGNAL(writeRegSig(qint32,qint32)),device,SLOT(writeReg(qint32,qint32)));
43 // QCheckBox* chkbx = this->cfg->addDev(device);
44 // chkbx->setChecked(true);
45 // connect(chkbx,SIGNAL(toggled(bool)),peripheral,SLOT(setVisible(bool)));
46 }
46 }
47
47
48
48 void RegsExplorer::changeEvent(QEvent *e)
49
49 {
50
50 QDockWidget::changeEvent(e);
51 switch (e->type()) {
52 case QEvent::LanguageChange:
53 ui->retranslateUi(this);
54 break;
55 default:
56 break;
57 }
58 }
@@ -1,41 +1,16
1 /*------------------------------------------------------------------------------
1 #ifndef REGSEXPLORERNEW_H
2 -- This file is a part of the SocExplorer Software
2 #define REGSEXPLORERNEW_H
3 -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@lpp.polytechnique.fr
21 ----------------------------------------------------------------------------*/
22 #ifndef REGSEXPLORER_H
23 #define REGSEXPLORER_H
24
3
25 #include <QWidget>
26 #include <QTabWidget>
27 #include <QDockWidget>
4 #include <QDockWidget>
28 #include "regsexplorercfg.h"
29 #include "regsviewer.h"
30 #include <QGridLayout>
31 #include <socexplorerengine.h>
5 #include <socexplorerengine.h>
32 #include <peripheralwidget.h>
6 #include <peripheralwidget.h>
33 #include <socregsviewer.h>
34 #include <socregsviewernew.h>
7 #include <socregsviewernew.h>
35
8
36
9 namespace Ui {
10 class RegsExplorerNew;
11 }
37
12
38 class regsExplorer : public QDockWidget
13 class RegsExplorer : public QDockWidget
39 {
14 {
40 Q_OBJECT
15 Q_OBJECT
41 class regExplorerReadWriteDelegate: public peripheralWidget::readWriteProxy
16 class regExplorerReadWriteDelegate: public peripheralWidget::readWriteProxy
@@ -47,20 +22,16 class regsExplorer : public QDockWidget
47 socExplorerEnumDevice* device;
22 socExplorerEnumDevice* device;
48 };
23 };
49 public:
24 public:
50 explicit regsExplorer(QWidget *parent = 0);
25 explicit RegsExplorer(QWidget *parent = 0);
51
26 ~RegsExplorer();
52 signals:
53
54 public slots:
27 public slots:
55
56 void addDev(socExplorerEnumDevice* device);
28 void addDev(socExplorerEnumDevice* device);
29 protected:
30 void changeEvent(QEvent *e);
57
31
58 private:
32 private:
59 QTabWidget* mainWidget;
33 Ui::RegsExplorerNew *ui;
60 regsExplorerCfg* cfg;
61 // socRegsViewer* socViewer;
62 SocRegsViewerNew* socViewer;
63 regExplorerReadWriteDelegate delegate;
34 regExplorerReadWriteDelegate delegate;
64 };
35 };
65
36
66 #endif // REGSEXPLORER_H
37 #endif // REGSEXPLORERNEW_H
@@ -72,10 +72,8 SOURCES += main.cpp\
72 dockablepluginmanager.cpp \
72 dockablepluginmanager.cpp \
73 toolbar.cpp \
73 toolbar.cpp \
74 toolbarcontainer.cpp \
74 toolbarcontainer.cpp \
75 regsExplorer/regsexplorer.cpp \
75 aboutsocexplorer.cpp \
76 regsExplorer/regsviewer.cpp \
76 regsExplorer/regsexplorer.cpp
77 regsExplorer/regsexplorercfg.cpp \
78 aboutsocexplorer.cpp
79
77
80 HEADERS += mainwindow.h \
78 HEADERS += mainwindow.h \
81 PyWdgt/pythonconsole.h \
79 PyWdgt/pythonconsole.h \
@@ -83,12 +81,10 HEADERS += mainwindow.h \
83 dockablepluginmanager.h \
81 dockablepluginmanager.h \
84 toolbar.h \
82 toolbar.h \
85 toolbarcontainer.h \
83 toolbarcontainer.h \
86 regsExplorer/regsexplorer.h \
87 regsExplorer/regsviewer.h \
88 regsExplorer/regsexplorercfg.h \
89 socexplorer.h \
84 socexplorer.h \
90 SocExplorerEngine/plugins/socexplorerplugin.h \
85 SocExplorerEngine/plugins/socexplorerplugin.h \
91 aboutsocexplorer.h
86 aboutsocexplorer.h \
87 regsExplorer/regsexplorer.h
92
88
93
89
94 include ( NicePyConsole/NicePyConsole.pri)
90 include ( NicePyConsole/NicePyConsole.pri)
@@ -104,6 +100,8 unix{
104 TRANSLATIONS = ../translations/socexplorer_fr.ts \
100 TRANSLATIONS = ../translations/socexplorer_fr.ts \
105 ../translations/socexplorer_en.ts
101 ../translations/socexplorer_en.ts
106
102
103 FORMS += \
104 regsExplorer/regsexplorernew.ui
107
105
108
106
109
107
@@ -112,3 +110,4 TRANSLATIONS = ../translations/socexplor
112
110
113
111
114
112
113
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now