mirror of
https://github.com/brmlab/edubrm.git
synced 2025-06-08 04:43:59 +02:00
start/stop modules
This commit is contained in:
parent
3aa8986d49
commit
0cce0afdc2
3 changed files with 14 additions and 4 deletions
|
@ -24,6 +24,8 @@ class ModuleButton(QPushButton):
|
|||
self.form.ui.lblTitle.setText(self.mod.title)
|
||||
self.form.ui.areaModule.setWidget(self.mod.widget)
|
||||
self.form.ui.areaModule.show()
|
||||
self.form.mod = self.mod
|
||||
self.mod.start()
|
||||
|
||||
class Main(QMainWindow):
|
||||
def __init__(self):
|
||||
|
@ -40,6 +42,7 @@ class Main(QMainWindow):
|
|||
|
||||
@pyqtSlot()
|
||||
def on_btnBack_clicked(self):
|
||||
self.mod.stop()
|
||||
self.ui.lblTitle.setText('EduBRM')
|
||||
# TODO: erase everything from self.ui.areaModule
|
||||
self.ui.areaChoose.show()
|
||||
|
|
|
@ -4,5 +4,8 @@ class ModuleA():
|
|||
self.title = 'A'
|
||||
self.widget = None
|
||||
|
||||
def run(self):
|
||||
print 'run A'
|
||||
def start(self):
|
||||
print 'start A'
|
||||
|
||||
def stop(self):
|
||||
print 'stop A'
|
||||
|
|
|
@ -151,5 +151,9 @@ class ModuleDebug():
|
|||
self.title = 'Debug'
|
||||
self.widget = ModuleDebugWidget()
|
||||
|
||||
def run(self):
|
||||
print 'run Debug'
|
||||
def start(self):
|
||||
print 'start Debug'
|
||||
|
||||
def stop(self):
|
||||
print 'stop Debug'
|
||||
self.widget.timer.stop()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue