mirror of
https://github.com/brmlab/edubrm.git
synced 2025-06-09 05:14:01 +02:00
start writing debugmodule
This commit is contained in:
parent
e809984eb2
commit
4b73d98c11
12 changed files with 58 additions and 24 deletions
2
software/.gitignore
vendored
2
software/.gitignore
vendored
|
@ -1,3 +1,3 @@
|
||||||
*.pyc
|
*.pyc
|
||||||
mainUi.py
|
*Ui.py
|
||||||
resources_rc.py
|
resources_rc.py
|
||||||
|
|
|
@ -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
|
mainUi.py: main.ui
|
||||||
pyuic4 main.ui -o mainUi.py
|
pyuic4 $< -o $@
|
||||||
|
|
||||||
resources_rc.py:
|
resources_rc.py: resources.qrc
|
||||||
pyrcc4 resources.qrc -o resources_rc.py
|
pyrcc4 $< -o $@
|
||||||
|
|
||||||
|
modules/ModuleDebugUi.py: modules/ModuleDebug.ui
|
||||||
|
pyuic4 $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.pyc modules/*.pyc mainUi.py resources_rc.py
|
rm -f *.pyc *Ui.py modules/*.pyc modules/*Ui.py resources_rc.py
|
||||||
|
|
|
@ -22,7 +22,7 @@ class ModuleButton(QPushButton):
|
||||||
self.form.ui.btnExit.hide()
|
self.form.ui.btnExit.hide()
|
||||||
self.form.ui.btnBack.show()
|
self.form.ui.btnBack.show()
|
||||||
self.form.ui.lblTitle.setText(self.mod.title)
|
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):
|
class Main(QMainWindow):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
1
software/modules/.gitignore
vendored
1
software/modules/.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
*.pyc
|
*.pyc
|
||||||
|
*Ui.py
|
||||||
|
|
|
@ -2,11 +2,10 @@ from module import Module
|
||||||
|
|
||||||
class ModuleA(Module):
|
class ModuleA(Module):
|
||||||
|
|
||||||
title = "Acko"
|
title = 'Acko'
|
||||||
|
|
||||||
def setup(self, area):
|
def setup(self, area):
|
||||||
print 'setup A'
|
print 'setup A'
|
||||||
print area
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
print 'run A'
|
print 'run A'
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.5 KiB |
|
@ -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'
|
|
BIN
software/modules/ModuleDebug.png
Normal file
BIN
software/modules/ModuleDebug.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
14
software/modules/ModuleDebug.py
Normal file
14
software/modules/ModuleDebug.py
Normal file
|
@ -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'
|
29
software/modules/ModuleDebug.ui
Normal file
29
software/modules/ModuleDebug.ui
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>ModuleDebug</class>
|
||||||
|
<widget class="QWidget" name="ModuleDebug">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>781</width>
|
||||||
|
<height>531</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QCalendarWidget" name="calendarWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>761</width>
|
||||||
|
<height>511</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
|
@ -1,5 +1,5 @@
|
||||||
from ModuleA import ModuleA
|
from ModuleA import ModuleA
|
||||||
from ModuleB import ModuleB
|
from ModuleDebug import ModuleDebug
|
||||||
|
|
||||||
def list():
|
def list():
|
||||||
return [ModuleA(),ModuleB()]
|
return [ModuleDebug(),ModuleA()]
|
||||||
|
|
|
@ -5,6 +5,6 @@
|
||||||
<file>about.png</file>
|
<file>about.png</file>
|
||||||
<file>icon.png</file>
|
<file>icon.png</file>
|
||||||
<file>modules/ModuleA.png</file>
|
<file>modules/ModuleA.png</file>
|
||||||
<file>modules/ModuleB.png</file>
|
<file>modules/ModuleDebug.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue