new frontend QBoobMsg
This commit is contained in:
parent
676d024da7
commit
b6cbd074b2
8 changed files with 201 additions and 0 deletions
25
scripts/qboobmsg
Executable file
25
scripts/qboobmsg
Executable file
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=python et softtabstop=4 cinoptions=4 shiftwidth=4 ts=4 ai
|
||||||
|
|
||||||
|
# Copyright(C) 2010 Romain Bignon
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, version 3 of the License.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
|
from weboob.frontends.qboobmsg import QBoobMsg
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
QBoobMsg.run()
|
||||||
5
weboob/frontends/qboobmsg/Makefile
Normal file
5
weboob/frontends/qboobmsg/Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
all:
|
||||||
|
$(MAKE) -C ui
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(MAKE) -C ui clean
|
||||||
1
weboob/frontends/qboobmsg/__init__.py
Normal file
1
weboob/frontends/qboobmsg/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
from .qboobmsg import QBoobMsg
|
||||||
39
weboob/frontends/qboobmsg/main_window.py
Normal file
39
weboob/frontends/qboobmsg/main_window.py
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Copyright(C) 2010 Romain Bignon
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, version 3 of the License.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
from PyQt4.QtCore import SIGNAL
|
||||||
|
|
||||||
|
from weboob.tools.application.qt import QtMainWindow
|
||||||
|
from weboob.tools.application.qt.backendcfg import BackendCfg
|
||||||
|
from weboob.capabilities.messages import ICapMessages
|
||||||
|
|
||||||
|
from .ui.main_window_ui import Ui_MainWindow
|
||||||
|
|
||||||
|
class MainWindow(QtMainWindow):
|
||||||
|
def __init__(self, config, weboob, parent=None):
|
||||||
|
QtMainWindow.__init__(self, parent)
|
||||||
|
self.ui = Ui_MainWindow()
|
||||||
|
self.ui.setupUi(self)
|
||||||
|
|
||||||
|
self.config = config
|
||||||
|
self.weboob = weboob
|
||||||
|
|
||||||
|
self.connect(self.ui.actionModules, SIGNAL("triggered()"), self.modulesConfig)
|
||||||
|
|
||||||
|
def modulesConfig(self):
|
||||||
|
bckndcfg = BackendCfg(self.weboob, (ICapMessages,), self)
|
||||||
|
bckndcfg.show()
|
||||||
34
weboob/frontends/qboobmsg/qboobmsg.py
Normal file
34
weboob/frontends/qboobmsg/qboobmsg.py
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Copyright(C) 2010 Romain Bignon
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, version 3 of the License.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
|
from weboob.capabilities.messages import ICapMessages
|
||||||
|
from weboob.tools.application import QtApplication
|
||||||
|
|
||||||
|
from .main_window import MainWindow
|
||||||
|
|
||||||
|
class QBoobMsg(QtApplication):
|
||||||
|
APPNAME = 'qboobmsg'
|
||||||
|
VERSION = '1.0'
|
||||||
|
COPYRIGHT = 'Copyright(C) 2010 Romain Bignon'
|
||||||
|
|
||||||
|
def main(self, argv):
|
||||||
|
self.load_backends(ICapMessages)
|
||||||
|
|
||||||
|
self.main_window = MainWindow(self.config, self.weboob)
|
||||||
|
self.main_window.show()
|
||||||
|
return self.weboob.loop()
|
||||||
13
weboob/frontends/qboobmsg/ui/Makefile
Normal file
13
weboob/frontends/qboobmsg/ui/Makefile
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
UI_FILES = $(wildcard *.ui)
|
||||||
|
UI_PY_FILES = $(UI_FILES:%.ui=%_ui.py)
|
||||||
|
PYUIC = pyuic4
|
||||||
|
|
||||||
|
all: $(UI_PY_FILES)
|
||||||
|
|
||||||
|
%_ui.py: %.ui
|
||||||
|
$(PYUIC) -o $@ $^
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.pyc
|
||||||
|
rm -f $(UI_PY_FILES)
|
||||||
|
|
||||||
0
weboob/frontends/qboobmsg/ui/__init__.py
Normal file
0
weboob/frontends/qboobmsg/ui/__init__.py
Normal file
84
weboob/frontends/qboobmsg/ui/main_window.ui
Normal file
84
weboob/frontends/qboobmsg/ui/main_window.ui
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
<?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>763</width>
|
||||||
|
<height>580</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>QBoobMsg</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="centralwidget">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout"/>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenuBar" name="menubar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>763</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<widget class="QMenu" name="menuFile">
|
||||||
|
<property name="title">
|
||||||
|
<string>File</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionModules"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
|
<addaction name="actionQuit"/>
|
||||||
|
</widget>
|
||||||
|
<addaction name="menuFile"/>
|
||||||
|
</widget>
|
||||||
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
|
<widget class="QToolBar" name="toolBar">
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>toolBar</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="toolBarArea">
|
||||||
|
<enum>TopToolBarArea</enum>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="toolBarBreak">
|
||||||
|
<bool>false</bool>
|
||||||
|
</attribute>
|
||||||
|
<addaction name="actionModules"/>
|
||||||
|
</widget>
|
||||||
|
<action name="actionModules">
|
||||||
|
<property name="text">
|
||||||
|
<string>Modules</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionQuit">
|
||||||
|
<property name="text">
|
||||||
|
<string>Quit</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Quit</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>actionQuit</sender>
|
||||||
|
<signal>triggered()</signal>
|
||||||
|
<receiver>MainWindow</receiver>
|
||||||
|
<slot>close()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>381</x>
|
||||||
|
<y>289</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue