SF.net SVN: fclient:[709] trunk/fclient/src/fclient/ Ui_DlgPropsBrowserObject.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-07-21 10:47:15
|
Revision: 709
http://fclient.svn.sourceforge.net/fclient/?rev=709&view=rev
Author: jUrner
Date: 2008-07-21 10:47:17 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
add props dialog for browser
Added Paths:
-----------
trunk/fclient/src/fclient/Ui_DlgPropsBrowserObject.py
Added: trunk/fclient/src/fclient/Ui_DlgPropsBrowserObject.py
===================================================================
--- trunk/fclient/src/fclient/Ui_DlgPropsBrowserObject.py (rev 0)
+++ trunk/fclient/src/fclient/Ui_DlgPropsBrowserObject.py 2008-07-21 10:47:17 UTC (rev 709)
@@ -0,0 +1,64 @@
+#*********************************************************************
+#TODO:
+# just a sketch so far
+#
+# x. layout labels
+# x. limits! compact urls, truncate text (...)
+#
+#
+#**********************************************************************
+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__)]
+
+
+from PyQt4 import QtGui
+
+from . import config
+
+from .tpls.Ui_DlgPropsBrowserObjectTpl import Ui_DlgPropsBrowserObject
+#**********************************************************************************
+#
+#**********************************************************************************
+class PropsBrowserObjectDlg(QtGui.QDialog, Ui_DlgPropsBrowserObject):
+
+ IdLabelType = 'labelType'
+ IdLabelTitle = 'labelTitle'
+ IdLabelName = 'labelName'
+ IdLabelLinkUrl = 'labelLinkUrl'
+ IdLabelImageUrl = 'labelImageUrl'
+
+
+ def __init__(self, parent, browser=None, hitTest=None):
+ QtGui.QDialog.__init__(self, parent)
+
+ self.setupUi(self)
+
+ if hitTest is not None:
+ self.labelTitle.setText(hitTest.linkTitle().toString())
+ self.labelName.setText(hitTest.linkText())
+
+ if not hitTest.linkUrl().isEmpty():
+ self.labelLinkUrl.setText(hitTest.linkUrl().toString())
+ if not hitTest.imageUrl().isEmpty():
+ self.labelImageUrl.setText(hitTest.imageUrl().toString())
+
+
+
+ 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)
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|