@@ -1,5 +1,6 | |||||
1 |
#!/usr/bin/lppmon -e |
|
1 | #!/usr/bin/lppmon -e | |
2 |
|
2 | |||
|
3 | ||||
3 | class test(PySocExplorerEngine.socexplorerplugin): |
|
4 | class test(PySocExplorerEngine.socexplorerplugin): | |
4 | m_Layout = QtGui.QGridLayout() |
|
5 | m_Layout = QtGui.QGridLayout() | |
5 | m_CenterWidget = QtGui.QWidget() |
|
6 | m_CenterWidget = QtGui.QWidget() | |
@@ -9,19 +10,23 class test(PySocExplorerEngine.socexplor | |||||
9 | m_writeQPB = QtGui.QPushButton("write") |
|
10 | m_writeQPB = QtGui.QPushButton("write") | |
10 |
|
11 | |||
11 | def postInstantiationTrigger(self): |
|
12 | def postInstantiationTrigger(self): | |
12 |
print |
|
13 | print("building GUI") | |
13 | self.setWidget(self.m_CenterWidget) |
|
14 | self.setWidget(self.m_CenterWidget) | |
14 | self.m_CenterWidget.setLayout(self.m_Layout) |
|
15 | self.m_CenterWidget.setLayout(self.m_Layout) | |
15 | self.m_Layout.addWidget(self.m_addressQSPB,0,0,1,1) |
|
16 | self.m_Layout.addWidget(self.m_addressQSPB, 0, 0, 1, 1) | |
16 | self.m_Layout.addWidget(self.m_readQPB,0,1,1,1) |
|
17 | self.m_Layout.addWidget(self.m_readQPB, 0, 1, 1, 1) | |
17 | self.m_Layout.addWidget(self.m_writeQPB,0,2,1,1) |
|
18 | self.m_Layout.addWidget(self.m_writeQPB, 0, 2, 1, 1) | |
18 | self.m_Layout.addWidget(self.m_hexviewer,1,0,1,-1) |
|
19 | self.m_Layout.addWidget(self.m_hexviewer, 1, 0, 1, -1) | |
|
20 | ||||
19 | def hello(self): |
|
21 | def hello(self): | |
20 |
print |
|
22 | print("hello") | |
|
23 | ||||
21 | def VID(self): |
|
24 | def VID(self): | |
22 | return 10 |
|
25 | return 10 | |
|
26 | ||||
23 | def PID(self): |
|
27 | def PID(self): | |
24 | return 100 |
|
28 | return 100 | |
|
29 | ||||
25 | def readData(self): |
|
30 | def readData(self): | |
26 | bufferQBA = QtCore.QByteArray() |
|
31 | bufferQBA = QtCore.QByteArray() | |
27 | buffer = self.parentPlugin().Read(self.m_addressQSPB.value,16*1024) |
|
32 | buffer = self.parentPlugin().Read(self.m_addressQSPB.value, 16*1024) |
General Comments 0
You need to be logged in to leave comments.
Login now