Mercurial > hg > Feedworm
comparison PreferencesDialog.py @ 43:12ed8b5fa08c
first system preference: configure app to stat maximized.
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Fri, 14 May 2010 08:31:46 +0200 |
parents | 0c0d1760b737 |
children | be990ac6e478 |
comparison
equal
deleted
inserted
replaced
42:0c0d1760b737 | 43:12ed8b5fa08c |
---|---|
1 | 1 |
2 from Preferences import Preferences | |
2 from PyQt4 import QtGui | 3 from PyQt4 import QtGui |
3 from Ui_Preferences import Ui_Preferences | 4 from Ui_Preferences import Ui_Preferences |
4 | 5 |
5 class PreferencesDialog(QtGui.QDialog): | 6 class PreferencesDialog(QtGui.QDialog): |
6 def __init__(self, session=None): | 7 def __init__(self, session=None): |
7 QtGui.QWidget.__init__(self, None) | 8 QtGui.QWidget.__init__(self, None) |
8 self.session = session | 9 self.session = session |
10 self.preferences = Preferences(session) | |
9 self.ui = Ui_Preferences() | 11 self.ui = Ui_Preferences() |
10 self.ui.setupUi(self) | 12 self.ui.setupUi(self) |
11 self.fillUi() | 13 self.fillUi() |
12 | 14 |
13 def fillUi(self): | 15 def fillUi(self): |
14 #self.ui.startMaximized.setChecked() | 16 maximized = self.preferences.startMaximized() |
15 pass | 17 self.ui.startMaximized.setChecked(maximized) |
16 | 18 |
17 def startMaximizedChanged(self, change): | 19 def startMaximizedChanged(self, change): |
18 print("start maximized: " + str(change)) | 20 print("start maximized: " + str(change)) |
19 | 21 |
20 def accept(self): | 22 def accept(self): |