##// END OF EJS Templates
New register explorer WIP.
jeandet -
r78:9b311fda2412 default
parent child
Show More
@@ -1,4 +1,4
1 2c82d72694590cbc2aebb946667f11f60ea89afe src/SocExplorerEngine/PeripheralWidget
1 9790824220ca06014e65a5c13aa4ed37f89d7593 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
@@ -1,12 +1,16
1 QGroupBox {
1 QGroupBox {
2 border: 1px solid gray;
2 border: 1px solid gray;
3 border-radius: 9px;
3 border-radius: 9px;
4 margin-top: 0.5em;
4 margin-top: 0.5em;
5 }
5 }
6
6
7 QGroupBox::title {
7 QGroupBox::title {
8 subcontrol-origin: margin;
8 subcontrol-origin: margin;
9 left: 10px;
9 left: 10px;
10 padding: 0 3px 0 3px;
10 padding: 0 3px 0 3px;
11 }
11 }
12
12
13 QWidget#CollapsablePeripheralWidget {
14 border: 1px solid gray;
15 border-radius: 9px;
16 }
@@ -1,166 +1,177
1 SOCEXPLORER_ROOT = \"$${PWD}/../..\"
1 SOCEXPLORER_ROOT = \"$${PWD}/../..\"
2
2
3 include($${PWD}/../../build_cfg/socexplorer.pri)
3 include($${PWD}/../../build_cfg/socexplorer.pri)
4
4
5 TARGET = socexplorerengine$${DEBUG_EXT}
5 TARGET = socexplorerengine$${DEBUG_EXT}
6 TEMPLATE = lib
6 TEMPLATE = lib
7
7
8 #more verbose plugin loader to debug plugin loading issues such as dependencies issues
8 #more verbose plugin loader to debug plugin loading issues such as dependencies issues
9 SOCEXPLORER_PLUGIN_LOADER="custom"
9 SOCEXPLORER_PLUGIN_LOADER="custom"
10
10
11 SOCEXPLORER_CHAGESETNUM=$$system(hg id)
11 SOCEXPLORER_CHAGESETNUM=$$system(hg id)
12 isEmpty(SOCEXPLORER_CHAGESETNUM){
12 isEmpty(SOCEXPLORER_CHAGESETNUM){
13 SOCEXPLORER_CHAGESETNUM=2c7201cecc87+
13 SOCEXPLORER_CHAGESETNUM=2c7201cecc87+
14 }
14 }
15 SOCEXPLORER_CHAGESETNUMSTR = '\\"$${SOCEXPLORER_CHAGESETNUM}\\"'
15 SOCEXPLORER_CHAGESETNUMSTR = '\\"$${SOCEXPLORER_CHAGESETNUM}\\"'
16 SOCEXPLORER_BRANCH=$$system(hg branch)
16 SOCEXPLORER_BRANCH=$$system(hg branch)
17 isEmpty(SOCEXPLORER_BRANCH){
17 isEmpty(SOCEXPLORER_BRANCH){
18 SOCEXPLORER_BRANCH=default
18 SOCEXPLORER_BRANCH=default
19 }
19 }
20 SOCEXPLORER_BRANCHSTR = '\\"$${SOCEXPLORER_BRANCH}\\"'
20 SOCEXPLORER_BRANCHSTR = '\\"$${SOCEXPLORER_BRANCH}\\"'
21
21
22 DEFINES += SOCEXPLORER_VERSION="\"\\\"0.5.0"\\\"\"
22 DEFINES += SOCEXPLORER_VERSION="\"\\\"0.5.0"\\\"\"
23 DEFINES += SOCEXPLORER_CHAGESET=\"$${SOCEXPLORER_CHAGESETNUMSTR}\"
23 DEFINES += SOCEXPLORER_CHAGESET=\"$${SOCEXPLORER_CHAGESETNUMSTR}\"
24 DEFINES += SOCEXPLORER_BRANCH=\"$${SOCEXPLORER_BRANCHSTR}\"
24 DEFINES += SOCEXPLORER_BRANCH=\"$${SOCEXPLORER_BRANCHSTR}\"
25
25
26
26
27 message("Building SOCEXPLORER changeset $${SOCEXPLORER_CHAGESETNUM}")
27 message("Building SOCEXPLORER changeset $${SOCEXPLORER_CHAGESETNUM}")
28
28
29 DEFINES += SOCEXPLORER_EXPORTS
29 DEFINES += SOCEXPLORER_EXPORTS
30
30
31 include ( plugins/socexplorerplugin.prf )
31 include ( plugins/socexplorerplugin.prf )
32 include ( PeripheralWidget/PeripheralWidget.pri)
32 include ( PeripheralWidget/PeripheralWidget.pri)
33
33
34 win32:CONFIG += dll
34 win32:CONFIG += dll
35 win32:CONFIG -= static
35 win32:CONFIG -= static
36 win32:LIBS+=-L$${SOCEXPLORER_ROOT}/bin/win32 -lsocexplorercommon$${DEBUG_EXT}
36 win32:LIBS+=-L$${SOCEXPLORER_ROOT}/bin/win32 -lsocexplorercommon$${DEBUG_EXT}
37
37
38 contains(SOCEXPLORER_PLUGIN_LOADER,"custom")
38 contains(SOCEXPLORER_PLUGIN_LOADER,"custom")
39 {
39 {
40 unix:LIBS+= -ldl
40 unix:LIBS+= -ldl
41 unix:DEFINES += SOCEXPLORER_CUSTOM_PLUGIN_LOADER
41 unix:DEFINES += SOCEXPLORER_CUSTOM_PLUGIN_LOADER
42 unix:HEADERS += \
42 unix:HEADERS += \
43 pluginloader/unix/unixpluginloader.h
43 pluginloader/unix/unixpluginloader.h
44 unix:SOURCES += \
44 unix:SOURCES += \
45 pluginloader/unix/unixpluginloader.cpp
45 pluginloader/unix/unixpluginloader.cpp
46 }
46 }
47
47
48 target.path = $$[QT_INSTALL_LIBS]
48 target.path = $$[QT_INSTALL_LIBS]
49 isEmpty(target.path) {
49 isEmpty(target.path) {
50 error(can\'t get QT_INSTALL_LIBS)
50 error(can\'t get QT_INSTALL_LIBS)
51 }
51 }
52
52
53 header.path = $$[QT_INSTALL_HEADERS]/SocExplorer
53 header.path = $$[QT_INSTALL_HEADERS]/SocExplorer
54 header.files = engine/socexplorerengine.h \
54 header.files = engine/socexplorerengine.h \
55 pluginloader/pluginscache.h \
55 pluginloader/pluginscache.h \
56 plugins/socexplorerplugin.h \
56 plugins/socexplorerplugin.h \
57 proxy/socexplorerproxy.h \
57 proxy/socexplorerproxy.h \
58 engine/socexplorerxmlfile.h \
58 engine/socexplorerxmlfile.h \
59 SOC/socexplorerenumdevice.h \
59 SOC/socexplorerenumdevice.h \
60 plugins/genericPySysdriver.h \
60 plugins/genericPySysdriver.h \
61 XmlEngine/XMLmodel.h \
61 XmlEngine/XMLmodel.h \
62 XmlEngine/XMLdata.h \
62 XmlEngine/XMLdata.h \
63 XmlEngine/xmldriver.h \
63 XmlEngine/xmldriver.h \
64 SOC/socmodel.h \
64 SOC/socmodel.h \
65 SOC/registerdata.h \
65 SOC/registerdata.h \
66 SOC/socclk.h \
66 SOC/socclk.h \
67 PeripheralWidget/src/peripheralwidget.h \
67 PeripheralWidget/src/peripheralwidget.h \
68 PeripheralWidget/src/registerwidget.h \
68 PeripheralWidget/src/registerwidget.h \
69 PeripheralWidget/src/socregsviewer.h \
69 PeripheralWidget/src/socregsviewer.h \
70 PeripheralWidget/src/socregsviewernew.h \
70 memtester/memtester.h
71 memtester/memtester.h
71
72
72
73
73
74
74 isEmpty(header.path) {
75 isEmpty(header.path) {
75 error(can\'t get QT_INSTALL_HEADERS)
76 error(can\'t get QT_INSTALL_HEADERS)
76 }
77 }
77
78
78 pluginif.files = pluginsInterface/*.h \
79 pluginif.files = pluginsInterface/*.h \
79 pluginsInterface/*.cpp
80 pluginsInterface/*.cpp
80
81
81 pluginif.path = $$[QT_INSTALL_HEADERS]/SocExplorer/pluginsInterface
82 pluginif.path = $$[QT_INSTALL_HEADERS]/SocExplorer/pluginsInterface
82
83
83
84
84 INSTALLS += target header pluginif
85 INSTALLS += target header pluginif
85
86
86 INCLUDEPATH += engine \
87 INCLUDEPATH += engine \
87 pluginloader \
88 pluginloader \
88 pluginsInterface \
89 pluginsInterface \
89 proxy \
90 proxy \
90 plugins \
91 plugins \
91 pluginManagerWdgt \
92 pluginManagerWdgt \
92 ../common \
93 ../common \
93 ../common/genericBinaryFiles \
94 ../common/genericBinaryFiles \
94 ../ \
95 ../ \
95 RegisterMVS \
96 RegisterMVS \
96 XmlEngine \
97 XmlEngine \
97 SOC \
98 SOC \
98 PeripheralWidget/src \
99 PeripheralWidget/src \
99 memtester
100 memtester
100
101
101
102
102 HEADERS += \
103 HEADERS += \
103 pluginloader/pluginscache.h \
104 pluginloader/pluginscache.h \
104 pluginloader/pluginloader.h \
105 pluginloader/pluginloader.h \
105 plugins/genericPySysdriver.h \
106 plugins/genericPySysdriver.h \
106 pluginManagerWdgt/plugintree.h \
107 pluginManagerWdgt/plugintree.h \
107 pluginManagerWdgt/pluginmanagerWDGT.h \
108 pluginManagerWdgt/pluginmanagerWDGT.h \
108 pluginManagerWdgt/pluginlist.h \
109 pluginManagerWdgt/pluginlist.h \
109 pluginManagerWdgt/plugininfoswdgt.h \
110 pluginManagerWdgt/plugininfoswdgt.h \
110 XmlEngine/XMLmodel.h \
111 XmlEngine/XMLmodel.h \
111 XmlEngine/XMLdata.h \
112 XmlEngine/XMLdata.h \
112 SOC/socmodel.h \
113 SOC/socmodel.h \
113 SOC/registerdata.h \
114 SOC/registerdata.h \
114 XmlEngine/xmldriver.h \
115 XmlEngine/xmldriver.h \
115 PeripheralWidget/src/peripheralwidget.h \
116 PeripheralWidget/src/peripheralwidget.h \
116 PeripheralWidget/src/registerwidget.h \
117 PeripheralWidget/src/registerwidget.h \
117 PeripheralWidget/src/socregsviewer.h \
118 PeripheralWidget/src/socregsviewer.h \
118 SOC/socclk.h \
119 SOC/socclk.h \
119 engine/socexplorerengine.h \
120 engine/socexplorerengine.h \
120 engine/socexplorerxmlfile.h \
121 engine/socexplorerxmlfile.h \
121 plugins/socexplorerplugin.h \
122 plugins/socexplorerplugin.h \
122 pluginsInterface/socexplorerplugininterface.h \
123 pluginsInterface/socexplorerplugininterface.h \
123 pluginsInterface/socexplorerplugininterface_global.h \
124 pluginsInterface/socexplorerplugininterface_global.h \
124 proxy/socexplorerproxy.h \
125 proxy/socexplorerproxy.h \
125 SOC/socexplorerenumdevice.h \
126 SOC/socexplorerenumdevice.h \
126 PySocExplorerEngine.h \
127 PySocExplorerEngine.h \
127 memtester/memtester.h
128 memtester/memtester.h\
129 PeripheralWidget/src/socregsviewernew.h \
130 PeripheralWidget/src/collapsableperipheralwidget.h
128
131
129
132
130
133
131
134
132
135
133
136
134 SOURCES += \
137 SOURCES += \
135 pluginloader/pluginscache.cpp \
138 pluginloader/pluginscache.cpp \
136 pluginloader/pluginloader.cpp \
139 pluginloader/pluginloader.cpp \
137 pluginManagerWdgt/plugintree.cpp \
140 pluginManagerWdgt/plugintree.cpp \
138 pluginManagerWdgt/pluginmanagerWDGT.cpp \
141 pluginManagerWdgt/pluginmanagerWDGT.cpp \
139 pluginManagerWdgt/pluginlist.cpp \
142 pluginManagerWdgt/pluginlist.cpp \
140 pluginManagerWdgt/plugininfoswdgt.cpp \
143 pluginManagerWdgt/plugininfoswdgt.cpp \
141 XmlEngine/XMLmodel.cpp \
144 XmlEngine/XMLmodel.cpp \
142 XmlEngine/XMLdata.cpp \
145 XmlEngine/XMLdata.cpp \
143 SOC/socmodel.cpp \
146 SOC/socmodel.cpp \
144 SOC/registerdata.cpp \
147 SOC/registerdata.cpp \
145 XmlEngine/xmldriver.cpp \
148 XmlEngine/xmldriver.cpp \
146 PeripheralWidget/src/peripheralwidget.cpp \
149 PeripheralWidget/src/peripheralwidget.cpp \
147 PeripheralWidget/src/registerwidget.cpp \
150 PeripheralWidget/src/registerwidget.cpp \
148 PeripheralWidget/src/socregsviewer.cpp \
151 PeripheralWidget/src/socregsviewer.cpp \
149 SOC/socclk.cpp \
152 SOC/socclk.cpp \
150 plugins/genericPySysdriver.cpp \
153 plugins/genericPySysdriver.cpp \
151 engine/socexplorerengine.cpp \
154 engine/socexplorerengine.cpp \
152 engine/socexplorerxmlfile.cpp \
155 engine/socexplorerxmlfile.cpp \
153 proxy/socexplorerproxy.cpp \
156 proxy/socexplorerproxy.cpp \
154 SOC/socexplorerenumdevice.cpp \
157 SOC/socexplorerenumdevice.cpp \
155 plugins/socexplorerplugin.cpp \
158 plugins/socexplorerplugin.cpp \
156 memtester/memtester.cpp
159 memtester/memtester.cpp \
160 PeripheralWidget/src/socregsviewernew.cpp \
161 PeripheralWidget/src/collapsableperipheralwidget.cpp
157
162
158
163
159 OTHER_FILES += \
164 OTHER_FILES += \
160 plugins/socexplorerplugin.cpp \
165 plugins/socexplorerplugin.cpp \
161 pluginsInterface/socexplorerplugininterface.cpp \
166 pluginsInterface/socexplorerplugininterface.cpp \
162 plugins/socexplorerplugin.prf \
167 plugins/socexplorerplugin.prf \
163 pythongenerator.sh \
168 pythongenerator.sh \
164 pythonQtgeneratorCfg.txt
169 pythonQtgeneratorCfg.txt
165
170
171 FORMS += \
172 PeripheralWidget/src/socregsviewernew.ui \
173 PeripheralWidget/src/collapsableperipheralwidget.ui
166
174
175
176 RESOURCES += \
177 PeripheralWidget/ressources/peripheralwidget.qrc
@@ -1,370 +1,371
1 /*------------------------------------------------------------------------------
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the SocExplorer Software
2 -- This file is a part of the SocExplorer Software
3 -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS
3 -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS
4 --
4 --
5 -- This program is free software; you can redistribute it and/or modify
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
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
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
8 -- (at your option) any later version.
9 --
9 --
10 -- This program is distributed in the hope that it will be useful,
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
13 -- GNU General Public License for more details.
14 --
14 --
15 -- You should have received a copy of the GNU General Public License
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
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
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@lpp.polytechnique.fr
20 -- Mail : alexis.jeandet@lpp.polytechnique.fr
21 ----------------------------------------------------------------------------*/
21 ----------------------------------------------------------------------------*/
22 #include "socexplorerproxy.h"
22 #include "socexplorerproxy.h"
23 #include <pluginmanagerWDGT.h>
23 #include <pluginmanagerWDGT.h>
24 #include <socexplorerengine.h>
24 #include <socexplorerengine.h>
25 #include <pluginloader.h>
25 #include <pluginloader.h>
26 #include <socexplorerplugin.h>
26 #include <socexplorerplugin.h>
27
27
28 socexplorerproxy* socexplorerproxy::_self=NULL;
28 socexplorerproxy* socexplorerproxy::_self=NULL;
29 QMainWindow* socexplorerproxy::mainWindow=NULL;
29 QMainWindow* socexplorerproxy::mainWindow=NULL;
30 QList<socexplorerplugin*>* socexplorerproxy::drivers=NULL;
30 QList<socexplorerplugin*>* socexplorerproxy::drivers=NULL;
31 QList<socexplorerplugin*>* socexplorerproxy::linearDriverList=NULL;
31 QList<socexplorerplugin*>* socexplorerproxy::linearDriverList=NULL;
32 socexplorerplugin* socexplorerproxy::root=NULL;
32 socexplorerplugin* socexplorerproxy::root=NULL;
33 socexplorerplugin* socexplorerproxy::parent=NULL;
33 socexplorerplugin* socexplorerproxy::parent=NULL;
34 PluginsCache* socexplorerproxy::cache=NULL;
34 PluginsCache* socexplorerproxy::cache=NULL;
35
35
36 socexplorerproxy::socexplorerproxy(QObject *parent) :
36 socexplorerproxy::socexplorerproxy(QObject *parent) :
37 QObject(parent)
37 QObject(parent)
38 {
38 {
39 cache = new PluginsCache;
39 cache = new PluginsCache;
40 drivers = new QList<socexplorerplugin*>;
40 drivers = new QList<socexplorerplugin*>;
41 linearDriverList=new QList<socexplorerplugin*>;
41 linearDriverList=new QList<socexplorerplugin*>;
42 root = NULL;
42 root = NULL;
43 }
43 }
44
44
45
45
46 socexplorerproxy::socexplorerproxy(QMainWindow *Mainwindow, QObject *parent):
46 socexplorerproxy::socexplorerproxy(QMainWindow *Mainwindow, QObject *parent):
47 QObject(parent)
47 QObject(parent)
48 {
48 {
49 mainWindow = Mainwindow;
49 mainWindow = Mainwindow;
50 cache = new PluginsCache;
50 cache = new PluginsCache;
51 drivers = new QList<socexplorerplugin*>;
51 drivers = new QList<socexplorerplugin*>;
52 linearDriverList=new QList<socexplorerplugin*>;
52 linearDriverList=new QList<socexplorerplugin*>;
53 root = NULL;
53 root = NULL;
54 }
54 }
55
55
56
56
57 void socexplorerproxy::init()
57 void socexplorerproxy::init()
58 {
58 {
59 if(!_self)
59 if(!_self)
60 {
60 {
61 _self = new socexplorerproxy();
61 _self = new socexplorerproxy();
62 mainWindow = NULL;
62 mainWindow = NULL;
63 }
63 }
64
64
65 }
65 }
66
66
67 void socexplorerproxy::setMainWindow(QMainWindow *Mainwindow)
67 void socexplorerproxy::setMainWindow(QMainWindow *Mainwindow)
68 {
68 {
69 if(!_self)init();
69 if(!_self)init();
70 mainWindow=Mainwindow;
70 mainWindow=Mainwindow;
71 }
71 }
72
72
73 void socexplorerproxy::loadSysDriver(const QString name)
73 void socexplorerproxy::loadSysDriver(const QString name)
74 {
74 {
75 if(!_self)init();
75 if(!_self)init();
76 if(pluginloader::libcanberoot(name))
76 if(pluginloader::libcanberoot(name))
77 {
77 {
78 socexplorerplugin* driver = pluginloader::newsocexplorerplugin(name);
78 socexplorerplugin* driver = pluginloader::newsocexplorerplugin(name);
79 QString driverName = _self->getinstanceName(driver->baseName());
79 QString driverName = _self->getinstanceName(driver->baseName());
80 loadSysDriver(driver,driverName);
80 loadSysDriver(driver,driverName);
81 }
81 }
82 }
82 }
83
83
84 void socexplorerproxy::loadSysDriver(const QString name, const QString instanceName)
84 void socexplorerproxy::loadSysDriver(const QString name, const QString instanceName)
85 {
85 {
86 if(!_self)init();
86 if(!_self)init();
87 if(pluginloader::libcanberoot(name) && !_self->instanceExists(instanceName))
87 if(pluginloader::libcanberoot(name) && !_self->instanceExists(instanceName))
88 {
88 {
89 socexplorerplugin* driver = pluginloader::newsocexplorerplugin(name);
89 socexplorerplugin* driver = pluginloader::newsocexplorerplugin(name);
90 loadSysDriver(driver,instanceName);
90 loadSysDriver(driver,instanceName);
91 }
91 }
92 }
92 }
93
93
94
94
95 void socexplorerproxy::loadSysDriver(socexplorerplugin *driver, const QString instanceName)
95 void socexplorerproxy::loadSysDriver(socexplorerplugin *driver, const QString instanceName)
96 {
96 {
97 if(!_self)init();
97 if(!_self)init();
98 driver->setInstanceName(instanceName);
98 driver->setInstanceName(instanceName);
99 driver->parent = NULL;
99 driver->parent = NULL;
100 drivers->append(driver);
100 drivers->append(driver);
101 linearDriverList->append(driver);
101 linearDriverList->append(driver);
102 connectChildToProxy(driver);
102 connectChildToProxy(driver);
103 emit _self->addPluginGUI(driver);
103 emit _self->addPluginGUI(driver);
104 emit _self->clearMenu();
104 emit _self->clearMenu();
105 emit _self->treeChanged(QList<socexplorerplugin*>(*drivers));
105 emit _self->treeChanged(QList<socexplorerplugin*>(*drivers));
106 SocExplorerEngine::addSOC(driver);
106 SocExplorerEngine::addSOC(driver);
107 driver->postInstantiationTrigger();
107 }
108 }
108
109
109 void socexplorerproxy::loadChildSysDriver(socexplorerplugin *parent, const QString child)
110 void socexplorerproxy::loadChildSysDriver(socexplorerplugin *parent, const QString child)
110 {
111 {
111 if(!_self)init();
112 if(!_self)init();
112 if(pluginloader::libcanbechild(child))
113 if(pluginloader::libcanbechild(child))
113 {
114 {
114 socexplorerplugin* driver = pluginloader::newsocexplorerplugin(child);
115 socexplorerplugin* driver = pluginloader::newsocexplorerplugin(child);
115 QString driverName = _self->getinstanceName(driver->baseName());
116 QString driverName = _self->getinstanceName(driver->baseName());
116 bool ok=true;
117 bool ok=true;
117 if(ok)
118 if(ok)
118 {
119 {
119 if(parent!=NULL)_self->loadSysDriverToParent(driver,parent,driverName);
120 if(parent!=NULL)_self->loadSysDriverToParent(driver,parent,driverName);
120 }
121 }
121 }
122 }
122 }
123 }
123
124
124 void socexplorerproxy::loadSysDriverToParent(const QString name,const QString ParentInst)
125 void socexplorerproxy::loadSysDriverToParent(const QString name,const QString ParentInst)
125 {
126 {
126 if(!_self)init();
127 if(!_self)init();
127 if(pluginloader::libcanbechild(name))
128 if(pluginloader::libcanbechild(name))
128 {
129 {
129 socexplorerplugin* driver = pluginloader::newsocexplorerplugin(name);
130 socexplorerplugin* driver = pluginloader::newsocexplorerplugin(name);
130 QString driverName = _self->getinstanceName(driver->baseName());
131 QString driverName = _self->getinstanceName(driver->baseName());
131 bool ok=true;
132 bool ok=true;
132 if(ok)
133 if(ok)
133 {
134 {
134 socexplorerplugin* parent=_self->getSysDriver(ParentInst);
135 socexplorerplugin* parent=_self->getSysDriver(ParentInst);
135 if(parent!=NULL)loadSysDriverToParent(driver,parent,driverName);
136 if(parent!=NULL)loadSysDriverToParent(driver,parent,driverName);
136 }
137 }
137 }
138 }
138 }
139 }
139
140
140
141
141 void socexplorerproxy::loadSysDriverToParent(const QString name,const QString instanceName,const QString ParentInst)
142 void socexplorerproxy::loadSysDriverToParent(const QString name,const QString instanceName,const QString ParentInst)
142 {
143 {
143 if(!_self)init();
144 if(!_self)init();
144 if(pluginloader::libcanbechild(name) && !_self->instanceExists(instanceName))
145 if(pluginloader::libcanbechild(name) && !_self->instanceExists(instanceName))
145 {
146 {
146 socexplorerplugin* driver = pluginloader::newsocexplorerplugin(name);
147 socexplorerplugin* driver = pluginloader::newsocexplorerplugin(name);
147 bool ok=true;
148 bool ok=true;
148 if(ok)
149 if(ok)
149 {
150 {
150 socexplorerplugin* parent=_self->getSysDriver(ParentInst);
151 socexplorerplugin* parent=_self->getSysDriver(ParentInst);
151 if(parent!=NULL)loadSysDriverToParent(driver,parent,instanceName);
152 if(parent!=NULL)loadSysDriverToParent(driver,parent,instanceName);
152 }
153 }
153 }
154 }
154 }
155 }
155
156
156 void socexplorerproxy::loadSysDriverToParent(socexplorerplugin *driver,socexplorerplugin *parent, const QString instanceName)
157 void socexplorerproxy::loadSysDriverToParent(socexplorerplugin *driver,socexplorerplugin *parent, const QString instanceName)
157 {
158 {
158 if(!_self)init();
159 if(!_self)init();
159 linearDriverList->append(driver);
160 linearDriverList->append(driver);
160 driver->parent = parent;
161 driver->parent = parent;
161 driver->setInstanceName(instanceName);
162 driver->setInstanceName(instanceName);
162 parent->childs.append(driver);
163 parent->childs.append(driver);
163 connectChildToProxy(driver);
164 connectChildToProxy(driver);
164 connectChildToParent(parent,driver);
165 connectChildToParent(parent,driver);
165 emit _self->clearMenu();
166 emit _self->clearMenu();
166 emit _self->addPluginGUI(driver);
167 emit _self->addPluginGUI(driver);
167 emit _self->treeChanged(QList<socexplorerplugin*>(*drivers));
168 emit _self->treeChanged(QList<socexplorerplugin*>(*drivers));
168 driver->postInstantiationTrigger();
169 driver->postInstantiationTrigger();
169 }
170 }
170
171
171
172
172 void socexplorerproxy::changeSysDriverInstName(const QString instanceName)
173 void socexplorerproxy::changeSysDriverInstName(const QString instanceName)
173 {
174 {
174 Q_UNUSED(instanceName)
175 Q_UNUSED(instanceName)
175 }
176 }
176
177
177 void socexplorerproxy::changeSysDriverInstName(const QString newinstanceName, const QString previnstanceName)
178 void socexplorerproxy::changeSysDriverInstName(const QString newinstanceName, const QString previnstanceName)
178 {
179 {
179 if(!_self)init();
180 if(!_self)init();
180 socexplorerplugin*temp=_self->getSysDriver(previnstanceName);
181 socexplorerplugin*temp=_self->getSysDriver(previnstanceName);
181 if(temp!=NULL)
182 if(temp!=NULL)
182 {
183 {
183 if(NULL!=_self->getSysDriver(newinstanceName))
184 if(NULL!=_self->getSysDriver(newinstanceName))
184 {
185 {
185 emit _self->treeChanged(QList<socexplorerplugin*>(*drivers));
186 emit _self->treeChanged(QList<socexplorerplugin*>(*drivers));
186 return;
187 return;
187 }
188 }
188 temp->setInstanceName(newinstanceName);
189 temp->setInstanceName(newinstanceName);
189 }
190 }
190 emit _self->treeChanged(QList<socexplorerplugin*>(*drivers));
191 emit _self->treeChanged(QList<socexplorerplugin*>(*drivers));
191 }
192 }
192
193
193
194
194 void socexplorerproxy::connectChildToParent(socexplorerplugin *parent, socexplorerplugin *child)
195 void socexplorerproxy::connectChildToParent(socexplorerplugin *parent, socexplorerplugin *child)
195 {
196 {
196 if(!_self)init();
197 if(!_self)init();
197 connect(parent,SIGNAL(activateSig(bool)),child,SLOT(activate(bool)));
198 connect(parent,SIGNAL(activateSig(bool)),child,SLOT(activate(bool)));
198 child->activate(parent->isConnected());
199 child->activate(parent->isConnected());
199 }
200 }
200
201
201 void socexplorerproxy::disconnectChildToParent(socexplorerplugin *child)
202 void socexplorerproxy::disconnectChildToParent(socexplorerplugin *child)
202 {
203 {
203 if(!_self)init();
204 if(!_self)init();
204 disconnect(child->parent,SIGNAL(activateSig(bool)),child,SLOT(activate(bool)));
205 disconnect(child->parent,SIGNAL(activateSig(bool)),child,SLOT(activate(bool)));
205 }
206 }
206
207
207
208
208 void socexplorerproxy::connectChildToProxy(socexplorerplugin *child)
209 void socexplorerproxy::connectChildToProxy(socexplorerplugin *child)
209 {
210 {
210 if(!_self)init();
211 if(!_self)init();
211 connect(child,SIGNAL(registerObject(QObject*,QString)),_self,SIGNAL(registerObject(QObject*,QString)));
212 connect(child,SIGNAL(registerObject(QObject*,QString)),_self,SIGNAL(registerObject(QObject*,QString)));
212 connect(child,SIGNAL(closePlugin(socexplorerplugin*)),_self,SLOT(closeSysDriver(socexplorerplugin*)));
213 connect(child,SIGNAL(closePlugin(socexplorerplugin*)),_self,SLOT(closeSysDriver(socexplorerplugin*)));
213 }
214 }
214
215
215 void socexplorerproxy::disconnectChildToProxy(socexplorerplugin *child)
216 void socexplorerproxy::disconnectChildToProxy(socexplorerplugin *child)
216 {
217 {
217 if(!_self)init();
218 if(!_self)init();
218 disconnect(child,SIGNAL(registerObject(QObject*,QString)),_self,SIGNAL(registerObject(QObject*,QString)));
219 disconnect(child,SIGNAL(registerObject(QObject*,QString)),_self,SIGNAL(registerObject(QObject*,QString)));
219 disconnect(child,SIGNAL(closePlugin(socexplorerplugin*)),_self,SLOT(closeSysDriverFromDriver(socexplorerplugin*)));
220 disconnect(child,SIGNAL(closePlugin(socexplorerplugin*)),_self,SLOT(closeSysDriverFromDriver(socexplorerplugin*)));
220 }
221 }
221
222
222 QString socexplorerproxy::getinstanceName(const QString& baseName)
223 QString socexplorerproxy::getinstanceName(const QString& baseName)
223 {
224 {
224 if(!_self)init();
225 if(!_self)init();
225 int i=0;
226 int i=0;
226 QString name;
227 QString name;
227 bool validName = false;
228 bool validName = false;
228 while(!validName)
229 while(!validName)
229 {
230 {
230 name.clear();
231 name.clear();
231 name.append(baseName+QString::number(i));
232 name.append(baseName+QString::number(i));
232 validName = instanceNameIsValid(name);
233 validName = instanceNameIsValid(name);
233 i++;
234 i++;
234 }
235 }
235 return name;
236 return name;
236 }
237 }
237
238
238 void socexplorerproxy::changeSysDriverInstName(socexplorerplugin* driver)
239 void socexplorerproxy::changeSysDriverInstName(socexplorerplugin* driver)
239 {
240 {
240 if(!_self)init();
241 if(!_self)init();
241 QString prevName(driver->instanceName());
242 QString prevName(driver->instanceName());
242 }
243 }
243
244
244 bool socexplorerproxy::instanceNameIsValid(const QString& instanceName)
245 bool socexplorerproxy::instanceNameIsValid(const QString& instanceName)
245 {
246 {
246 if(!_self)init();
247 if(!_self)init();
247 for(int k=0;k<linearDriverList->count();k++)
248 for(int k=0;k<linearDriverList->count();k++)
248 {
249 {
249 if(!linearDriverList->at(k)->instanceName().compare(instanceName))
250 if(!linearDriverList->at(k)->instanceName().compare(instanceName))
250 return false;
251 return false;
251 }
252 }
252 return true;
253 return true;
253 }
254 }
254
255
255 socexplorerplugin *socexplorerproxy::findPlugin(const QString &instanceName)
256 socexplorerplugin *socexplorerproxy::findPlugin(const QString &instanceName)
256 {
257 {
257 if(!_self)init();
258 if(!_self)init();
258 for(int k=0;k<linearDriverList->count();k++)
259 for(int k=0;k<linearDriverList->count();k++)
259 {
260 {
260 if(!linearDriverList->at(k)->instanceName().compare(instanceName))
261 if(!linearDriverList->at(k)->instanceName().compare(instanceName))
261 return linearDriverList->at(k);
262 return linearDriverList->at(k);
262 }
263 }
263 return NULL;
264 return NULL;
264 }
265 }
265
266
266 bool socexplorerproxy::instanceExists(const QString &instanceName)
267 bool socexplorerproxy::instanceExists(const QString &instanceName)
267 {
268 {
268 return !socexplorerproxy::instanceNameIsValid(instanceName);
269 return !socexplorerproxy::instanceNameIsValid(instanceName);
269 }
270 }
270
271
271 void socexplorerproxy::close()
272 void socexplorerproxy::close()
272 {
273 {
273 if(!_self)init();
274 if(!_self)init();
274 socexplorerplugin* tmpPtr;
275 socexplorerplugin* tmpPtr;
275 while(drivers->count()>0)
276 while(drivers->count()>0)
276 {
277 {
277 tmpPtr = drivers->last();
278 tmpPtr = drivers->last();
278 drivers->removeLast();
279 drivers->removeLast();
279 _self->closeSysDriver(tmpPtr);
280 _self->closeSysDriver(tmpPtr);
280 }
281 }
281 if(root!=NULL)
282 if(root!=NULL)
282 {
283 {
283 _self->closeSysDriver(root);
284 _self->closeSysDriver(root);
284 }
285 }
285
286
286 }
287 }
287
288
288 socexplorerplugin* socexplorerproxy::getSysDriver(const QString instanceName)
289 socexplorerplugin* socexplorerproxy::getSysDriver(const QString instanceName)
289 {
290 {
290 if(!_self)init();
291 if(!_self)init();
291 for(int i=0;i<linearDriverList->count();i++)
292 for(int i=0;i<linearDriverList->count();i++)
292 {
293 {
293 if(!linearDriverList->at(i)->instanceName().compare(instanceName))
294 if(!linearDriverList->at(i)->instanceName().compare(instanceName))
294 return linearDriverList->at(i);
295 return linearDriverList->at(i);
295 }
296 }
296 return NULL;
297 return NULL;
297 }
298 }
298
299
299
300
300 void socexplorerproxy::closeSysDriver(const QString instanceName)
301 void socexplorerproxy::closeSysDriver(const QString instanceName)
301 {
302 {
302 if(!_self)init();
303 if(!_self)init();
303 closeSysDriver(getSysDriver(instanceName),false);
304 closeSysDriver(getSysDriver(instanceName),false);
304 }
305 }
305
306
306 void socexplorerproxy::closeSysDriver(socexplorerplugin *driver, bool recursive)
307 void socexplorerproxy::closeSysDriver(socexplorerplugin *driver, bool recursive)
307 {
308 {
308 if(!_self)init();
309 if(!_self)init();
309 if(driver!=NULL)
310 if(driver!=NULL)
310 {
311 {
311 emit _self->removePluginGUI(driver);
312 emit _self->removePluginGUI(driver);
312 if(driver->parent==NULL)SocExplorerEngine::removeSOC(driver);
313 if(driver->parent==NULL)SocExplorerEngine::removeSOC(driver);
313 while(driver->childs.count()!=0)closeSysDriver(driver->childs.first());
314 while(driver->childs.count()!=0)closeSysDriver(driver->childs.first());
314 linearDriverList->removeOne(driver);
315 linearDriverList->removeOne(driver);
315 if(driver->parent!= NULL)
316 if(driver->parent!= NULL)
316 {
317 {
317 driver->parent->childs.removeOne(driver); //Have parent so it's a child
318 driver->parent->childs.removeOne(driver); //Have parent so it's a child
318 disconnectChildToParent(driver);
319 disconnectChildToParent(driver);
319 disconnectChildToProxy(driver);
320 disconnectChildToProxy(driver);
320 delete driver;
321 delete driver;
321 }
322 }
322 else
323 else
323 {
324 {
324 drivers->removeOne(driver);
325 drivers->removeOne(driver);
325 disconnectChildToProxy(driver);
326 disconnectChildToProxy(driver);
326 delete driver;
327 delete driver;
327 }
328 }
328 if(!recursive)
329 if(!recursive)
329 {
330 {
330 emit _self->clearMenu();
331 emit _self->clearMenu();
331 emit _self->registermenu(mainWindow);
332 emit _self->registermenu(mainWindow);
332 emit _self->treeChanged(QList<socexplorerplugin*>(*drivers));
333 emit _self->treeChanged(QList<socexplorerplugin*>(*drivers));
333 }
334 }
334 }
335 }
335
336
336 }
337 }
337
338
338 void socexplorerproxy::geteplugintree()
339 void socexplorerproxy::geteplugintree()
339 {
340 {
340 if(!_self)init();
341 if(!_self)init();
341 emit _self->treeChanged(QList<socexplorerplugin*>(*drivers));
342 emit _self->treeChanged(QList<socexplorerplugin*>(*drivers));
342 }
343 }
343
344
344 void socexplorerproxy::closeSysDriverFromDriver(socexplorerplugin *driver)
345 void socexplorerproxy::closeSysDriverFromDriver(socexplorerplugin *driver)
345 {
346 {
346 if(!_self)init();
347 if(!_self)init();
347 emit _self->closeSysDriverSig(driver);
348 emit _self->closeSysDriverSig(driver);
348 }
349 }
349
350
350 void socexplorerproxy::updateText()
351 void socexplorerproxy::updateText()
351 {
352 {
352 if(!_self)init();
353 if(!_self)init();
353 emit _self->clearMenu();
354 emit _self->clearMenu();
354 emit _self->registermenu(mainWindow);
355 emit _self->registermenu(mainWindow);
355 }
356 }
356
357
357
358
358
359
359
360
360
361
361 void socexplorerproxy::makeMenu(QMenu* menu)
362 void socexplorerproxy::makeMenu(QMenu* menu)
362 {
363 {
363 if(!_self)init();
364 if(!_self)init();
364 for(int i=0;i<drivers->count();i++)
365 for(int i=0;i<drivers->count();i++)
365 {
366 {
366 drivers->at(i)->registermenu(menu);
367 drivers->at(i)->registermenu(menu);
367 }
368 }
368 }
369 }
369
370
370
371
@@ -1,49 +1,50
1 #include "regsexplorer.h"
1 #include "regsexplorer.h"
2 #include "socmodel.h"
2 #include "socmodel.h"
3
3
4 regsExplorer::regsExplorer(QWidget *parent) :
4 regsExplorer::regsExplorer(QWidget *parent) :
5 QDockWidget(parent)
5 QDockWidget(parent)
6 {
6 {
7 mainWidget = new QTabWidget;
7 mainWidget = new QTabWidget;
8 cfg = new regsExplorerCfg;
8 cfg = new regsExplorerCfg;
9 socViewer = new socRegsViewer(tr("No soc Detected"),this);
9 socViewer = new SocRegsViewerNew(tr("No soc Detected"),this);
10 this->setWidget(this->mainWidget);
10 this->setWidget(this->mainWidget);
11 this->mainWidget->addTab(this->cfg,"Config");
11 this->mainWidget->addTab(this->cfg,"Config");
12 this->mainWidget->addTab(this->socViewer,"View");
12 this->mainWidget->addTab(this->socViewer,"View");
13 this->setWindowTitle(tr("Regs Explorer"));
13 this->setWindowTitle(tr("Regs Explorer"));
14 connect(SocExplorerEngine::self(),SIGNAL(enumDeviceAdded(socExplorerEnumDevice*)),this,SLOT(addDev(socExplorerEnumDevice*)));
14 connect(SocExplorerEngine::self(),SIGNAL(enumDeviceAdded(socExplorerEnumDevice*)),this,SLOT(addDev(socExplorerEnumDevice*)));
15 }
15 }
16
16
17
17
18 void regsExplorer::addDev(socExplorerEnumDevice *device)
18 void regsExplorer::addDev(socExplorerEnumDevice *device)
19 {
19 {
20 peripheralWidget* peripheral=new peripheralWidget(device->name(),device->baseAddress(),this);
20 delegate.device = device;
21 peripheralWidget* peripheral=new peripheralWidget(device->name(),device->baseAddress(),&delegate,this);
21 this->socViewer->addPeripheral(peripheral);
22 this->socViewer->addPeripheral(peripheral);
22 peripheralModel periphM=SocExplorerEngine::xmlModel()->getPeripheral(device->name());
23 peripheralModel periphM=SocExplorerEngine::xmlModel()->getPeripheral(device->name());
23 int startIndex,stopIndex;
24 int startIndex,stopIndex;
24 QString desc;
25 QString desc;
25 QString name;
26 QString name;
26 bool rw;
27 bool rw;
27 for(int i=0;i<periphM.registers.count();i++)
28 for(int i=0;i<periphM.registers.count();i++)
28 {
29 {
29 peripheral->addRegister(periphM.registers.at(i).name,device->baseAddress() + periphM.registers.at(i).offset);
30 peripheral->addRegister(periphM.registers.at(i).name,device->baseAddress() + periphM.registers.at(i).offset);
30 for(int j=0;j<periphM.registers.at(i).bitfields.count();j++)
31 for(int j=0;j<periphM.registers.at(i).bitfields.count();j++)
31 {
32 {
32 startIndex = periphM.registers.at(i).bitfields.at(j).offset;
33 startIndex = periphM.registers.at(i).bitfields.at(j).offset;
33 stopIndex = periphM.registers.at(i).bitfields.at(j).offset+periphM.registers.at(i).bitfields.at(j).size-1;
34 stopIndex = periphM.registers.at(i).bitfields.at(j).offset+periphM.registers.at(i).bitfields.at(j).size-1;
34 desc = periphM.registers.at(i).bitfields.at(j).description;
35 desc = periphM.registers.at(i).bitfields.at(j).description;
35 rw = periphM.registers.at(i).bitfields.at(j).rw;
36 rw = periphM.registers.at(i).bitfields.at(j).rw;
36 name = periphM.registers.at(i).bitfields.at(j).name;
37 name = periphM.registers.at(i).bitfields.at(j).name;
37 peripheral->registerAt(i)->setBitFieldAttribute(startIndex,stopIndex,name,desc,rw);
38 peripheral->registerAt(i)->setBitFieldAttribute(startIndex,stopIndex,name,desc,rw);
38 }
39 }
39 }
40 }
40 connect(peripheral,SIGNAL(readRegSig(qint32)),device,SLOT(readReg(qint32)));
41 // connect(peripheral,SIGNAL(readRegSig(qint32)),device,SLOT(readReg(qint32)));
41 connect(peripheral,SIGNAL(writeRegSig(qint32,qint32)),device,SLOT(writeReg(qint32,qint32)));
42 // connect(peripheral,SIGNAL(writeRegSig(qint32,qint32)),device,SLOT(writeReg(qint32,qint32)));
42 QCheckBox* chkbx = this->cfg->addDev(device);
43 // QCheckBox* chkbx = this->cfg->addDev(device);
43 chkbx->setChecked(true);
44 // chkbx->setChecked(true);
44 connect(chkbx,SIGNAL(toggled(bool)),peripheral,SLOT(setVisible(bool)));
45 // connect(chkbx,SIGNAL(toggled(bool)),peripheral,SLOT(setVisible(bool)));
45 }
46 }
46
47
47
48
48
49
49
50
@@ -1,55 +1,66
1 /*------------------------------------------------------------------------------
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the SocExplorer Software
2 -- This file is a part of the SocExplorer Software
3 -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS
3 -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS
4 --
4 --
5 -- This program is free software; you can redistribute it and/or modify
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
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
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
8 -- (at your option) any later version.
9 --
9 --
10 -- This program is distributed in the hope that it will be useful,
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
13 -- GNU General Public License for more details.
14 --
14 --
15 -- You should have received a copy of the GNU General Public License
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
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
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@lpp.polytechnique.fr
20 -- Mail : alexis.jeandet@lpp.polytechnique.fr
21 ----------------------------------------------------------------------------*/
21 ----------------------------------------------------------------------------*/
22 #ifndef REGSEXPLORER_H
22 #ifndef REGSEXPLORER_H
23 #define REGSEXPLORER_H
23 #define REGSEXPLORER_H
24
24
25 #include <QWidget>
25 #include <QWidget>
26 #include <QTabWidget>
26 #include <QTabWidget>
27 #include <QDockWidget>
27 #include <QDockWidget>
28 #include "regsexplorercfg.h"
28 #include "regsexplorercfg.h"
29 #include "regsviewer.h"
29 #include "regsviewer.h"
30 #include <QGridLayout>
30 #include <QGridLayout>
31 #include <socexplorerengine.h>
31 #include <socexplorerengine.h>
32 #include <peripheralwidget.h>
32 #include <peripheralwidget.h>
33 #include <socregsviewer.h>
33 #include <socregsviewer.h>
34 #include <socregsviewernew.h>
35
36
34
37
35 class regsExplorer : public QDockWidget
38 class regsExplorer : public QDockWidget
36 {
39 {
37 Q_OBJECT
40 Q_OBJECT
41 class regExplorerReadWriteDelegate: public peripheralWidget::readWriteProxy
42 {
43 public:
44 regExplorerReadWriteDelegate() {}
45 void writeReg(qint32 address,qint32 value){if(device)device->writeReg(address,value);}
46 qint32 readReg(qint32 address){if(device)return device->readReg(address);}
47 socExplorerEnumDevice* device;
48 };
38 public:
49 public:
39 explicit regsExplorer(QWidget *parent = 0);
50 explicit regsExplorer(QWidget *parent = 0);
40
51
41 signals:
52 signals:
42
53
43 public slots:
54 public slots:
44
55
45 void addDev(socExplorerEnumDevice* device);
56 void addDev(socExplorerEnumDevice* device);
46
57
47 private:
58 private:
48 QTabWidget* mainWidget;
59 QTabWidget* mainWidget;
49 regsExplorerCfg* cfg;
60 regsExplorerCfg* cfg;
50 socRegsViewer* socViewer;
61 // socRegsViewer* socViewer;
51
62 SocRegsViewerNew* socViewer;
52
63 regExplorerReadWriteDelegate delegate;
53 };
64 };
54
65
55 #endif // REGSEXPLORER_H
66 #endif // REGSEXPLORER_H
@@ -1,113 +1,114
1 #-------------------------------------------------
1 #-------------------------------------------------
2 #
2 #
3 # Project created by QtCreator 2011-09-19T22:52:10
3 # Project created by QtCreator 2011-09-19T22:52:10
4 #
4 #
5 #-------------------------------------------------
5 #-------------------------------------------------
6 SOCEXPLORER_ROOT = $${PWD}/..
6 SOCEXPLORER_ROOT = $${PWD}/..
7 include(../build_cfg/socexplorer.pri)
7 include(../build_cfg/socexplorer.pri)
8
8
9 TARGET = socexplorer$${DEBUG_EXT}
9 TARGET = socexplorer$${DEBUG_EXT}
10 TEMPLATE = app
10 TEMPLATE = app
11 CONFIG += pythonqt
11 CONFIG += pythonqt
12
12
13
13
14 QMAKE_LFLAGS_RELEASE += --enable-auto-import -mstackrealign
14 QMAKE_LFLAGS_RELEASE += --enable-auto-import -mstackrealign
15 QMAKE_LFLAGS_DEBUG += --enable-auto-import -mstackrealign
15 QMAKE_LFLAGS_DEBUG += --enable-auto-import -mstackrealign
16
16
17 include ( common/pythonQtOut/generated_cpp/PySocExplorer/PySocExplorer.pri )
17 include ( common/pythonQtOut/generated_cpp/PySocExplorer/PySocExplorer.pri )
18 include ( SocExplorerEngine/pythonQtOut/generated_cpp/PySocExplorerEngine/PySocExplorerEngine.pri )
18 include ( SocExplorerEngine/pythonQtOut/generated_cpp/PySocExplorerEngine/PySocExplorerEngine.pri )
19 include ( SocExplorerEngine/plugins/socexplorerplugin.prf )
19 include ( SocExplorerEngine/plugins/socexplorerplugin.prf )
20
20
21 INCLUDEPATH+=$${PWD} \
21 INCLUDEPATH+=$${PWD} \
22 $${PWD}/common \
22 $${PWD}/common \
23 $${PWD}/common/qhexedit \
23 $${PWD}/common/qhexedit \
24 $${PWD}/common/QCustomPlot \
24 $${PWD}/common/QCustomPlot \
25 $${PWD}/common/genericBinaryFiles \
25 $${PWD}/common/genericBinaryFiles \
26 $${PWD}/common/genericBinaryFiles/elf \
26 $${PWD}/common/genericBinaryFiles/elf \
27 $${PWD}/common/genericBinaryFiles/srec \
27 $${PWD}/common/genericBinaryFiles/srec \
28 $${PWD}/common/genericBinaryFiles/BinFile \
28 $${PWD}/common/genericBinaryFiles/BinFile \
29 SocExplorerEngine/engine \
29 SocExplorerEngine/engine \
30 SocExplorerEngine/pluginloader \
30 SocExplorerEngine/pluginloader \
31 SocExplorerEngine/pluginsInterface \
31 SocExplorerEngine/pluginsInterface \
32 SocExplorerEngine/proxy \
32 SocExplorerEngine/proxy \
33 SocExplorerEngine/pluginManagerWdgt \
33 SocExplorerEngine/pluginManagerWdgt \
34 SocExplorerEngine/plugins \
34 SocExplorerEngine/plugins \
35 SocExplorerEngine/RegisterMVS \
35 SocExplorerEngine/RegisterMVS \
36 SocExplorerEngine/XmlEngine \
36 SocExplorerEngine/XmlEngine \
37 SocExplorerEngine/SOC \
37 SocExplorerEngine/SOC \
38 SocExplorerEngine/PeripheralWidget/src \
38 SocExplorerEngine/PeripheralWidget/src \
39 SocExplorerEngine/memtester
39 SocExplorerEngine/memtester
40
40
41 win32:INCLUDEPATH+= \
41 win32:INCLUDEPATH+= \
42 $${PWD}/common/genericBinaryFiles/elf/libelfWin32/include \
42 $${PWD}/common/genericBinaryFiles/elf/libelfWin32/include \
43 $${PWD}/common/genericBinaryFiles/elf/libelfWin32/include/libelf \
43 $${PWD}/common/genericBinaryFiles/elf/libelfWin32/include/libelf \
44
44
45
45
46 RC_FILE = ../win32cfg/socexplorer.rc
46 RC_FILE = ../win32cfg/socexplorer.rc
47
47
48
48
49 unix:LIBS+=-L$${SOCEXPLORER_ROOT}/bin/linux -lsocexplorercommon$${DEBUG_EXT} -L$${SOCEXPLORER_ROOT}/bin/linux -lsocexplorerengine$${DEBUG_EXT}
49 unix:LIBS+=-L$${SOCEXPLORER_ROOT}/bin/linux -lsocexplorercommon$${DEBUG_EXT} -L$${SOCEXPLORER_ROOT}/bin/linux -lsocexplorerengine$${DEBUG_EXT}
50
50
51 win32-g++:LIBS += $${SOCEXPLORER_ROOT}/bin/win32/socexplorercommon$${DEBUG_EXT}.dll $${SOCEXPLORER_ROOT}/bin/win32/socexplorerengine$${DEBUG_EXT}.dll
51 win32-g++:LIBS += $${SOCEXPLORER_ROOT}/bin/win32/socexplorercommon$${DEBUG_EXT}.dll $${SOCEXPLORER_ROOT}/bin/win32/socexplorerengine$${DEBUG_EXT}.dll
52
52
53
53
54 unix{
54 unix{
55 translation.files = $${SOCEXPLORER_ROOT}/translations/socexplorer_fr.qm \
55 translation.files = $${SOCEXPLORER_ROOT}/translations/socexplorer_fr.qm \
56 $${SOCEXPLORER_ROOT}/translations/socexplorer_en.qm
56 $${SOCEXPLORER_ROOT}/translations/socexplorer_en.qm
57 translation.path = $${SOCEXPLORER_TRANSLATION_INSTALL_PATH}
57 translation.path = $${SOCEXPLORER_TRANSLATION_INSTALL_PATH}
58 target.path = /usr/bin
58 target.path = /usr/bin
59 INSTALLS += translation target
59 INSTALLS += translation target
60 }
60 }
61
61
62 header.path = $$[QT_INSTALL_HEADERS]/SocExplorer/common
62 header.path = $$[QT_INSTALL_HEADERS]/SocExplorer/common
63 header.files = \
63 header.files = \
64 socexplorer.h
64 socexplorer.h
65 INSTALLS += header
65 INSTALLS += header
66
66
67
67
68 SOURCES += main.cpp\
68 SOURCES += main.cpp\
69 mainwindow.cpp \
69 mainwindow.cpp \
70 PyWdgt/pythonconsole.cpp \
70 PyWdgt/pythonconsole.cpp \
71 PyWdgt/pythonqtscriptingconsoledandd.cpp \
71 PyWdgt/pythonqtscriptingconsoledandd.cpp \
72 dockablepluginmanager.cpp \
72 dockablepluginmanager.cpp \
73 toolbar.cpp \
73 toolbar.cpp \
74 toolbarcontainer.cpp \
74 toolbarcontainer.cpp \
75 regsExplorer/regsexplorer.cpp \
75 regsExplorer/regsexplorer.cpp \
76 regsExplorer/regsviewer.cpp \
76 regsExplorer/regsviewer.cpp \
77 regsExplorer/regsexplorercfg.cpp \
77 regsExplorer/regsexplorercfg.cpp \
78 aboutsocexplorer.cpp
78 aboutsocexplorer.cpp
79
79
80 HEADERS += mainwindow.h \
80 HEADERS += mainwindow.h \
81 PyWdgt/pythonconsole.h \
81 PyWdgt/pythonconsole.h \
82 PyWdgt/pythonqtscriptingconsoledandd.h \
82 PyWdgt/pythonqtscriptingconsoledandd.h \
83 dockablepluginmanager.h \
83 dockablepluginmanager.h \
84 toolbar.h \
84 toolbar.h \
85 toolbarcontainer.h \
85 toolbarcontainer.h \
86 regsExplorer/regsexplorer.h \
86 regsExplorer/regsexplorer.h \
87 regsExplorer/regsviewer.h \
87 regsExplorer/regsviewer.h \
88 regsExplorer/regsexplorercfg.h \
88 regsExplorer/regsexplorercfg.h \
89 socexplorer.h \
89 socexplorer.h \
90 SocExplorerEngine/plugins/socexplorerplugin.h \
90 SocExplorerEngine/plugins/socexplorerplugin.h \
91 aboutsocexplorer.h
91 aboutsocexplorer.h
92
92
93
93
94 include ( NicePyConsole/NicePyConsole.pri)
94 include ( NicePyConsole/NicePyConsole.pri)
95
95
96 win32{
96 win32{
97 RESOURCES = ../ressources/SocExplorer.qrc
97 RESOURCES = ../ressources/SocExplorer.qrc
98 }
98 }
99
99
100 unix{
100 unix{
101 RESOURCES = ../ressources/SocExplorer.qrc
101 RESOURCES = ../ressources/SocExplorer.qrc
102 }
102 }
103
103
104 TRANSLATIONS = ../translations/socexplorer_fr.ts \
104 TRANSLATIONS = ../translations/socexplorer_fr.ts \
105 ../translations/socexplorer_en.ts
105 ../translations/socexplorer_en.ts
106
106
107
107
108
108
109
109
110
110
111
111
112
112
113
113
114
General Comments 0
You need to be logged in to leave comments. Login now