SF.net SVN: fclient:[926] trunk/fclient/fclient/impl/ViewLogger/ViewObject. py
Status: Pre-Alpha
Brought to you by:
jurner
From: <jU...@us...> - 2008-08-16 10:55:56
|
Revision: 926 http://fclient.svn.sourceforge.net/fclient/?rev=926&view=rev Author: jUrner Date: 2008-08-16 10:56:04 +0000 (Sat, 16 Aug 2008) Log Message: ----------- redesdigned view objects Added Paths: ----------- trunk/fclient/fclient/impl/ViewLogger/ViewObject.py Added: trunk/fclient/fclient/impl/ViewLogger/ViewObject.py =================================================================== --- trunk/fclient/fclient/impl/ViewLogger/ViewObject.py (rev 0) +++ trunk/fclient/fclient/impl/ViewLogger/ViewObject.py 2008-08-16 10:56:04 UTC (rev 926) @@ -0,0 +1,51 @@ +# 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 ._fix_mexec import fix_mexec + fix_mexec(__name__, __file__) + del fix_mexec + + +from PyQt4 import QtGui + +from .. import config +from .. import ViewObject + +from . import ViewLogger +#************************************************************************************ +# +#************************************************************************************ +class ViewObjectLogger(ViewObject.ViewObject): + + def __init__(self, parentView=None): + ViewObject.ViewObject.__init__(self, parentView) + self._widget = None + + def close(self): + pass + + def create(self): + self._widget = ViewLogger.ViewLoggerWidget(self.parentWidget()) + return self.widget() + + def displayName(self): + return self.trUtf8('Logger') + + def icon(self): + return QtGui.QIcon() + + def name(self): + return config.IdViewObjectLogger + + def prefsPage(self): + pass + + + def widget(self): + return self._widget + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |