##// 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
@@ -10,3 +10,7 QGroupBox::title {
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 }
@@ -67,6 +67,7 header.files = engine/socexplorerengine.
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
@@ -124,7 +125,9 HEADERS += \
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
@@ -153,7 +156,9 SOURCES += \
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 += \
@@ -163,4 +168,10 OTHER_FILES += \
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
@@ -104,6 +104,7 void socexplorerproxy::loadSysDriver(soc
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)
@@ -6,7 +6,7 regsExplorer::regsExplorer(QWidget *pare
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");
@@ -17,7 +17,8 regsExplorer::regsExplorer(QWidget *pare
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;
@@ -37,11 +38,11 void regsExplorer::addDev(socExplorerEnu
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
@@ -31,10 +31,21
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
@@ -47,9 +58,9 public slots:
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
@@ -111,3 +111,4 TRANSLATIONS = ../translations/socexplor
111
111
112
112
113
113
114
General Comments 0
You need to be logged in to leave comments. Login now