SF.net SVN: fclient:[779] trunk/fclient/src/fclient/impl
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-07-27 11:51:45
|
Revision: 779
http://fclient.svn.sourceforge.net/fclient/?rev=779&view=rev
Author: jUrner
Date: 2008-07-27 11:51:54 +0000 (Sun, 27 Jul 2008)
Log Message:
-----------
naming
Modified Paths:
--------------
trunk/fclient/src/fclient/impl/ViewBrowser.py
Added Paths:
-----------
trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py
Removed Paths:
-------------
trunk/fclient/src/fclient/impl/Ui_DlgPropsBrowserObject.py
Added: trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py
===================================================================
--- trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py (rev 0)
+++ trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py 2008-07-27 11:51:54 UTC (rev 779)
@@ -0,0 +1,69 @@
+#*********************************************************************
+#TODO:
+# just a sketch so far
+#
+# x. link and image url are not selectable
+#
+#
+#**********************************************************************
+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__)]
+
+import posixpath
+from PyQt4 import QtGui
+
+from . import config
+from .lib.compactpath.qt4 import pathlabelwrap
+from .lib.qt4ex.lib import tools as qtools
+
+from .tpls.Ui_DlgPropsBrowserObjectTpl import Ui_DlgPropsBrowserObject
+#**********************************************************************************
+#
+#**********************************************************************************
+class PropsBrowserObjectDlg(QtGui.QDialog, Ui_DlgPropsBrowserObject):
+
+ IdLabelType = 'labelType'
+ IdLabelTitle = 'labelTitle'
+ IdLabelName = 'labelName'
+ IdLabelLinkUrl = 'labelLinkUrl'
+ IdLabelImageUrl = 'labelImageUrl'
+
+ MaxText = 80
+
+ def __init__(self, parent, browser=None, hitTestResult=None):
+ QtGui.QDialog.__init__(self, parent)
+
+ self.setupUi(self)
+ self.setWindowTitle(config.FclientAppName + self.trUtf8(' - Properties'))
+
+ if hitTestResult is not None:
+
+ if not hitTestResult.linkUrl().isEmpty():
+ labelLinkUrl = self.controlById(self.IdLabelLinkUrl)
+ self.wrapLinkUrl = pathlabelwrap.PathLabelWrap(labelLinkUrl, path_module=config.CompactPathFcpKeyModule)
+ self.wrapLinkUrl.setPath(unicode(hitTestResult.linkUrl().toString()))
+ if not hitTestResult.imageUrl().isEmpty():
+ labelImageUrl = self.controlById(self.IdLabelImageUrl)
+ self.wrapImageUrl = pathlabelwrap.PathLabelWrap(labelImageUrl, path_module=config.CompactPathFcpKeyModule)
+ self.wrapImageUrl.setPath(unicode(hitTestResult.imageUrl().toString()))
+
+ ellipsis = self.trUtf8('..')
+ self.labelTitle.setText(qtools.truncateString(self.MaxText, hitTestResult.linkTitle().toString(), ellipsis))
+ self.labelTitle.setText(qtools.truncateString(self.MaxText, hitTestResult.linkText(), ellipsis))
+
+ def controlById(self, idControl):
+ return getattr(self, idControl)
+
+#**********************************************************************************
+#
+#**********************************************************************************
+if __name__ == '__main__':
+ import sys
+
+ app = QtGui.QApplication(sys.argv)
+ w = PropsBrowserObjectDlg(None)
+ w.show()
+ res = app.exec_()
+ sys.exit(res)
+
Deleted: trunk/fclient/src/fclient/impl/Ui_DlgPropsBrowserObject.py
===================================================================
--- trunk/fclient/src/fclient/impl/Ui_DlgPropsBrowserObject.py 2008-07-27 11:50:16 UTC (rev 778)
+++ trunk/fclient/src/fclient/impl/Ui_DlgPropsBrowserObject.py 2008-07-27 11:51:54 UTC (rev 779)
@@ -1,69 +0,0 @@
-#*********************************************************************
-#TODO:
-# just a sketch so far
-#
-# x. link and image url are not selectable
-#
-#
-#**********************************************************************
-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__)]
-
-import posixpath
-from PyQt4 import QtGui
-
-from . import config
-from .lib.compactpath.qt4 import pathlabelwrap
-from .lib.qt4ex.lib import tools as qtools
-
-from .tpls.Ui_DlgPropsBrowserObjectTpl import Ui_DlgPropsBrowserObject
-#**********************************************************************************
-#
-#**********************************************************************************
-class PropsBrowserObjectDlg(QtGui.QDialog, Ui_DlgPropsBrowserObject):
-
- IdLabelType = 'labelType'
- IdLabelTitle = 'labelTitle'
- IdLabelName = 'labelName'
- IdLabelLinkUrl = 'labelLinkUrl'
- IdLabelImageUrl = 'labelImageUrl'
-
- MaxText = 80
-
- def __init__(self, parent, browser=None, hitTestResult=None):
- QtGui.QDialog.__init__(self, parent)
-
- self.setupUi(self)
- self.setWindowTitle(config.FclientAppName + self.trUtf8(' - Properties'))
-
- if hitTestResult is not None:
-
- if not hitTestResult.linkUrl().isEmpty():
- labelLinkUrl = self.controlById(self.IdLabelLinkUrl)
- self.wrapLinkUrl = pathlabelwrap.PathLabelWrap(labelLinkUrl, path_module=config.CompactPathFcpKeyModule)
- self.wrapLinkUrl.setPath(unicode(hitTestResult.linkUrl().toString()))
- if not hitTestResult.imageUrl().isEmpty():
- labelImageUrl = self.controlById(self.IdLabelImageUrl)
- self.wrapImageUrl = pathlabelwrap.PathLabelWrap(labelImageUrl, path_module=config.CompactPathFcpKeyModule)
- self.wrapImageUrl.setPath(unicode(hitTestResult.imageUrl().toString()))
-
- ellipsis = self.trUtf8('..')
- self.labelTitle.setText(qtools.truncateString(self.MaxText, hitTestResult.linkTitle().toString(), ellipsis))
- self.labelTitle.setText(qtools.truncateString(self.MaxText, hitTestResult.linkText(), ellipsis))
-
- def controlById(self, idControl):
- return getattr(self, idControl)
-
-#**********************************************************************************
-#
-#**********************************************************************************
-if __name__ == '__main__':
- import sys
-
- app = QtGui.QApplication(sys.argv)
- w = PropsBrowserObjectDlg(None)
- w.show()
- res = app.exec_()
- sys.exit(res)
-
Modified: trunk/fclient/src/fclient/impl/ViewBrowser.py
===================================================================
--- trunk/fclient/src/fclient/impl/ViewBrowser.py 2008-07-27 11:50:16 UTC (rev 778)
+++ trunk/fclient/src/fclient/impl/ViewBrowser.py 2008-07-27 11:51:54 UTC (rev 779)
@@ -40,7 +40,7 @@
from .lib.qt4ex.lib import tools as qtools
from .lib.compactpath.qt4 import pathlabelwrap
-from . import Ui_DlgPropsBrowserObject
+from . import DlgPropsBrowserObject
from . import DlgDownloadKeyToDisk
from .tpls.Ui_ViewBrowserWidgetTpl import Ui_ViewBrowserWidget
#*****************************************************************************************
@@ -727,7 +727,7 @@
elif action == browser.pageAction(page.DownloadLinkToDisk):
self._downloadKeyToDisk(hitTestResult.linkUrl())
elif action == self.fcActions['ActionObjectProperties']:
- dlg = Ui_DlgPropsBrowserObject.PropsBrowserObjectDlg(self, hitTestResult=hitTestResult)
+ dlg = DlgPropsBrowserObject.PropsBrowserObjectDlg(self, hitTestResult=hitTestResult)
if dlg.exec_() == dlg.Accepted:
pass
@@ -974,7 +974,7 @@
#**********************************************************************************
if __name__ == '__main__':
import sys
- from .Ui_ViewLogger import ViewLoggerWidget
+ from .ViewLogger import ViewLoggerWidget
from .MainWindow import MainWindow
from .View import ViewWidget
from .ViewConnection import ViewConnectionWidget
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|