SF.net SVN: fclient:[929] trunk/fclient/fclient/impl/ViewObject.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-08-16 10:57:03
|
Revision: 929
http://fclient.svn.sourceforge.net/fclient/?rev=929&view=rev
Author: jUrner
Date: 2008-08-16 10:57:13 +0000 (Sat, 16 Aug 2008)
Log Message:
-----------
redesign view objects
Added Paths:
-----------
trunk/fclient/fclient/impl/ViewObject.py
Added: trunk/fclient/fclient/impl/ViewObject.py
===================================================================
--- trunk/fclient/fclient/impl/ViewObject.py (rev 0)
+++ trunk/fclient/fclient/impl/ViewObject.py 2008-08-16 10:57:13 UTC (rev 929)
@@ -0,0 +1,57 @@
+# some fixes for relative imports
+# see --> [http://bugs.python.org/issue1510172] absolute/rellative import not working (works only current dir and below)
+# see --> [http://mail.python.org/pipermail/python-ideas/2007-February/000232.html] PEP for executing a module in a
+# ...package containing relative imports
+from __future__ import absolute_import
+if __name__ == '__main__':
+ import os
+ __path__ = [os.path.dirname(__file__)]
+
+from PyQt4 import QtCore
+
+from . import config
+#************************************************************************************
+#
+#************************************************************************************
+
+
+#************************************************************************************
+#
+#************************************************************************************
+class ViewObject(QtCore.QObject):
+ """base class for view objects"""
+
+
+ def __init__(self, parentView=None):
+ QtCore.QObject.__init__(self, parentView)
+ config.ObjectRegistry.register(self)
+
+ def close(self):
+ pass
+
+ def create(self):
+ pass
+
+ def displayName(self):
+ pass
+
+ def icon(self):
+ pass
+
+ def name(self):
+ return ''
+
+ def parentWidget(self):
+ parentView = self.parent()
+ if parentView is not None:
+ return parentView.widget()
+ return None
+
+ def prefsPage(self):
+ pass
+
+ def widget(self):
+ pass
+
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|