@@ -40,6 +40,7 spwplugin::spwplugin(QWidget *parent):so | |||||
40 | this->bridgeSelector->addItem("none"); |
|
40 | this->bridgeSelector->addItem("none"); | |
41 | this->bridgeSelector->addItem("STAR-Dundee Spw USB Brick"); |
|
41 | this->bridgeSelector->addItem("STAR-Dundee Spw USB Brick"); | |
42 | connect(this->bridgeSelector,SIGNAL(currentIndexChanged(QString)),this,SLOT(bridgeSelectionChanged(QString))); |
|
42 | connect(this->bridgeSelector,SIGNAL(currentIndexChanged(QString)),this,SLOT(bridgeSelectionChanged(QString))); | |
|
43 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(selectBridge(QString)),this,SLOT(selectBridge(QString))); | |||
43 | } |
|
44 | } | |
44 |
|
45 | |||
45 |
|
46 | |||
@@ -96,6 +97,19 void spwplugin::bridgeSelectionChanged(c | |||||
96 |
|
97 | |||
97 | } |
|
98 | } | |
98 |
|
99 | |||
|
100 | void spwplugin::selectBridge(const QString &text) | |||
|
101 | { | |||
|
102 | ||||
|
103 | if(text=="none") | |||
|
104 | { | |||
|
105 | this->bridgeSelector->setCurrentIndex(0); | |||
|
106 | } | |||
|
107 | if(text=="STAR-Dundee Spw USB Brick") | |||
|
108 | { | |||
|
109 | this->bridgeSelector->setCurrentIndex(1); | |||
|
110 | } | |||
|
111 | } | |||
|
112 | ||||
99 | void spwplugin::setConnected(bool connected) |
|
113 | void spwplugin::setConnected(bool connected) | |
100 | { |
|
114 | { | |
101 | this->bridgeSelector->setDisabled(connected); |
|
115 | this->bridgeSelector->setDisabled(connected); |
@@ -55,6 +55,7 public slots: | |||||
55 | unsigned int Read(unsigned int *Value,unsigned int count, unsigned int address=0); |
|
55 | unsigned int Read(unsigned int *Value,unsigned int count, unsigned int address=0); | |
56 |
|
56 | |||
57 | void bridgeSelectionChanged( const QString & text ); |
|
57 | void bridgeSelectionChanged( const QString & text ); | |
|
58 | void selectBridge( const QString & text ); | |||
58 | void setConnected(bool connected); |
|
59 | void setConnected(bool connected); | |
59 |
|
60 | |||
60 | signals: |
|
61 | signals: |
@@ -9,6 +9,7 public: | |||||
9 | explicit spwPyWrapper(socexplorerplugin *parent = 0); |
|
9 | explicit spwPyWrapper(socexplorerplugin *parent = 0); | |
10 |
|
10 | |||
11 | signals: |
|
11 | signals: | |
|
12 | void selectBridge(const QString &bridgeName); | |||
12 | bool connectBridge(); |
|
13 | bool connectBridge(); | |
13 | bool disconnectBridge(); |
|
14 | bool disconnectBridge(); | |
14 | void StarDundeeSelectBrick(int brickIndex); |
|
15 | void StarDundeeSelectBrick(int brickIndex); |
@@ -128,10 +128,6 unsigned int stardundeeSPW_USB::Write(un | |||||
128 | qApp->processEvents(); |
|
128 | qApp->processEvents(); | |
129 | } |
|
129 | } | |
130 | } |
|
130 | } | |
131 | // if(progress!=NULL) |
|
|||
132 | // { |
|
|||
133 | // SocExplorerEngine::deleteProgressBar(progress); |
|
|||
134 | // } |
|
|||
135 | return written; |
|
131 | return written; | |
136 | } |
|
132 | } | |
137 |
|
133 | |||
@@ -208,10 +204,6 unsigned int stardundeeSPW_USB::Read(uns | |||||
208 | qApp->processEvents(); |
|
204 | qApp->processEvents(); | |
209 | } |
|
205 | } | |
210 | } |
|
206 | } | |
211 | // if(progress!=NULL) |
|
|||
212 | // { |
|
|||
213 | // SocExplorerEngine::deleteProgressBar(progress); |
|
|||
214 | // } |
|
|||
215 | return read; |
|
207 | return read; | |
216 | } |
|
208 | } | |
217 |
|
209 |
General Comments 0
You need to be logged in to leave comments.
Login now