diff --git a/scripts/qhavesex b/scripts/qhavesex new file mode 100755 index 0000000000000000000000000000000000000000..3cadf607b6776ad4b3c07bb587c6f5485df97980 --- /dev/null +++ b/scripts/qhavesex @@ -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() diff --git a/weboob/frontends/qhavesex/Makefile b/weboob/frontends/qhavesex/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..04c08812be91e4241c329054ab9ba1f0eff2da7c --- /dev/null +++ b/weboob/frontends/qhavesex/Makefile @@ -0,0 +1,5 @@ +all: + $(MAKE) -C ui + +clean: + $(MAKE) -C ui clean diff --git a/weboob/frontends/qhavesex/__init__.py b/weboob/frontends/qhavesex/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e55140d2bebd1cb1705497e1b5e1c0e9330724bf --- /dev/null +++ b/weboob/frontends/qhavesex/__init__.py @@ -0,0 +1 @@ +from .qhavesex import QHaveSex diff --git a/weboob/frontends/qhavesex/main_window.py b/weboob/frontends/qhavesex/main_window.py new file mode 100644 index 0000000000000000000000000000000000000000..fdf212b32f857d593b7df6b567d9a561015dae32 --- /dev/null +++ b/weboob/frontends/qhavesex/main_window.py @@ -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() diff --git a/weboob/frontends/qhavesex/qhavesex.py b/weboob/frontends/qhavesex/qhavesex.py new file mode 100644 index 0000000000000000000000000000000000000000..ea965cf4668426d5a6a493b34a0ee560363be649 --- /dev/null +++ b/weboob/frontends/qhavesex/qhavesex.py @@ -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() diff --git a/weboob/frontends/qhavesex/ui/Makefile b/weboob/frontends/qhavesex/ui/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..f0db5154cf49182632325b99b1c6d1875e938bff --- /dev/null +++ b/weboob/frontends/qhavesex/ui/Makefile @@ -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) + diff --git a/weboob/frontends/qhavesex/ui/__init__.py b/weboob/frontends/qhavesex/ui/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/weboob/frontends/qhavesex/ui/main_window.ui b/weboob/frontends/qhavesex/ui/main_window.ui new file mode 100644 index 0000000000000000000000000000000000000000..5029e8bbe954feba8765f9e9e79c3f9701e33816 --- /dev/null +++ b/weboob/frontends/qhavesex/ui/main_window.ui @@ -0,0 +1,112 @@ + + + MainWindow + + + + 0 + 0 + 763 + 580 + + + + QHaveSex + + + + + + + 0 + + + + Status + + + + + Messages + + + + + Contacts + + + + + Calendar + + + + + + + + + + 0 + 0 + 763 + 24 + + + + + File + + + + + + + + + + + toolBar + + + TopToolBarArea + + + false + + + + + + Modules + + + + + Quit + + + Quit + + + + + + + actionQuit + triggered() + MainWindow + close() + + + -1 + -1 + + + 381 + 289 + + + + +