SF.net SVN: fclient: [573] trunk/fclient/src/fclient/Ui_View.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-07-11 16:33:15
|
Revision: 573
http://fclient.svn.sourceforge.net/fclient/?rev=573&view=rev
Author: jUrner
Date: 2008-07-11 09:33:24 -0700 (Fri, 11 Jul 2008)
Log Message:
-----------
too many changes to list
Modified Paths:
--------------
trunk/fclient/src/fclient/Ui_View.py
Modified: trunk/fclient/src/fclient/Ui_View.py
===================================================================
--- trunk/fclient/src/fclient/Ui_View.py 2008-07-11 16:32:57 UTC (rev 572)
+++ trunk/fclient/src/fclient/Ui_View.py 2008-07-11 16:33:24 UTC (rev 573)
@@ -1,4 +1,12 @@
-
+#FIXES
+#***************************************************************************
+# [0001]
+#
+# QTabWidget.closeEvent() does not seem to propagate close events
+# to child widgets
+#
+#
+#***************************************************************************
from __future__ import absolute_import
if __name__ == '__main__': # see --> http://bugs.python.org/issue1510172 . works only current dir and below
import os; __path__ = [os.path.dirname(__file__)]
@@ -9,17 +17,14 @@
from . import config
from .lib import fcp2
-from .lib.qt4ex import settingsbase
from .tpls.Ui_ViewWidgetTpl import Ui_ViewWidget
-
#**********************************************************************************
#
#**********************************************************************************
-class UserSettings(settingsbase.SettingsBase):
-
- KEY_SETTINGS = 'UserSettingsView'
- SETTINGS = [
- ]
+class Settings(config.SettingsBase):
+ _key_ = config.IdViewWidget
+ _settings_ = (
+ )
#***********************************************************************
#
@@ -31,15 +36,15 @@
- def __init__(self, parent, cfg=None):
+ def __init__(self, parent):
QtGui.QWidget.__init__(self, parent)
- self.cfg = config.Config(self) if cfg is None else cfg
- self.userSettings = UserSettings()
+ self.settings = Settings()
self.views = {}
self.setupUi(self)
config.ObjectRegistry.register(self)
+ self.settings.restore()
tabTop = self.controlById(self.IdTabTop)
tabTop.removeTab(0)
@@ -68,7 +73,10 @@
def setCurrentView(self, view):
index, tab, view = view
-
+ def closeEvent(self, event):
+ for i, tab, view in self.views.values():
+ view.close()
+
#**********************************************************************************
#
#**********************************************************************************
@@ -105,6 +113,9 @@
note: if the widget is not already created _now_ is the right time to create it
"""
raise NotImplemetedError()
+
+ def close(self):
+ """called when the view is about to be closed"""
#**********************************************************************************
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|