# HG changeset patch # User Dirk Olmes # Date 1272414960 -7200 # Node ID 42a225be7e56153a76f000bf28dbc9d767b1104b # Parent 591ecc2a99bdc11e615f617bac75967443512518 first version of the GUI diff -r 591ecc2a99bd -r 42a225be7e56 .hgignore --- a/.hgignore Wed Apr 28 02:23:00 2010 +0200 +++ b/.hgignore Wed Apr 28 02:36:00 2010 +0200 @@ -1,2 +1,5 @@ syntax: glob *.pyc +Ui_*.py + +syntax: regexp diff -r 591ecc2a99bd -r 42a225be7e56 MainWindowController.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MainWindowController.py Wed Apr 28 02:36:00 2010 +0200 @@ -0,0 +1,10 @@ + +from Ui_MainWindow import Ui_MainWindow +from PyQt4 import QtGui + +class MainWindowController(QtGui.QMainWindow): + def __init__(self, session=None): + QtGui.QWidget.__init__(self, None) + self.session = session + self.ui = Ui_MainWindow() + self.ui.setupUi(self) diff -r 591ecc2a99bd -r 42a225be7e56 Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile Wed Apr 28 02:36:00 2010 +0200 @@ -0,0 +1,13 @@ + +# find all .ui files and generate corresponding filenames ending in .py +PY_FILES = $(patsubst %.ui, %.py, $(wildcard *.ui)) + +all: $(PY_FILES) + +%.py: %.ui + pyuic4 -o $@ $< + +.PHONY: clean +clean: + rm $(PY_FILES) + rm *.pyc diff -r 591ecc2a99bd -r 42a225be7e56 Ui_MainWindow.ui --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Ui_MainWindow.ui Wed Apr 28 02:36:00 2010 +0200 @@ -0,0 +1,63 @@ + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + Feedworm + + + + + + 0 + 0 + 800 + 27 + + + + + Feed + + + + + + + + + Quit + + + Ctrl+Q + + + + + + + actionQuit + activated() + MainWindow + close() + + + -1 + -1 + + + 399 + 299 + + + + + diff -r 591ecc2a99bd -r 42a225be7e56 feedupdate-main.py --- a/feedupdate-main.py Wed Apr 28 02:23:00 2010 +0200 +++ b/feedupdate-main.py Wed Apr 28 02:36:00 2010 +0200 @@ -1,9 +1,9 @@ #!/usr/bin/env python -from util import configureLogging, createSession from Feed import Feed from FeedUpdater import updateAllFeeds import logging +from util import configureLogging, createSession logger = logging.getLogger("feedupdater") diff -r 591ecc2a99bd -r 42a225be7e56 feedworm-gui.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/feedworm-gui.py Wed Apr 28 02:36:00 2010 +0200 @@ -0,0 +1,14 @@ + +from MainWindowController import MainWindowController +from PyQt4 import QtGui +import sys +from util import configureLogging, createSession + +if __name__ == '__main__': + configureLogging() + session = createSession() + + app = QtGui.QApplication(sys.argv) + mainWindowController = MainWindowController(session) + mainWindowController.show() + sys.exit(app.exec_())