mirror of
https://github.com/brmlab/edubrm.git
synced 2025-06-08 04:43:59 +02:00
init
This commit is contained in:
commit
4937dbfde4
13 changed files with 169 additions and 0 deletions
10
software/Makefile
Normal file
10
software/Makefile
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
all: edubrm mainUi.py resources.py
|
||||||
|
|
||||||
|
mainUi.py: main.ui
|
||||||
|
pyuic4 main.ui -o mainUi.py
|
||||||
|
|
||||||
|
resources.py:
|
||||||
|
pyrcc4 resources.qrc -o resources_rc.py
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.pyc modules/*.pyc mainUi.py resources_rc.py
|
9
software/README
Normal file
9
software/README
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
EduBRM by Hackerspace brmlab
|
||||||
|
============================
|
||||||
|
|
||||||
|
http://brmlab.cz/
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Tomislav "sargon" Arnaudov
|
||||||
|
Pavol "stick" Rusnak
|
BIN
software/about.png
Normal file
BIN
software/about.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 863 B |
10
software/edubrm
Executable file
10
software/edubrm
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from PyQt4.QtGui import QApplication
|
||||||
|
from main import Main
|
||||||
|
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
window = Main()
|
||||||
|
window.show()
|
||||||
|
sys.exit(app.exec_())
|
BIN
software/exit.png
Normal file
BIN
software/exit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 799 B |
BIN
software/icon.png
Normal file
BIN
software/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
23
software/main.py
Normal file
23
software/main.py
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
from PyQt4.QtCore import pyqtSlot
|
||||||
|
from PyQt4.QtGui import QMainWindow
|
||||||
|
from PyQt4.QtGui import QMessageBox
|
||||||
|
from PyQt4.QtGui import QPixmap
|
||||||
|
from mainUi import Ui_MainWindow
|
||||||
|
|
||||||
|
class Main(QMainWindow):
|
||||||
|
def __init__(self):
|
||||||
|
QMainWindow.__init__(self)
|
||||||
|
self.ui = Ui_MainWindow()
|
||||||
|
self.ui.setupUi(self)
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def on_actionExit_triggered(self):
|
||||||
|
self.close()
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def on_actionAbout_triggered(self):
|
||||||
|
box = QMessageBox(QMessageBox.NoIcon, "About EduBRM", "EduBRM by Hackerspace brmlab\n\nhttp://brmlab.cz/\n\nSee README for more information.", QMessageBox.Ok)
|
||||||
|
box.setIconPixmap(QPixmap( ":/icons/icon.png"))
|
||||||
|
box.exec_()
|
83
software/main.ui
Normal file
83
software/main.ui
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>MainWindow</class>
|
||||||
|
<widget class="QMainWindow" name="MainWindow">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>600</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>EduBRM</string>
|
||||||
|
</property>
|
||||||
|
<property name="windowIcon">
|
||||||
|
<iconset resource="resources.qrc">
|
||||||
|
<normaloff>:/icons/icon.png</normaloff>:/icons/icon.png</iconset>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="centralwidget">
|
||||||
|
<widget class="QLabel" name="txtDesc">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>501</width>
|
||||||
|
<height>201</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenuBar" name="menubar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>22</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<widget class="QMenu" name="menu_File">
|
||||||
|
<property name="title">
|
||||||
|
<string>&File</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionExit"/>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenu" name="menu_Help">
|
||||||
|
<property name="title">
|
||||||
|
<string>&Help</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionAbout"/>
|
||||||
|
</widget>
|
||||||
|
<addaction name="menu_File"/>
|
||||||
|
<addaction name="menu_Help"/>
|
||||||
|
</widget>
|
||||||
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
|
<action name="actionAbout">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="resources.qrc">
|
||||||
|
<normaloff>:/icons/about.png</normaloff>:/icons/about.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&About ...</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionExit">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="resources.qrc">
|
||||||
|
<normaloff>:/icons/exit.png</normaloff>:/icons/exit.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>E&xit</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
</widget>
|
||||||
|
<resources>
|
||||||
|
<include location="resources.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
8
software/modules/ModuleA.py
Normal file
8
software/modules/ModuleA.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
from module import Module
|
||||||
|
|
||||||
|
class ModuleA(Module):
|
||||||
|
|
||||||
|
group = "Acko"
|
||||||
|
title = "Acko"
|
||||||
|
board = 1
|
||||||
|
desc = "Toto je Acko"
|
8
software/modules/ModuleB.py
Normal file
8
software/modules/ModuleB.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
from module import Module
|
||||||
|
|
||||||
|
class ModuleB(Module):
|
||||||
|
|
||||||
|
group = "Bcko"
|
||||||
|
title = "Bcko"
|
||||||
|
board = 1
|
||||||
|
desc = "Toto je Bcko"
|
5
software/modules/__init__.py
Normal file
5
software/modules/__init__.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
from ModuleA import ModuleA
|
||||||
|
from ModuleB import ModuleB
|
||||||
|
|
||||||
|
def list():
|
||||||
|
return [ModuleA(),ModuleB()]
|
6
software/modules/module.py
Normal file
6
software/modules/module.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
class Module():
|
||||||
|
|
||||||
|
group = ""
|
||||||
|
title = ""
|
||||||
|
board = 1
|
||||||
|
desc = ""
|
7
software/resources.qrc
Normal file
7
software/resources.qrc
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<RCC>
|
||||||
|
<qresource prefix="icons">
|
||||||
|
<file>exit.png</file>
|
||||||
|
<file>about.png</file>
|
||||||
|
<file>icon.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
Loading…
Add table
Add a link
Reference in a new issue