diff --git a/software/.gitignore b/software/.gitignore index fdb230f..9fc9fb5 100644 --- a/software/.gitignore +++ b/software/.gitignore @@ -1,3 +1,3 @@ *.pyc -mainUi.py +*Ui.py resources_rc.py diff --git a/software/Makefile b/software/Makefile index 971fd8b..5af1307 100644 --- a/software/Makefile +++ b/software/Makefile @@ -1,10 +1,13 @@ -all: edubrm mainUi.py resources_rc.py +all: edubrm mainUi.py resources_rc.py modules/ModuleDebugUi.py mainUi.py: main.ui - pyuic4 main.ui -o mainUi.py + pyuic4 $< -o $@ -resources_rc.py: - pyrcc4 resources.qrc -o resources_rc.py +resources_rc.py: resources.qrc + pyrcc4 $< -o $@ + +modules/ModuleDebugUi.py: modules/ModuleDebug.ui + pyuic4 $< -o $@ clean: - rm -f *.pyc modules/*.pyc mainUi.py resources_rc.py + rm -f *.pyc *Ui.py modules/*.pyc modules/*Ui.py resources_rc.py diff --git a/software/main.py b/software/main.py index 3a5719f..63f31c1 100644 --- a/software/main.py +++ b/software/main.py @@ -22,7 +22,7 @@ class ModuleButton(QPushButton): self.form.ui.btnExit.hide() self.form.ui.btnBack.show() self.form.ui.lblTitle.setText(self.mod.title) - self.mod.setup(self.form.ui.areaModule) + self.mod.setup(self.form.ui.areaModuleContents) class Main(QMainWindow): def __init__(self): diff --git a/software/modules/.gitignore b/software/modules/.gitignore index 0d20b64..8d28acb 100644 --- a/software/modules/.gitignore +++ b/software/modules/.gitignore @@ -1 +1,2 @@ *.pyc +*Ui.py diff --git a/software/modules/ModuleA.py b/software/modules/ModuleA.py index 7889c6f..7c0a871 100644 --- a/software/modules/ModuleA.py +++ b/software/modules/ModuleA.py @@ -2,11 +2,10 @@ from module import Module class ModuleA(Module): - title = "Acko" + title = 'Acko' def setup(self, area): print 'setup A' - print area def run(self): print 'run A' diff --git a/software/modules/ModuleB.png b/software/modules/ModuleB.png deleted file mode 100644 index 494d785..0000000 Binary files a/software/modules/ModuleB.png and /dev/null differ diff --git a/software/modules/ModuleB.py b/software/modules/ModuleB.py deleted file mode 100644 index 002e84b..0000000 --- a/software/modules/ModuleB.py +++ /dev/null @@ -1,12 +0,0 @@ -from module import Module - -class ModuleB(Module): - - title = "Bcko" - - def setup(self, area): - print 'setup B' - print area - - def run(self): - print 'run B' diff --git a/software/modules/ModuleDebug.png b/software/modules/ModuleDebug.png new file mode 100644 index 0000000..14cc6a0 Binary files /dev/null and b/software/modules/ModuleDebug.png differ diff --git a/software/modules/ModuleDebug.py b/software/modules/ModuleDebug.py new file mode 100644 index 0000000..2c817be --- /dev/null +++ b/software/modules/ModuleDebug.py @@ -0,0 +1,14 @@ +from module import Module +from ModuleDebugUi import Ui_ModuleDebug + +class ModuleDebug(Module): + + title = 'Debug' + + def setup(self, area): + print 'setup Debug' + self.ui = Ui_ModuleDebug() + self.ui.setupUi(area) + + def run(self): + print 'run Debug' diff --git a/software/modules/ModuleDebug.ui b/software/modules/ModuleDebug.ui new file mode 100644 index 0000000..75fc5a9 --- /dev/null +++ b/software/modules/ModuleDebug.ui @@ -0,0 +1,29 @@ + + + ModuleDebug + + + + 0 + 0 + 781 + 531 + + + + Form + + + + + 10 + 10 + 761 + 511 + + + + + + + diff --git a/software/modules/__init__.py b/software/modules/__init__.py index 637b9f4..275a4fd 100644 --- a/software/modules/__init__.py +++ b/software/modules/__init__.py @@ -1,5 +1,5 @@ from ModuleA import ModuleA -from ModuleB import ModuleB +from ModuleDebug import ModuleDebug def list(): - return [ModuleA(),ModuleB()] + return [ModuleDebug(),ModuleA()] diff --git a/software/resources.qrc b/software/resources.qrc index 13d046b..3cefced 100644 --- a/software/resources.qrc +++ b/software/resources.qrc @@ -5,6 +5,6 @@ about.png icon.png modules/ModuleA.png - modules/ModuleB.png + modules/ModuleDebug.png