annotate PreferencesDialog.py @ 42:0c0d1760b737

Rename Preferences to PreferencesDialog
author Dirk Olmes <dirk@xanthippe.ping.de>
date Fri, 14 May 2010 08:08:17 +0200
parents Preferences.py@9fa1e33b67da
children 12ed8b5fa08c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
40
c858aab71e5b add preferences dialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
1
c858aab71e5b add preferences dialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
2 from PyQt4 import QtGui
c858aab71e5b add preferences dialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
3 from Ui_Preferences import Ui_Preferences
c858aab71e5b add preferences dialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
4
42
0c0d1760b737 Rename Preferences to PreferencesDialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 41
diff changeset
5 class PreferencesDialog(QtGui.QDialog):
40
c858aab71e5b add preferences dialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
6 def __init__(self, session=None):
c858aab71e5b add preferences dialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
7 QtGui.QWidget.__init__(self, None)
c858aab71e5b add preferences dialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
8 self.session = session
c858aab71e5b add preferences dialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
9 self.ui = Ui_Preferences()
c858aab71e5b add preferences dialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
10 self.ui.setupUi(self)
42
0c0d1760b737 Rename Preferences to PreferencesDialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 41
diff changeset
11 self.fillUi()
0c0d1760b737 Rename Preferences to PreferencesDialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 41
diff changeset
12
0c0d1760b737 Rename Preferences to PreferencesDialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 41
diff changeset
13 def fillUi(self):
0c0d1760b737 Rename Preferences to PreferencesDialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 41
diff changeset
14 #self.ui.startMaximized.setChecked()
0c0d1760b737 Rename Preferences to PreferencesDialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 41
diff changeset
15 pass
40
c858aab71e5b add preferences dialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
16
c858aab71e5b add preferences dialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
17 def startMaximizedChanged(self, change):
c858aab71e5b add preferences dialog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
18 print("start maximized: " + str(change))
41
9fa1e33b67da use Qt resources for window icons
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 40
diff changeset
19
9fa1e33b67da use Qt resources for window icons
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 40
diff changeset
20 def accept(self):
9fa1e33b67da use Qt resources for window icons
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 40
diff changeset
21 # TODO save the session
9fa1e33b67da use Qt resources for window icons
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 40
diff changeset
22 QtGui.QDialog.accept(self)
9fa1e33b67da use Qt resources for window icons
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 40
diff changeset
23
9fa1e33b67da use Qt resources for window icons
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 40
diff changeset
24 def reject(self):
9fa1e33b67da use Qt resources for window icons
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 40
diff changeset
25 # TODO revert the session
9fa1e33b67da use Qt resources for window icons
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 40
diff changeset
26 QtGui.QDialog.reject(self)
9fa1e33b67da use Qt resources for window icons
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 40
diff changeset
27
9fa1e33b67da use Qt resources for window icons
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 40
diff changeset
28