add QHaveSex new frontend
This commit is contained in:
parent
00f1982c18
commit
f97320e620
8 changed files with 229 additions and 0 deletions
25
scripts/qhavesex
Executable file
25
scripts/qhavesex
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.qhavesex import QHaveSex
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
QHaveSex.run()
|
||||
5
weboob/frontends/qhavesex/Makefile
Normal file
5
weboob/frontends/qhavesex/Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
all:
|
||||
$(MAKE) -C ui
|
||||
|
||||
clean:
|
||||
$(MAKE) -C ui clean
|
||||
1
weboob/frontends/qhavesex/__init__.py
Normal file
1
weboob/frontends/qhavesex/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
from .qhavesex import QHaveSex
|
||||
39
weboob/frontends/qhavesex/main_window.py
Normal file
39
weboob/frontends/qhavesex/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.dating import ICapDating
|
||||
|
||||
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, (ICapDating,), self)
|
||||
bckndcfg.show()
|
||||
34
weboob/frontends/qhavesex/qhavesex.py
Normal file
34
weboob/frontends/qhavesex/qhavesex.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.dating import ICapDating
|
||||
from weboob.tools.application import QtApplication
|
||||
|
||||
from .main_window import MainWindow
|
||||
|
||||
class QHaveSex(QtApplication):
|
||||
APPNAME = 'qhavesex'
|
||||
VERSION = '1.0'
|
||||
COPYRIGHT = 'Copyright(C) 2010 Romain Bignon'
|
||||
|
||||
def main(self, argv):
|
||||
self.load_backends(ICapDating)
|
||||
|
||||
self.main_window = MainWindow(self.config, self.weboob)
|
||||
self.main_window.show()
|
||||
return self.weboob.loop()
|
||||
13
weboob/frontends/qhavesex/ui/Makefile
Normal file
13
weboob/frontends/qhavesex/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/qhavesex/ui/__init__.py
Normal file
0
weboob/frontends/qhavesex/ui/__init__.py
Normal file
112
weboob/frontends/qhavesex/ui/main_window.ui
Normal file
112
weboob/frontends/qhavesex/ui/main_window.ui
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
<?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>QHaveSex</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="statusTab">
|
||||
<attribute name="title">
|
||||
<string>Status</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QWidget" name="messagesTab">
|
||||
<attribute name="title">
|
||||
<string>Messages</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QWidget" name="contactsTab">
|
||||
<attribute name="title">
|
||||
<string>Contacts</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QWidget" name="calendarTab">
|
||||
<attribute name="title">
|
||||
<string>Calendar</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</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