Thread: SF.net SVN: fclient:[773] trunk/fclient/src/fclient/impl
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-07-27 11:40:27
|
Revision: 773
http://fclient.svn.sourceforge.net/fclient/?rev=773&view=rev
Author: jUrner
Date: 2008-07-27 11:40:36 +0000 (Sun, 27 Jul 2008)
Log Message:
-----------
naming
Added Paths:
-----------
trunk/fclient/src/fclient/impl/PrefsBrowserWidget.py
trunk/fclient/src/fclient/impl/PrefsGlobal.py
Removed Paths:
-------------
trunk/fclient/src/fclient/impl/tpls/Ui_PrefsBrowserWidgetTpl.py
trunk/fclient/src/fclient/impl/tpls/Ui_PrefsGlobalWidgetTpl.py
Added: trunk/fclient/src/fclient/impl/PrefsBrowserWidget.py
===================================================================
--- trunk/fclient/src/fclient/impl/PrefsBrowserWidget.py (rev 0)
+++ trunk/fclient/src/fclient/impl/PrefsBrowserWidget.py 2008-07-27 11:40:36 UTC (rev 773)
@@ -0,0 +1,113 @@
+
+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 QtCore, QtGui
+
+from . import config
+from .lib.qt4ex import dlgpreferences
+
+from .tpls.Ui_PrefsBrowserWidgetTpl import Ui_PrefsBrowserWidget
+#**********************************************************************************
+#
+#**********************************************************************************
+class PrefsBrowserWidget(QtGui.QWidget, Ui_PrefsBrowserWidget):
+
+ IdEdHomePage = 'edHomePage'
+ IdCkOpenAddressBarInNewTab = 'ckOpenAddressBarInNewTab'
+ IdCkOpenBookmarksInNewTab = 'ckOpenBookmarksInNewTab'
+ IdCkOpenLinksInNewTab = 'ckOpenLinksInNewTab'
+ IdCkOpenHomePageOnNewTabCreated = 'ckOpenHomePageOnNewTabCreated'
+ IdCkBackIsClose = 'ckBackIsClose'
+ IdCkAutoLoadImages = 'ckAutoLoadImages'
+
+ def __init__(self, parent):
+ QtGui.QWidget.__init__(self, parent)
+ self.setupUi(self)
+
+ browser = config.ObjectRegistry.get(config.IdViewBrowserWidget, None)
+ self.setEnabled(browser is not None)
+ if browser is not None:
+ self.controlById(self.IdEdHomePage).setText(browser.fcSettings.value('HomePage'))
+ ck = self.controlById(self.IdCkOpenAddressBarInNewTab)
+ ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('OpenAddressBarInNewTab') else QtCore.Qt.Unchecked)
+ ck = self.controlById(self.IdCkOpenBookmarksInNewTab)
+ ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('OpenBookmarksInNewTab') else QtCore.Qt.Unchecked)
+ ck = self.controlById(self.IdCkOpenLinksInNewTab)
+ ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('OpenLinksInNewTab') else QtCore.Qt.Unchecked)
+ ck = self.controlById(self.IdCkOpenHomePageOnNewTabCreated)
+ ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('OpenHomePageOnNewTabCreated') else QtCore.Qt.Unchecked)
+ ck = self.controlById(self.IdCkBackIsClose)
+ ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('BackIsClose') else QtCore.Qt.Unchecked)
+ ck = self.controlById(self.IdCkAutoLoadImages)
+ ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('AutoLoadImages') else QtCore.Qt.Unchecked)
+
+ def controlById(self, idControl):
+ return getattr(self, idControl)
+
+ def apply(self):
+ browser = config.ObjectRegistry.get(config.IdViewBrowserWidget, None)
+ if browser is not None:
+ edHomePage = self.controlById(self.IdEdHomePage)
+
+ browser.fcSettings.setValues(
+ HomePage=edHomePage.text(),
+ OpenAddressBarInNewTab=self.controlById(self.IdCkOpenAddressBarInNewTab).checkState() == QtCore.Qt.Checked,
+ OpenBookmarksInNewTab=self.controlById(self.IdCkOpenBookmarksInNewTab).checkState() == QtCore.Qt.Checked,
+ OpenLinksInNewTab=self.controlById(self.IdCkOpenLinksInNewTab).checkState() == QtCore.Qt.Checked,
+ OpenHomePageOnNewTabCreated=self.controlById(self.IdCkOpenHomePageOnNewTabCreated).checkState() == QtCore.Qt.Checked,
+ BackIsClose=self.controlById(self.IdCkBackIsClose).checkState() == QtCore.Qt.Checked,
+ AutoLoadImages=self.controlById(self.IdCkAutoLoadImages).checkState() == QtCore.Qt.Checked,
+ )
+
+
+#***********************************************************************
+#
+#***********************************************************************
+class PrefsPageBrowser(dlgpreferences.Page):
+
+ UUID = '{c85e63a8-6806-435a-81ce-f4b46872246f}'
+
+ def __init__(self):
+ dlgpreferences.Page.__init__(self, self.UUID)
+ self._widget = None
+ self.setDirty(True)
+
+ def displayName(self):
+ return self.trUtf8('Browser')
+
+ def canApply(self): return True
+ def canHelp(self): return True
+
+ def setVisible(self, parent, flag):
+ createdNew = False
+ if flag and self._widget is None:
+ createdNew = True
+ self._widget = PrefsBrowserWidget(parent)
+ self._widget.setVisible(flag)
+ return (createdNew, self._widget)
+
+
+ def doApply(self):
+ self._widget.apply()
+ return True
+
+ def doOk(self):
+ return True
+
+
+#***********************************************************************
+#
+#***********************************************************************
+if __name__ == '__main__':
+ from PyQt4 import QtGui
+ import sys
+
+ app = QtGui.QApplication(sys.argv)
+ w = PrefsBrowserWidget(None)
+ w.show()
+ res = app.exec_()
+ sys.exit(res)
+
Added: trunk/fclient/src/fclient/impl/PrefsGlobal.py
===================================================================
--- trunk/fclient/src/fclient/impl/PrefsGlobal.py (rev 0)
+++ trunk/fclient/src/fclient/impl/PrefsGlobal.py 2008-07-27 11:40:36 UTC (rev 773)
@@ -0,0 +1,62 @@
+
+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 .lib.qt4ex import dlgpreferences
+
+from .tpls.Ui_PrefsGlobalWidgetTpl import Ui_PrefsGlobalWidget
+#**********************************************************************************
+#
+#**********************************************************************************
+class PrefsGlobalWidget(QtGui.QWidget, Ui_PrefsGlobalWidget):
+
+ def __init__(self, parent):
+ QtGui.QWidget.__init__(self, parent)
+ self.setupUi(self)
+
+#***********************************************************************
+#
+#***********************************************************************
+class PrefsPageGlobal(dlgpreferences.Page):
+
+ UUID = '{ba654bd8-4c63-11dd-b8b1-a11c9b5c3981}'
+
+ def __init__(self):
+ dlgpreferences.Page.__init__(self, self.UUID)
+ self._widget = None
+ self.setDirty(True)
+
+ def displayName(self):
+ return self.trUtf8('Global')
+
+ def canApply(self): return True
+ def canHelp(self): return True
+
+ def setVisible(self, parent, flag):
+ createdNew = False
+ if flag and self._widget is None:
+ createdNew = True
+ self._widget = PrefsGlobalWidget(parent)
+ self._widget.setVisible(flag)
+ return (createdNew, self._widget)
+
+
+
+#***********************************************************************
+#
+#***********************************************************************
+if __name__ == '__main__':
+ from PyQt4 import QtGui
+ import sys
+
+ app = QtGui.QApplication(sys.argv)
+ w = PrefsGlobalWidget(None)
+ w.show()
+ res = app.exec_()
+ sys.exit(res)
+
Deleted: trunk/fclient/src/fclient/impl/tpls/Ui_PrefsBrowserWidgetTpl.py
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/Ui_PrefsBrowserWidgetTpl.py 2008-07-27 11:37:58 UTC (rev 772)
+++ trunk/fclient/src/fclient/impl/tpls/Ui_PrefsBrowserWidgetTpl.py 2008-07-27 11:40:36 UTC (rev 773)
@@ -1,96 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Form implementation generated from reading ui file '/home/me/src/proj/fclient/trunk/fclient/src/fclient/tpls/PrefsBrowserWidgetTpl.ui'
-#
-# Created: Fri Jul 25 10:02:49 2008
-# by: PyQt4 UI code generator 4.4.3-snapshot-20080705
-#
-# WARNING! All changes made in this file will be lost!
-
-from PyQt4 import QtCore, QtGui
-
-class Ui_PrefsBrowserWidget(object):
- def setupUi(self, PrefsBrowserWidget):
- PrefsBrowserWidget.setObjectName("PrefsBrowserWidget")
- PrefsBrowserWidget.resize(532, 186)
- self.gridLayout_3 = QtGui.QGridLayout(PrefsBrowserWidget)
- self.gridLayout_3.setObjectName("gridLayout_3")
- self.horizontalLayout_2 = QtGui.QHBoxLayout()
- self.horizontalLayout_2.setObjectName("horizontalLayout_2")
- self.label = QtGui.QLabel(PrefsBrowserWidget)
- self.label.setObjectName("label")
- self.horizontalLayout_2.addWidget(self.label)
- self.edHomePage = QtGui.QLineEdit(PrefsBrowserWidget)
- self.edHomePage.setDragEnabled(True)
- self.edHomePage.setObjectName("edHomePage")
- self.horizontalLayout_2.addWidget(self.edHomePage)
- self.gridLayout_3.addLayout(self.horizontalLayout_2, 0, 0, 1, 1)
- self.horizontalLayout = QtGui.QHBoxLayout()
- self.horizontalLayout.setObjectName("horizontalLayout")
- self.groupBox = QtGui.QGroupBox(PrefsBrowserWidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
- self.groupBox.setSizePolicy(sizePolicy)
- self.groupBox.setObjectName("groupBox")
- self.gridLayout = QtGui.QGridLayout(self.groupBox)
- self.gridLayout.setObjectName("gridLayout")
- self.ckOpenLinksInNewTab = QtGui.QCheckBox(self.groupBox)
- self.ckOpenLinksInNewTab.setObjectName("ckOpenLinksInNewTab")
- self.gridLayout.addWidget(self.ckOpenLinksInNewTab, 0, 0, 1, 1)
- self.ckOpenBookmarksInNewTab = QtGui.QCheckBox(self.groupBox)
- self.ckOpenBookmarksInNewTab.setObjectName("ckOpenBookmarksInNewTab")
- self.gridLayout.addWidget(self.ckOpenBookmarksInNewTab, 4, 0, 1, 1)
- self.ckOpenAddressBarInNewTab = QtGui.QCheckBox(self.groupBox)
- self.ckOpenAddressBarInNewTab.setObjectName("ckOpenAddressBarInNewTab")
- self.gridLayout.addWidget(self.ckOpenAddressBarInNewTab, 1, 0, 1, 1)
- self.horizontalLayout.addWidget(self.groupBox)
- self.groupBox_2 = QtGui.QGroupBox(PrefsBrowserWidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
- self.groupBox_2.setSizePolicy(sizePolicy)
- self.groupBox_2.setObjectName("groupBox_2")
- self.gridLayout_2 = QtGui.QGridLayout(self.groupBox_2)
- self.gridLayout_2.setObjectName("gridLayout_2")
- self.ckOpenHomePageOnNewTabCreated = QtGui.QCheckBox(self.groupBox_2)
- self.ckOpenHomePageOnNewTabCreated.setObjectName("ckOpenHomePageOnNewTabCreated")
- self.gridLayout_2.addWidget(self.ckOpenHomePageOnNewTabCreated, 0, 0, 1, 1)
- self.ckBackIsClose = QtGui.QCheckBox(self.groupBox_2)
- self.ckBackIsClose.setObjectName("ckBackIsClose")
- self.gridLayout_2.addWidget(self.ckBackIsClose, 1, 0, 1, 1)
- self.ckAutoLoadImages = QtGui.QCheckBox(self.groupBox_2)
- self.ckAutoLoadImages.setObjectName("ckAutoLoadImages")
- self.gridLayout_2.addWidget(self.ckAutoLoadImages, 2, 0, 1, 1)
- self.horizontalLayout.addWidget(self.groupBox_2)
- self.gridLayout_3.addLayout(self.horizontalLayout, 1, 0, 1, 1)
- spacerItem = QtGui.QSpacerItem(20, 297, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridLayout_3.addItem(spacerItem, 2, 0, 1, 1)
-
- self.retranslateUi(PrefsBrowserWidget)
- QtCore.QMetaObject.connectSlotsByName(PrefsBrowserWidget)
-
- def retranslateUi(self, PrefsBrowserWidget):
- PrefsBrowserWidget.setWindowTitle(QtGui.QApplication.translate("PrefsBrowserWidget", "Form", None, QtGui.QApplication.UnicodeUTF8))
- self.label.setText(QtGui.QApplication.translate("PrefsBrowserWidget", "Homepage:", None, QtGui.QApplication.UnicodeUTF8))
- self.groupBox.setTitle(QtGui.QApplication.translate("PrefsBrowserWidget", "Open in new tab", None, QtGui.QApplication.UnicodeUTF8))
- self.ckOpenLinksInNewTab.setText(QtGui.QApplication.translate("PrefsBrowserWidget", "Links", None, QtGui.QApplication.UnicodeUTF8))
- self.ckOpenBookmarksInNewTab.setText(QtGui.QApplication.translate("PrefsBrowserWidget", "Bookmarks", None, QtGui.QApplication.UnicodeUTF8))
- self.ckOpenAddressBarInNewTab.setText(QtGui.QApplication.translate("PrefsBrowserWidget", "Address bar", None, QtGui.QApplication.UnicodeUTF8))
- self.groupBox_2.setTitle(QtGui.QApplication.translate("PrefsBrowserWidget", "Others", None, QtGui.QApplication.UnicodeUTF8))
- self.ckOpenHomePageOnNewTabCreated.setText(QtGui.QApplication.translate("PrefsBrowserWidget", "Open home page when a new tab is created", None, QtGui.QApplication.UnicodeUTF8))
- self.ckBackIsClose.setText(QtGui.QApplication.translate("PrefsBrowserWidget", "Back is close", None, QtGui.QApplication.UnicodeUTF8))
- self.ckAutoLoadImages.setText(QtGui.QApplication.translate("PrefsBrowserWidget", "Auto load images", None, QtGui.QApplication.UnicodeUTF8))
-
-
-if __name__ == "__main__":
- import sys
- app = QtGui.QApplication(sys.argv)
- PrefsBrowserWidget = QtGui.QWidget()
- ui = Ui_PrefsBrowserWidget()
- ui.setupUi(PrefsBrowserWidget)
- PrefsBrowserWidget.show()
- sys.exit(app.exec_())
-
Deleted: trunk/fclient/src/fclient/impl/tpls/Ui_PrefsGlobalWidgetTpl.py
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/Ui_PrefsGlobalWidgetTpl.py 2008-07-27 11:37:58 UTC (rev 772)
+++ trunk/fclient/src/fclient/impl/tpls/Ui_PrefsGlobalWidgetTpl.py 2008-07-27 11:40:36 UTC (rev 773)
@@ -1,61 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Form implementation generated from reading ui file '/home/me/src/proj/fclient/trunk/fclient/src/fclient/tpls/PrefsGlobalWidgetTpl.ui'
-#
-# Created: Tue Jul 8 17:51:29 2008
-# by: PyQt4 UI code generator 4.3.3
-#
-# WARNING! All changes made in this file will be lost!
-
-from PyQt4 import QtCore, QtGui
-
-class Ui_PrefsGlobalWidget(object):
- def setupUi(self, PrefsGlobalWidget):
- PrefsGlobalWidget.setObjectName("PrefsGlobalWidget")
- PrefsGlobalWidget.resize(QtCore.QSize(QtCore.QRect(0,0,465,247).size()).expandedTo(PrefsGlobalWidget.minimumSizeHint()))
-
- self.gridlayout = QtGui.QGridLayout(PrefsGlobalWidget)
- self.gridlayout.setObjectName("gridlayout")
-
- self.label = QtGui.QLabel(PrefsGlobalWidget)
- self.label.setWordWrap(True)
- self.label.setObjectName("label")
- self.gridlayout.addWidget(self.label,0,0,1,1)
-
- self.hboxlayout = QtGui.QHBoxLayout()
- self.hboxlayout.setObjectName("hboxlayout")
-
- self.ckStoreSettingsLocally = QtGui.QCheckBox(PrefsGlobalWidget)
- self.ckStoreSettingsLocally.setObjectName("ckStoreSettingsLocally")
- self.hboxlayout.addWidget(self.ckStoreSettingsLocally)
-
- self.edStoreSettingsLocally = QtGui.QLineEdit(PrefsGlobalWidget)
- self.edStoreSettingsLocally.setObjectName("edStoreSettingsLocally")
- self.hboxlayout.addWidget(self.edStoreSettingsLocally)
-
- self.btStoreSettingsLocally = QtGui.QPushButton(PrefsGlobalWidget)
- self.btStoreSettingsLocally.setObjectName("btStoreSettingsLocally")
- self.hboxlayout.addWidget(self.btStoreSettingsLocally)
- self.gridlayout.addLayout(self.hboxlayout,1,0,1,1)
-
- spacerItem = QtGui.QSpacerItem(20,40,QtGui.QSizePolicy.Minimum,QtGui.QSizePolicy.Expanding)
- self.gridlayout.addItem(spacerItem,2,0,1,1)
-
- self.retranslateUi(PrefsGlobalWidget)
- QtCore.QMetaObject.connectSlotsByName(PrefsGlobalWidget)
-
- def retranslateUi(self, PrefsGlobalWidget):
- PrefsGlobalWidget.setWindowTitle(QtGui.QApplication.translate("PrefsGlobalWidget", "Form", None, QtGui.QApplication.UnicodeUTF8))
- self.label.setText(QtGui.QApplication.translate("PrefsGlobalWidget", "Specify directory to store settings to. If unchecked, settings are stored in an os dependend location.", None, QtGui.QApplication.UnicodeUTF8))
- self.btStoreSettingsLocally.setText(QtGui.QApplication.translate("PrefsGlobalWidget", "...", None, QtGui.QApplication.UnicodeUTF8))
-
-
-
-if __name__ == "__main__":
- import sys
- app = QtGui.QApplication(sys.argv)
- PrefsGlobalWidget = QtGui.QWidget()
- ui = Ui_PrefsGlobalWidget()
- ui.setupUi(PrefsGlobalWidget)
- PrefsGlobalWidget.show()
- sys.exit(app.exec_())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jU...@us...> - 2008-07-27 11:42:38
|
Revision: 775
http://fclient.svn.sourceforge.net/fclient/?rev=775&view=rev
Author: jUrner
Date: 2008-07-27 11:42:47 +0000 (Sun, 27 Jul 2008)
Log Message:
-----------
naming
Modified Paths:
--------------
trunk/fclient/src/fclient/impl/Ui_Prefs.py
Removed Paths:
-------------
trunk/fclient/src/fclient/impl/Ui_PrefsBrowserWidget.py
trunk/fclient/src/fclient/impl/Ui_PrefsGlobal.py
Modified: trunk/fclient/src/fclient/impl/Ui_Prefs.py
===================================================================
--- trunk/fclient/src/fclient/impl/Ui_Prefs.py 2008-07-27 11:42:16 UTC (rev 774)
+++ trunk/fclient/src/fclient/impl/Ui_Prefs.py 2008-07-27 11:42:47 UTC (rev 775)
@@ -7,8 +7,8 @@
from . import config
from .lib.qt4ex import dlgpreferences
-from .Ui_PrefsGlobal import PrefsPageGlobal
-from .Ui_PrefsBrowserWidget import PrefsPageBrowser
+from .PrefsGlobal import PrefsPageGlobal
+from .PrefsBrowserWidget import PrefsPageBrowser
#**********************************************************************************
#
#**********************************************************************************
Deleted: trunk/fclient/src/fclient/impl/Ui_PrefsBrowserWidget.py
===================================================================
--- trunk/fclient/src/fclient/impl/Ui_PrefsBrowserWidget.py 2008-07-27 11:42:16 UTC (rev 774)
+++ trunk/fclient/src/fclient/impl/Ui_PrefsBrowserWidget.py 2008-07-27 11:42:47 UTC (rev 775)
@@ -1,113 +0,0 @@
-
-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 QtCore, QtGui
-
-from . import config
-from .lib.qt4ex import dlgpreferences
-
-from .tpls.Ui_PrefsBrowserWidgetTpl import Ui_PrefsBrowserWidget
-#**********************************************************************************
-#
-#**********************************************************************************
-class PrefsBrowserWidget(QtGui.QWidget, Ui_PrefsBrowserWidget):
-
- IdEdHomePage = 'edHomePage'
- IdCkOpenAddressBarInNewTab = 'ckOpenAddressBarInNewTab'
- IdCkOpenBookmarksInNewTab = 'ckOpenBookmarksInNewTab'
- IdCkOpenLinksInNewTab = 'ckOpenLinksInNewTab'
- IdCkOpenHomePageOnNewTabCreated = 'ckOpenHomePageOnNewTabCreated'
- IdCkBackIsClose = 'ckBackIsClose'
- IdCkAutoLoadImages = 'ckAutoLoadImages'
-
- def __init__(self, parent):
- QtGui.QWidget.__init__(self, parent)
- self.setupUi(self)
-
- browser = config.ObjectRegistry.get(config.IdViewBrowserWidget, None)
- self.setEnabled(browser is not None)
- if browser is not None:
- self.controlById(self.IdEdHomePage).setText(browser.fcSettings.value('HomePage'))
- ck = self.controlById(self.IdCkOpenAddressBarInNewTab)
- ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('OpenAddressBarInNewTab') else QtCore.Qt.Unchecked)
- ck = self.controlById(self.IdCkOpenBookmarksInNewTab)
- ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('OpenBookmarksInNewTab') else QtCore.Qt.Unchecked)
- ck = self.controlById(self.IdCkOpenLinksInNewTab)
- ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('OpenLinksInNewTab') else QtCore.Qt.Unchecked)
- ck = self.controlById(self.IdCkOpenHomePageOnNewTabCreated)
- ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('OpenHomePageOnNewTabCreated') else QtCore.Qt.Unchecked)
- ck = self.controlById(self.IdCkBackIsClose)
- ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('BackIsClose') else QtCore.Qt.Unchecked)
- ck = self.controlById(self.IdCkAutoLoadImages)
- ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('AutoLoadImages') else QtCore.Qt.Unchecked)
-
- def controlById(self, idControl):
- return getattr(self, idControl)
-
- def apply(self):
- browser = config.ObjectRegistry.get(config.IdViewBrowserWidget, None)
- if browser is not None:
- edHomePage = self.controlById(self.IdEdHomePage)
-
- browser.fcSettings.setValues(
- HomePage=edHomePage.text(),
- OpenAddressBarInNewTab=self.controlById(self.IdCkOpenAddressBarInNewTab).checkState() == QtCore.Qt.Checked,
- OpenBookmarksInNewTab=self.controlById(self.IdCkOpenBookmarksInNewTab).checkState() == QtCore.Qt.Checked,
- OpenLinksInNewTab=self.controlById(self.IdCkOpenLinksInNewTab).checkState() == QtCore.Qt.Checked,
- OpenHomePageOnNewTabCreated=self.controlById(self.IdCkOpenHomePageOnNewTabCreated).checkState() == QtCore.Qt.Checked,
- BackIsClose=self.controlById(self.IdCkBackIsClose).checkState() == QtCore.Qt.Checked,
- AutoLoadImages=self.controlById(self.IdCkAutoLoadImages).checkState() == QtCore.Qt.Checked,
- )
-
-
-#***********************************************************************
-#
-#***********************************************************************
-class PrefsPageBrowser(dlgpreferences.Page):
-
- UUID = '{c85e63a8-6806-435a-81ce-f4b46872246f}'
-
- def __init__(self):
- dlgpreferences.Page.__init__(self, self.UUID)
- self._widget = None
- self.setDirty(True)
-
- def displayName(self):
- return self.trUtf8('Browser')
-
- def canApply(self): return True
- def canHelp(self): return True
-
- def setVisible(self, parent, flag):
- createdNew = False
- if flag and self._widget is None:
- createdNew = True
- self._widget = PrefsBrowserWidget(parent)
- self._widget.setVisible(flag)
- return (createdNew, self._widget)
-
-
- def doApply(self):
- self._widget.apply()
- return True
-
- def doOk(self):
- return True
-
-
-#***********************************************************************
-#
-#***********************************************************************
-if __name__ == '__main__':
- from PyQt4 import QtGui
- import sys
-
- app = QtGui.QApplication(sys.argv)
- w = PrefsBrowserWidget(None)
- w.show()
- res = app.exec_()
- sys.exit(res)
-
Deleted: trunk/fclient/src/fclient/impl/Ui_PrefsGlobal.py
===================================================================
--- trunk/fclient/src/fclient/impl/Ui_PrefsGlobal.py 2008-07-27 11:42:16 UTC (rev 774)
+++ trunk/fclient/src/fclient/impl/Ui_PrefsGlobal.py 2008-07-27 11:42:47 UTC (rev 775)
@@ -1,62 +0,0 @@
-
-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 .lib.qt4ex import dlgpreferences
-
-from .tpls.Ui_PrefsGlobalWidgetTpl import Ui_PrefsGlobalWidget
-#**********************************************************************************
-#
-#**********************************************************************************
-class PrefsGlobalWidget(QtGui.QWidget, Ui_PrefsGlobalWidget):
-
- def __init__(self, parent):
- QtGui.QWidget.__init__(self, parent)
- self.setupUi(self)
-
-#***********************************************************************
-#
-#***********************************************************************
-class PrefsPageGlobal(dlgpreferences.Page):
-
- UUID = '{ba654bd8-4c63-11dd-b8b1-a11c9b5c3981}'
-
- def __init__(self):
- dlgpreferences.Page.__init__(self, self.UUID)
- self._widget = None
- self.setDirty(True)
-
- def displayName(self):
- return self.trUtf8('Global')
-
- def canApply(self): return True
- def canHelp(self): return True
-
- def setVisible(self, parent, flag):
- createdNew = False
- if flag and self._widget is None:
- createdNew = True
- self._widget = PrefsGlobalWidget(parent)
- self._widget.setVisible(flag)
- return (createdNew, self._widget)
-
-
-
-#***********************************************************************
-#
-#***********************************************************************
-if __name__ == '__main__':
- from PyQt4 import QtGui
- import sys
-
- app = QtGui.QApplication(sys.argv)
- w = PrefsGlobalWidget(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.
|
|
From: <jU...@us...> - 2008-07-27 11:45:46
|
Revision: 776
http://fclient.svn.sourceforge.net/fclient/?rev=776&view=rev
Author: jUrner
Date: 2008-07-27 11:45:55 +0000 (Sun, 27 Jul 2008)
Log Message:
-----------
naming
Modified Paths:
--------------
trunk/fclient/src/fclient/impl/MainWindow.py
Added Paths:
-----------
trunk/fclient/src/fclient/impl/Prefs.py
Removed Paths:
-------------
trunk/fclient/src/fclient/impl/Ui_Prefs.py
Modified: trunk/fclient/src/fclient/impl/MainWindow.py
===================================================================
--- trunk/fclient/src/fclient/impl/MainWindow.py 2008-07-27 11:42:47 UTC (rev 775)
+++ trunk/fclient/src/fclient/impl/MainWindow.py 2008-07-27 11:45:55 UTC (rev 776)
@@ -9,7 +9,7 @@
from PyQt4 import QtCore, QtGui
from . import config
-from . import Ui_Prefs
+from . import Prefs
from .lib.qt4ex import dlgabout
from .tpls.Ui_MainWindowTpl import Ui_MainWindow
@@ -120,7 +120,7 @@
## event onrs
##################################################
def onActPreferencesTriggered(self):
- dlg = Ui_Prefs.PrefsDlg(self)
+ dlg = Prefs.PrefsDlg(self)
if dlg.exec_() == dlg.Accepted:
pass
Added: trunk/fclient/src/fclient/impl/Prefs.py
===================================================================
--- trunk/fclient/src/fclient/impl/Prefs.py (rev 0)
+++ trunk/fclient/src/fclient/impl/Prefs.py 2008-07-27 11:45:55 UTC (rev 776)
@@ -0,0 +1,91 @@
+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 .lib.qt4ex import dlgpreferences
+from .PrefsGlobal import PrefsPageGlobal
+from .PrefsBrowserWidget import PrefsPageBrowser
+#**********************************************************************************
+#
+#**********************************************************************************
+class Settings(config.SettingsBase):
+ _key_ = config.IdViewBrowserWidget
+ _settings_ = (
+ ('DlgState', 'String', '', config.SettingScopePrivate),
+ )
+
+
+#***********************************************************************
+#
+#***********************************************************************
+class PrefsPageRoot(dlgpreferences.Page):
+
+ UUID = '{a61e2758-4c66-11dd-a3e6-8814a37cbeed}'
+
+ def __init__(self):
+ dlgpreferences.Page.__init__(self, self.UUID)
+ self._widget = None
+ self.setDirty(True)
+
+ def displayName(self):
+ return QtGui.QApplication.translate("PreferencesGlobal", 'All', None, QtGui.QApplication.UnicodeUTF8)
+
+ def canApply(self): return False
+ def canHelp(self): return False
+
+ def setVisible(self, parent, flag):
+ createdNew = False
+ if flag and self._widget is None:
+ createdNew = True
+ self._widget = QtGui.QWidget(parent)
+ self._widget.setVisible(flag)
+ return (createdNew, self._widget)
+
+#**********************************************************************************
+#
+#**********************************************************************************
+class PrefsDlg(dlgpreferences.DlgPreferencesFlatTree):
+
+ def __init__(self, parent):
+
+ pages = PrefsPageRoot()(
+ PrefsPageGlobal(),
+ PrefsPageBrowser(),
+
+ )
+
+ dlgpreferences.DlgPreferencesFlatTree.__init__(self,
+ parent,
+ pages=pages,
+ startPage=PrefsPageGlobal.UUID,
+ )
+ self.fcSettings = Settings(self).restore()
+
+
+ def showEvent(self, event):
+ self.restoreState(self.fcSettings.value('DlgState'))
+
+ def hideEvent(self, event):
+ self.fcSettings.setValues(DlgState=self.saveState())
+
+ def closeEvent(self, event):
+ pass
+
+
+#**********************************************************************************
+#
+#**********************************************************************************
+if __name__ == '__main__':
+ import sys
+
+ app = QtGui.QApplication(sys.argv)
+ w = PrefsDlg(None)
+ w.show()
+ res = app.exec_()
+ sys.exit(res)
+
+
Deleted: trunk/fclient/src/fclient/impl/Ui_Prefs.py
===================================================================
--- trunk/fclient/src/fclient/impl/Ui_Prefs.py 2008-07-27 11:42:47 UTC (rev 775)
+++ trunk/fclient/src/fclient/impl/Ui_Prefs.py 2008-07-27 11:45:55 UTC (rev 776)
@@ -1,91 +0,0 @@
-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 .lib.qt4ex import dlgpreferences
-from .PrefsGlobal import PrefsPageGlobal
-from .PrefsBrowserWidget import PrefsPageBrowser
-#**********************************************************************************
-#
-#**********************************************************************************
-class Settings(config.SettingsBase):
- _key_ = config.IdViewBrowserWidget
- _settings_ = (
- ('DlgState', 'String', '', config.SettingScopePrivate),
- )
-
-
-#***********************************************************************
-#
-#***********************************************************************
-class PrefsPageRoot(dlgpreferences.Page):
-
- UUID = '{a61e2758-4c66-11dd-a3e6-8814a37cbeed}'
-
- def __init__(self):
- dlgpreferences.Page.__init__(self, self.UUID)
- self._widget = None
- self.setDirty(True)
-
- def displayName(self):
- return QtGui.QApplication.translate("PreferencesGlobal", 'All', None, QtGui.QApplication.UnicodeUTF8)
-
- def canApply(self): return False
- def canHelp(self): return False
-
- def setVisible(self, parent, flag):
- createdNew = False
- if flag and self._widget is None:
- createdNew = True
- self._widget = QtGui.QWidget(parent)
- self._widget.setVisible(flag)
- return (createdNew, self._widget)
-
-#**********************************************************************************
-#
-#**********************************************************************************
-class PrefsDlg(dlgpreferences.DlgPreferencesFlatTree):
-
- def __init__(self, parent):
-
- pages = PrefsPageRoot()(
- PrefsPageGlobal(),
- PrefsPageBrowser(),
-
- )
-
- dlgpreferences.DlgPreferencesFlatTree.__init__(self,
- parent,
- pages=pages,
- startPage=PrefsPageGlobal.UUID,
- )
- self.fcSettings = Settings(self).restore()
-
-
- def showEvent(self, event):
- self.restoreState(self.fcSettings.value('DlgState'))
-
- def hideEvent(self, event):
- self.fcSettings.setValues(DlgState=self.saveState())
-
- def closeEvent(self, event):
- pass
-
-
-#**********************************************************************************
-#
-#**********************************************************************************
-if __name__ == '__main__':
- import sys
-
- app = QtGui.QApplication(sys.argv)
- w = PrefsDlg(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.
|
|
From: <jU...@us...> - 2008-07-27 11:48:43
|
Revision: 777
http://fclient.svn.sourceforge.net/fclient/?rev=777&view=rev
Author: jUrner
Date: 2008-07-27 11:48:52 +0000 (Sun, 27 Jul 2008)
Log Message:
-----------
naming
Modified Paths:
--------------
trunk/fclient/src/fclient/impl/ViewConnection.py
Added Paths:
-----------
trunk/fclient/src/fclient/impl/DlgConnectionExpertSettings.py
Removed Paths:
-------------
trunk/fclient/src/fclient/impl/Ui_DlgConnectionExpertSettings.py
Added: trunk/fclient/src/fclient/impl/DlgConnectionExpertSettings.py
===================================================================
--- trunk/fclient/src/fclient/impl/DlgConnectionExpertSettings.py (rev 0)
+++ trunk/fclient/src/fclient/impl/DlgConnectionExpertSettings.py 2008-07-27 11:48:52 UTC (rev 777)
@@ -0,0 +1,73 @@
+
+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 QtCore, QtGui
+
+from . import config
+
+from .tpls.Ui_DlgConnectionExpertSettingsTpl import Ui_DlgConnectionExpertSettings
+#**********************************************************************************
+#
+#**********************************************************************************
+class ConnectionExpertSettingsDlg(QtGui.QDialog, Ui_DlgConnectionExpertSettings ):
+
+ IdEdFcpConnectionName = 'edFcpConnectionName'
+ IdSpinFcpConnectionTimerMaxDuration = 'spinFcpConnectionTimerMaxDuration'
+ IdSpinConnectionTimerTimeout = 'spinConnectionTimerTimeout'
+ IdSpinFcpPollTimerTimeout = 'spinFcpPollTimerTimeout'
+
+ def __init__(self, parent=None):
+ QtGui.QDialog.__init__(self, parent)
+
+ self.setupUi(self)
+ self.setWindowTitle(config.FclientAppName + self.trUtf8(' - Connection expert settings'))
+
+ edName = self.controlById(self.IdEdFcpConnectionName)
+ edName.setText(config.settings.value('FcpConnectionName'))
+ self.connect(edName, QtCore.SIGNAL('textChanged(const QString &)'), self.onEdFcpConnectionNameChanged)
+
+ connectionWidget = config.ObjectRegistry.get(config.IdViewConnectionWidget, None)
+ spins = (
+ (self.IdSpinFcpConnectionTimerMaxDuration, 'FcpConnectionTimerMaxDuration'),
+ (self.IdSpinConnectionTimerTimeout, 'FcpConnectionTimerTimeout'),
+ (self.IdSpinFcpPollTimerTimeout, 'FcpPollTimerTimeout'),
+ )
+ for idControl, settingName in spins:
+ spin = self.controlById(idControl)
+ if connectionWidget is None:
+ spin.setEnabled(False)
+ else:
+ spin.setValue(connectionWidget.fcSettings.value(settingName))
+
+
+
+
+ def controlById(self, idControl):
+ return getattr(self, idControl)
+
+
+ def onEdFcpConnectionNameChanged(self, text):
+ config.settings.setValues(FcpConnectionName=text)
+
+
+
+#**********************************************************************************
+#
+#**********************************************************************************
+if __name__ == '__main__':
+ import sys
+
+ class DummyKey(object):
+ KeyType = 'USK@'
+ def __init__(self): self.key = 'USG@qweqqweqwe'
+ def toString(self): return self.key
+
+ app = QtGui.QApplication(sys.argv)
+ w = ConnectionExpertSettingsDlg(None)
+ w.show()
+ res = app.exec_()
+ sys.exit(res)
+
+
Deleted: trunk/fclient/src/fclient/impl/Ui_DlgConnectionExpertSettings.py
===================================================================
--- trunk/fclient/src/fclient/impl/Ui_DlgConnectionExpertSettings.py 2008-07-27 11:45:55 UTC (rev 776)
+++ trunk/fclient/src/fclient/impl/Ui_DlgConnectionExpertSettings.py 2008-07-27 11:48:52 UTC (rev 777)
@@ -1,73 +0,0 @@
-
-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 QtCore, QtGui
-
-from . import config
-
-from .tpls.Ui_DlgConnectionExpertSettingsTpl import Ui_DlgConnectionExpertSettings
-#**********************************************************************************
-#
-#**********************************************************************************
-class ConnectionExpertSettingsDlg(QtGui.QDialog, Ui_DlgConnectionExpertSettings ):
-
- IdEdFcpConnectionName = 'edFcpConnectionName'
- IdSpinFcpConnectionTimerMaxDuration = 'spinFcpConnectionTimerMaxDuration'
- IdSpinConnectionTimerTimeout = 'spinConnectionTimerTimeout'
- IdSpinFcpPollTimerTimeout = 'spinFcpPollTimerTimeout'
-
- def __init__(self, parent=None):
- QtGui.QDialog.__init__(self, parent)
-
- self.setupUi(self)
- self.setWindowTitle(config.FclientAppName + self.trUtf8(' - Connection expert settings'))
-
- edName = self.controlById(self.IdEdFcpConnectionName)
- edName.setText(config.settings.value('FcpConnectionName'))
- self.connect(edName, QtCore.SIGNAL('textChanged(const QString &)'), self.onEdFcpConnectionNameChanged)
-
- connectionWidget = config.ObjectRegistry.get(config.IdViewConnectionWidget, None)
- spins = (
- (self.IdSpinFcpConnectionTimerMaxDuration, 'FcpConnectionTimerMaxDuration'),
- (self.IdSpinConnectionTimerTimeout, 'FcpConnectionTimerTimeout'),
- (self.IdSpinFcpPollTimerTimeout, 'FcpPollTimerTimeout'),
- )
- for idControl, settingName in spins:
- spin = self.controlById(idControl)
- if connectionWidget is None:
- spin.setEnabled(False)
- else:
- spin.setValue(connectionWidget.fcSettings.value(settingName))
-
-
-
-
- def controlById(self, idControl):
- return getattr(self, idControl)
-
-
- def onEdFcpConnectionNameChanged(self, text):
- config.settings.setValues(FcpConnectionName=text)
-
-
-
-#**********************************************************************************
-#
-#**********************************************************************************
-if __name__ == '__main__':
- import sys
-
- class DummyKey(object):
- KeyType = 'USK@'
- def __init__(self): self.key = 'USG@qweqqweqwe'
- def toString(self): return self.key
-
- app = QtGui.QApplication(sys.argv)
- w = ConnectionExpertSettingsDlg(None)
- w.show()
- res = app.exec_()
- sys.exit(res)
-
-
Modified: trunk/fclient/src/fclient/impl/ViewConnection.py
===================================================================
--- trunk/fclient/src/fclient/impl/ViewConnection.py 2008-07-27 11:45:55 UTC (rev 776)
+++ trunk/fclient/src/fclient/impl/ViewConnection.py 2008-07-27 11:48:52 UTC (rev 777)
@@ -27,7 +27,7 @@
from . import config
from .lib import fcp2
-from .Ui_DlgConnectionExpertSettings import ConnectionExpertSettingsDlg
+from .DlgConnectionExpertSettings import ConnectionExpertSettingsDlg
from .tpls.Ui_ViewConnectionWidgetTpl import Ui_ViewConnectionWidget
#**********************************************************************************
@@ -298,9 +298,9 @@
from . import View, ViewLogger
app = QtGui.QApplication(sys.argv)
- w = Ui_View.ViewWidget(None)
+ w = View.ViewWidget(None)
w.addTopViews(ViewConnectionWidget(None))
- w.addBottomViews(Ui_ViewLogger.ViewLoggerWidget(None))
+ w.addBottomViews(ViewLogger.ViewLoggerWidget(None))
w.show()
res = app.exec_()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jU...@us...> - 2008-07-27 11:50:08
|
Revision: 778
http://fclient.svn.sourceforge.net/fclient/?rev=778&view=rev
Author: jUrner
Date: 2008-07-27 11:50:16 +0000 (Sun, 27 Jul 2008)
Log Message:
-----------
naming
Modified Paths:
--------------
trunk/fclient/src/fclient/impl/ViewBrowser.py
Added Paths:
-----------
trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py
Removed Paths:
-------------
trunk/fclient/src/fclient/impl/Ui_DlgDownloadKeyToDisk.py
Added: trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py
===================================================================
--- trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py (rev 0)
+++ trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py 2008-07-27 11:50:16 UTC (rev 778)
@@ -0,0 +1,79 @@
+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 os
+from PyQt4 import QtCore, QtGui
+
+from . import config
+from .lib.compactpath.qt4 import pathlabelwrap
+
+
+from .tpls.Ui_DlgDownloadKeyToDiskTpl import Ui_DlgDownloadKeyToDisk
+#**********************************************************************************
+#
+#**********************************************************************************
+class DownloadKeyToDiskDlg(QtGui.QDialog, Ui_DlgDownloadKeyToDisk):
+
+ IdLabelKey = 'labelKey'
+ IdEdDownloadFileName = 'edDownloadFileName'
+ IdBtChooseDownloadFileName = 'btChooseDownloadFileName'
+
+
+ def __init__(self, parent=None, fcpKey=None):
+ QtGui.QDialog.__init__(self, parent)
+
+ self.setupUi(self)
+ self.setWindowTitle(config.FclientAppName + self.trUtf8(' - Download key..'))
+
+ self._filePath = None
+ self._fcpKey = fcpKey
+
+ self.pathLabelWrap = pathlabelwrap.PathLabelWrap(
+ self.labelKey,
+ fpath=unicode(self.labelKey.text()),
+ path_module=config.CompactPathFcpKeyModule
+ )
+ self.connect(self.btChooseDownloadFileName, QtCore.SIGNAL('clicked()'), self.onChooseDownloadFileName)
+
+ # find out fileName to dl key to
+ fileName = config.guessFileNameFromKey(fcpKey)
+ if fileName is None:
+ fileName = self.trUtf8('UNKNOWN')
+ self._filePath = os.path.join(unicode(config.settings.value('DownloadDir')), unicode(fileName))
+ self.edDownloadFileName.setText(self._filePath)
+ if self._fcpKey is not None:
+ self.pathLabelWrap.setPath(self._fcpKey.toString())
+
+ def filePath(self):
+ return self._filePath
+
+ def onChooseDownloadFileName(self):
+ filePath = QtGui.QFileDialog.getSaveFileName(
+ self,
+ config.FclientAppName + self.trUtf8(' - Save key To..'),
+ self.edDownloadFileName.text(),
+ )
+ if filePath:
+ self._filePath = filePath
+ self.edDownloadFileName.setText(filePath)
+
+
+#**********************************************************************************
+#
+#**********************************************************************************
+if __name__ == '__main__':
+ import sys
+
+ class DummyKey(object):
+ KeyType = 'USK@'
+ def __init__(self): self.key = 'USG@qweqqweqwe'
+ def toString(self): return self.key
+
+ app = QtGui.QApplication(sys.argv)
+ w = DownloadKeyToDiskDlg(None, fcpKey=DummyKey())
+ w.show()
+ res = app.exec_()
+ sys.exit(res)
+
+
Deleted: trunk/fclient/src/fclient/impl/Ui_DlgDownloadKeyToDisk.py
===================================================================
--- trunk/fclient/src/fclient/impl/Ui_DlgDownloadKeyToDisk.py 2008-07-27 11:48:52 UTC (rev 777)
+++ trunk/fclient/src/fclient/impl/Ui_DlgDownloadKeyToDisk.py 2008-07-27 11:50:16 UTC (rev 778)
@@ -1,79 +0,0 @@
-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 os
-from PyQt4 import QtCore, QtGui
-
-from . import config
-from .lib.compactpath.qt4 import pathlabelwrap
-
-
-from .tpls.Ui_DlgDownloadKeyToDiskTpl import Ui_DlgDownloadKeyToDisk
-#**********************************************************************************
-#
-#**********************************************************************************
-class DownloadKeyToDiskDlg(QtGui.QDialog, Ui_DlgDownloadKeyToDisk):
-
- IdLabelKey = 'labelKey'
- IdEdDownloadFileName = 'edDownloadFileName'
- IdBtChooseDownloadFileName = 'btChooseDownloadFileName'
-
-
- def __init__(self, parent=None, fcpKey=None):
- QtGui.QDialog.__init__(self, parent)
-
- self.setupUi(self)
- self.setWindowTitle(config.FclientAppName + self.trUtf8(' - Download key..'))
-
- self._filePath = None
- self._fcpKey = fcpKey
-
- self.pathLabelWrap = pathlabelwrap.PathLabelWrap(
- self.labelKey,
- fpath=unicode(self.labelKey.text()),
- path_module=config.CompactPathFcpKeyModule
- )
- self.connect(self.btChooseDownloadFileName, QtCore.SIGNAL('clicked()'), self.onChooseDownloadFileName)
-
- # find out fileName to dl key to
- fileName = config.guessFileNameFromKey(fcpKey)
- if fileName is None:
- fileName = self.trUtf8('UNKNOWN')
- self._filePath = os.path.join(unicode(config.settings.value('DownloadDir')), unicode(fileName))
- self.edDownloadFileName.setText(self._filePath)
- if self._fcpKey is not None:
- self.pathLabelWrap.setPath(self._fcpKey.toString())
-
- def filePath(self):
- return self._filePath
-
- def onChooseDownloadFileName(self):
- filePath = QtGui.QFileDialog.getSaveFileName(
- self,
- config.FclientAppName + self.trUtf8(' - Save key To..'),
- self.edDownloadFileName.text(),
- )
- if filePath:
- self._filePath = filePath
- self.edDownloadFileName.setText(filePath)
-
-
-#**********************************************************************************
-#
-#**********************************************************************************
-if __name__ == '__main__':
- import sys
-
- class DummyKey(object):
- KeyType = 'USK@'
- def __init__(self): self.key = 'USG@qweqqweqwe'
- def toString(self): return self.key
-
- app = QtGui.QApplication(sys.argv)
- w = DownloadKeyToDiskDlg(None, fcpKey=DummyKey())
- 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:48:52 UTC (rev 777)
+++ trunk/fclient/src/fclient/impl/ViewBrowser.py 2008-07-27 11:50:16 UTC (rev 778)
@@ -41,7 +41,7 @@
from .lib.compactpath.qt4 import pathlabelwrap
from . import Ui_DlgPropsBrowserObject
-from . import Ui_DlgDownloadKeyToDisk
+from . import DlgDownloadKeyToDisk
from .tpls.Ui_ViewBrowserWidgetTpl import Ui_ViewBrowserWidget
#*****************************************************************************************
#
@@ -543,7 +543,7 @@
"""
fcpKey = config.qStringToFcpKey(QtCore.QString(qUrl.encodedPath()))
if fcpKey is not None:
- dlg = Ui_DlgDownloadKeyToDisk.DownloadKeyToDiskDlg(self, fcpKey=fcpKey)
+ dlg = DlgDownloadKeyToDisk.DownloadKeyToDiskDlg(self, fcpKey=fcpKey)
if dlg.exec_() == dlg.Accepted:
filePath = dlg.filePath()
downloadsWidget = config.ObjectRegistry.get(config.IdViewCDownloadsWidget, None)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <jU...@us...> - 2008-07-27 12:03:48
|
Revision: 781
http://fclient.svn.sourceforge.net/fclient/?rev=781&view=rev
Author: jUrner
Date: 2008-07-27 12:03:57 +0000 (Sun, 27 Jul 2008)
Log Message:
-----------
new package structure
Removed Paths:
-------------
trunk/fclient/src/fclient/impl/downloads/
trunk/fclient/src/fclient/impl/settings/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jU...@us...> - 2008-07-27 12:11:35
|
Revision: 782
http://fclient.svn.sourceforge.net/fclient/?rev=782&view=rev
Author: jUrner
Date: 2008-07-27 12:11:44 +0000 (Sun, 27 Jul 2008)
Log Message:
-----------
naming
Modified Paths:
--------------
trunk/fclient/src/fclient/impl/DlgConnectionExpertSettings.py
trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py
trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py
trunk/fclient/src/fclient/impl/ViewBrowser.py
trunk/fclient/src/fclient/impl/ViewConnection.py
Modified: trunk/fclient/src/fclient/impl/DlgConnectionExpertSettings.py
===================================================================
--- trunk/fclient/src/fclient/impl/DlgConnectionExpertSettings.py 2008-07-27 12:03:57 UTC (rev 781)
+++ trunk/fclient/src/fclient/impl/DlgConnectionExpertSettings.py 2008-07-27 12:11:44 UTC (rev 782)
@@ -11,7 +11,7 @@
#**********************************************************************************
#
#**********************************************************************************
-class ConnectionExpertSettingsDlg(QtGui.QDialog, Ui_DlgConnectionExpertSettings ):
+class DlgConnectionExpertSettings(QtGui.QDialog, Ui_DlgConnectionExpertSettings ):
IdEdFcpConnectionName = 'edFcpConnectionName'
IdSpinFcpConnectionTimerMaxDuration = 'spinFcpConnectionTimerMaxDuration'
Modified: trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py
===================================================================
--- trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py 2008-07-27 12:03:57 UTC (rev 781)
+++ trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py 2008-07-27 12:11:44 UTC (rev 782)
@@ -13,7 +13,7 @@
#**********************************************************************************
#
#**********************************************************************************
-class DownloadKeyToDiskDlg(QtGui.QDialog, Ui_DlgDownloadKeyToDisk):
+class DlgDownloadKeyToDisk(QtGui.QDialog, Ui_DlgDownloadKeyToDisk):
IdLabelKey = 'labelKey'
IdEdDownloadFileName = 'edDownloadFileName'
Modified: trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py
===================================================================
--- trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py 2008-07-27 12:03:57 UTC (rev 781)
+++ trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py 2008-07-27 12:11:44 UTC (rev 782)
@@ -21,7 +21,7 @@
#**********************************************************************************
#
#**********************************************************************************
-class PropsBrowserObjectDlg(QtGui.QDialog, Ui_DlgPropsBrowserObject):
+class DlgPropsBrowserObject(QtGui.QDialog, Ui_DlgPropsBrowserObject):
IdLabelType = 'labelType'
IdLabelTitle = 'labelTitle'
Modified: trunk/fclient/src/fclient/impl/ViewBrowser.py
===================================================================
--- trunk/fclient/src/fclient/impl/ViewBrowser.py 2008-07-27 12:03:57 UTC (rev 781)
+++ trunk/fclient/src/fclient/impl/ViewBrowser.py 2008-07-27 12:11:44 UTC (rev 782)
@@ -543,7 +543,7 @@
"""
fcpKey = config.qStringToFcpKey(QtCore.QString(qUrl.encodedPath()))
if fcpKey is not None:
- dlg = DlgDownloadKeyToDisk.DownloadKeyToDiskDlg(self, fcpKey=fcpKey)
+ dlg = DlgDownloadKeyToDisk.DlgDownloadKeyToDisk(self, fcpKey=fcpKey)
if dlg.exec_() == dlg.Accepted:
filePath = dlg.filePath()
downloadsWidget = config.ObjectRegistry.get(config.IdViewCDownloadsWidget, None)
@@ -727,7 +727,7 @@
elif action == browser.pageAction(page.DownloadLinkToDisk):
self._downloadKeyToDisk(hitTestResult.linkUrl())
elif action == self.fcActions['ActionObjectProperties']:
- dlg = DlgPropsBrowserObject.PropsBrowserObjectDlg(self, hitTestResult=hitTestResult)
+ dlg = DlgPropsBrowserObject.DlgPropsBrowserObject(self, hitTestResult=hitTestResult)
if dlg.exec_() == dlg.Accepted:
pass
Modified: trunk/fclient/src/fclient/impl/ViewConnection.py
===================================================================
--- trunk/fclient/src/fclient/impl/ViewConnection.py 2008-07-27 12:03:57 UTC (rev 781)
+++ trunk/fclient/src/fclient/impl/ViewConnection.py 2008-07-27 12:11:44 UTC (rev 782)
@@ -27,7 +27,7 @@
from . import config
from .lib import fcp2
-from .DlgConnectionExpertSettings import ConnectionExpertSettingsDlg
+from .DlgConnectionExpertSettings import DlgConnectionExpertSettings
from .tpls.Ui_ViewConnectionWidgetTpl import Ui_ViewConnectionWidget
#**********************************************************************************
@@ -268,7 +268,7 @@
config.settings.setValues(FcpConnectionPort=value)
def onBtFcpConnectionMoreClicked(self):
- dlg = ConnectionExpertSettingsDlg(self)
+ dlg = DlgConnectionExpertSettings(self)
if dlg.exec_() == dlg.Accepted:
pass
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jU...@us...> - 2008-07-27 18:20:46
|
Revision: 786
http://fclient.svn.sourceforge.net/fclient/?rev=786&view=rev
Author: jUrner
Date: 2008-07-27 18:20:55 +0000 (Sun, 27 Jul 2008)
Log Message:
-----------
move connection expert settings to prefs dialog
Modified Paths:
--------------
trunk/fclient/src/fclient/impl/Prefs.py
trunk/fclient/src/fclient/impl/ViewConnection.py
trunk/fclient/src/fclient/impl/tpls/Ui_ViewConnectionWidgetTpl.py
trunk/fclient/src/fclient/impl/tpls/ViewConnectionWidgetTpl.ui
Added Paths:
-----------
trunk/fclient/src/fclient/impl/PrefsConnectionWidget.py
trunk/fclient/src/fclient/impl/tpls/PrefsConnectionExpertSettingsTpl.ui
trunk/fclient/src/fclient/impl/tpls/Ui_PrefsConnectionExpertSettingsTpl.py
Removed Paths:
-------------
trunk/fclient/src/fclient/impl/tpls/DlgConnectionExpertSettingsTpl.ui
trunk/fclient/src/fclient/impl/tpls/Ui_DlgConnectionExpertSettingsTpl.py
Modified: trunk/fclient/src/fclient/impl/Prefs.py
===================================================================
--- trunk/fclient/src/fclient/impl/Prefs.py 2008-07-27 13:13:29 UTC (rev 785)
+++ trunk/fclient/src/fclient/impl/Prefs.py 2008-07-27 18:20:55 UTC (rev 786)
@@ -9,6 +9,7 @@
from .lib.qt4ex import dlgpreferences
from .PrefsGlobal import PrefsPageGlobal
from .PrefsBrowserWidget import PrefsPageBrowser
+from .PrefsConnectionWidget import PrefsPageConnectionExpertSettings
#**********************************************************************************
#
#**********************************************************************************
@@ -54,9 +55,9 @@
pages = PrefsPageRoot()(
PrefsPageGlobal(),
+ PrefsPageConnectionExpertSettings(),
PrefsPageBrowser(),
-
- )
+ )
dlgpreferences.DlgPreferencesFlatTree.__init__(self,
parent,
Added: trunk/fclient/src/fclient/impl/PrefsConnectionWidget.py
===================================================================
--- trunk/fclient/src/fclient/impl/PrefsConnectionWidget.py (rev 0)
+++ trunk/fclient/src/fclient/impl/PrefsConnectionWidget.py 2008-07-27 18:20:55 UTC (rev 786)
@@ -0,0 +1,97 @@
+
+
+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 QtCore, QtGui
+
+from . import config
+from .lib.qt4ex import dlgpreferences
+
+from .tpls.Ui_PrefsConnectionExpertSettingsTpl import Ui_PrefsConnectionExpertSettings
+#**********************************************************************************
+#
+#**********************************************************************************
+class PrefsConnectionExpertSettingsWidget(QtGui.QWidget, Ui_PrefsConnectionExpertSettings):
+
+ IdEdFcpConnectionName = 'edFcpConnectionName'
+ IdSpinFcpConnectionTimerMaxDuration = 'spinFcpConnectionTimerMaxDuration'
+ IdSpinConnectionTimerTimeout = 'spinConnectionTimerTimeout'
+ IdSpinFcpPollTimerTimeout = 'spinFcpPollTimerTimeout'
+
+ def __init__(self, parent=None):
+ QtGui.QWidget.__init__(self, parent)
+
+ self.setupUi(self)
+ self.setWindowTitle(config.FclientAppName + self.trUtf8(' - Connection expert settings'))
+
+ edName = self.controlById(self.IdEdFcpConnectionName)
+ edName.setText(config.settings.value('FcpConnectionName'))
+ self.connect(edName, QtCore.SIGNAL('textChanged(const QString &)'), self.onEdFcpConnectionNameChanged)
+
+ connectionWidget = config.ObjectRegistry.get(config.IdViewConnectionWidget, None)
+ spins = (
+ (self.IdSpinFcpConnectionTimerMaxDuration, 'FcpConnectionTimerMaxDuration'),
+ (self.IdSpinConnectionTimerTimeout, 'FcpConnectionTimerTimeout'),
+ (self.IdSpinFcpPollTimerTimeout, 'FcpPollTimerTimeout'),
+ )
+ for idControl, settingName in spins:
+ spin = self.controlById(idControl)
+ if connectionWidget is None:
+ spin.setEnabled(False)
+ else:
+ spin.setValue(connectionWidget.fcSettings.value(settingName))
+
+
+
+
+ def controlById(self, idControl):
+ return getattr(self, idControl)
+
+
+ def onEdFcpConnectionNameChanged(self, text):
+ config.settings.setValues(FcpConnectionName=text)
+
+#***********************************************************************
+#
+#***********************************************************************
+class PrefsPageConnectionExpertSettings(dlgpreferences.Page):
+
+ UUID = '{{98c7efcb-5636-4bf5-8192-10e7ccb09314}'
+
+ def __init__(self):
+ dlgpreferences.Page.__init__(self, self.UUID)
+ self._widget = None
+ self.setDirty(True)
+
+ def displayName(self):
+ return self.trUtf8('Connection')
+
+ def canApply(self): return True
+ def canHelp(self): return True
+
+ def setVisible(self, parent, flag):
+ createdNew = False
+ if flag and self._widget is None:
+ createdNew = True
+ self._widget = PrefsConnectionExpertSettingsWidget(parent)
+ self._widget.setVisible(flag)
+ return (createdNew, self._widget)
+
+
+
+#***********************************************************************
+#
+#***********************************************************************
+if __name__ == '__main__':
+ from PyQt4 import QtGui
+ import sys
+
+ app = QtGui.QApplication(sys.argv)
+ w = PrefsConnectionExpertSettingsWidget(None)
+ w.show()
+ res = app.exec_()
+ sys.exit(res)
+
Modified: trunk/fclient/src/fclient/impl/ViewConnection.py
===================================================================
--- trunk/fclient/src/fclient/impl/ViewConnection.py 2008-07-27 13:13:29 UTC (rev 785)
+++ trunk/fclient/src/fclient/impl/ViewConnection.py 2008-07-27 18:20:55 UTC (rev 786)
@@ -27,7 +27,6 @@
from . import config
from .lib import fcp2
-from .DlgConnectionExpertSettings import DlgConnectionExpertSettings
from .tpls.Ui_ViewConnectionWidgetTpl import Ui_ViewConnectionWidget
#**********************************************************************************
@@ -138,7 +137,6 @@
IdEdFcpFcpConnectionHost = 'edFcpConnectionHost'
IdFcpSpinFcpConnectionPort = 'spinFcpConnectionPort'
IdCkFcpAutoConnect = 'ckFcpAutoConnect'
- IdBtFcpConnectionMore = 'btFcpConnectionMore'
IdEdFproxyConnectionHost = 'edFproxyConnectionHost'
IdFproxySpinConnectionPort = 'spinFproxyConnectionPort'
@@ -166,7 +164,6 @@
self.fcGlobalFeedback = GlobalFeedback(self,idGlobalFeedback)
-
#########################################
## methods
#########################################
@@ -213,10 +210,7 @@
ck = self.controlById(self.IdCkFcpAutoConnect)
ck.setChecked(doAutoConnect)
self.connect(ck, QtCore.SIGNAL('stateChanged(int)'), self.onCkFcpAutoConnectStateChanged)
-
- bt = self.controlById(self.IdBtFcpConnectionMore)
- self.connect(bt, QtCore.SIGNAL('clicked()'), self.onBtFcpConnectionMoreClicked)
-
+
# setup fproxy host / port
edHost = self.controlById(self.IdEdFproxyConnectionHost)
edHost.setText(config.settings.value('FproxyConnectionHost'))
@@ -267,11 +261,6 @@
def onSpinFcpConnectionPortChanged(self, value):
config.settings.setValues(FcpConnectionPort=value)
- def onBtFcpConnectionMoreClicked(self):
- dlg = DlgConnectionExpertSettings(self)
- if dlg.exec_() == dlg.Accepted:
- pass
-
def onEdFproxyConnectionHostChanged(self, text):
config.settings.setValues(FproxyConnectionHost=text)
Deleted: trunk/fclient/src/fclient/impl/tpls/DlgConnectionExpertSettingsTpl.ui
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/DlgConnectionExpertSettingsTpl.ui 2008-07-27 13:13:29 UTC (rev 785)
+++ trunk/fclient/src/fclient/impl/tpls/DlgConnectionExpertSettingsTpl.ui 2008-07-27 18:20:55 UTC (rev 786)
@@ -1,287 +0,0 @@
-<ui version="4.0" >
- <class>DlgConnectionExpertSettings</class>
- <widget class="QDialog" name="DlgConnectionExpertSettings" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>392</width>
- <height>589</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Dialog</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_2" >
- <item row="0" column="0" >
- <widget class="QTabWidget" name="tabWidget" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Minimum" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="currentIndex" >
- <number>0</number>
- </property>
- <widget class="QWidget" name="tab" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>370</width>
- <height>472</height>
- </rect>
- </property>
- <attribute name="title" >
- <string>Fcp connection</string>
- </attribute>
- <layout class="QGridLayout" name="gridLayout" >
- <item row="0" column="0" >
- <layout class="QVBoxLayout" name="verticalLayout" >
- <property name="spacing" >
- <number>0</number>
- </property>
- <item>
- <widget class="QLabel" name="label_5" >
- <property name="text" >
- <string>Adjusts the name the client uses to connect to the node. Use this for example to adjust the connection name in case the name is already in use by other clients. WARNING: changing this will loose all your current qequests</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- <property name="wordWrap" >
- <bool>true</bool>
- </property>
- <property name="textInteractionFlags" >
- <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard</set>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QLabel" name="label" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>Connection name:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="edFcpConnectionName" />
- </item>
- </layout>
- </item>
- <item>
- <widget class="QLabel" name="label_6" >
- <property name="text" >
- <string>How long should the client try to connect to the node before finally giving up? How long should he wait before retrying to establish a connection? WARNING: setting timeout to low values may cause the gui to slow down</string>
- </property>
- <property name="wordWrap" >
- <bool>true</bool>
- </property>
- <property name="textInteractionFlags" >
- <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard</set>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2" >
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_3" >
- <item>
- <widget class="QLabel" name="label_3" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>Connect duration:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_4" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>Connect timeout:</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_2" >
- <item>
- <widget class="QSpinBox" name="spinFcpConnectionTimerMaxDuration" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="suffix" >
- <string> seconds</string>
- </property>
- <property name="maximum" >
- <number>999</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="spinConnectionTimerTimeout" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="suffix" >
- <string> miliseconds</string>
- </property>
- <property name="maximum" >
- <number>99999</number>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QLabel" name="label_7" >
- <property name="text" >
- <string>How long should the client wait before polling the node for a the next message? Warning: setting this to high values will make messages come in more slowly. Setting it to low values may cause the gui to slow down.
-</string>
- </property>
- <property name="wordWrap" >
- <bool>true</bool>
- </property>
- <property name="textInteractionFlags" >
- <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard</set>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3" >
- <item>
- <widget class="QLabel" name="label_2" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>Poll frequency: </string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="spinFcpPollTimerTimeout" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="suffix" >
- <string> miliseconds</string>
- </property>
- <property name="maximum" >
- <number>99999</number>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- <item row="1" column="0" >
- <spacer name="verticalSpacer" >
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>98</width>
- <height>15</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="2" column="0" >
- <widget class="Line" name="line" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item row="3" column="0" >
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons" >
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>accepted()</signal>
- <receiver>DlgConnectionExpertSettings</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>248</x>
- <y>254</y>
- </hint>
- <hint type="destinationlabel" >
- <x>157</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>buttonBox</sender>
- <signal>rejected()</signal>
- <receiver>DlgConnectionExpertSettings</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>316</x>
- <y>260</y>
- </hint>
- <hint type="destinationlabel" >
- <x>286</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- </connections>
-</ui>
Added: trunk/fclient/src/fclient/impl/tpls/PrefsConnectionExpertSettingsTpl.ui
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/PrefsConnectionExpertSettingsTpl.ui (rev 0)
+++ trunk/fclient/src/fclient/impl/tpls/PrefsConnectionExpertSettingsTpl.ui 2008-07-27 18:20:55 UTC (rev 786)
@@ -0,0 +1,243 @@
+<ui version="4.0" >
+ <class>PrefsConnectionExpertSettings</class>
+ <widget class="QWidget" name="PrefsConnectionExpertSettings" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>505</width>
+ <height>524</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Form</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>0</number>
+ </property>
+ <item row="0" column="0" >
+ <widget class="QTabWidget" name="tabWidget" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Minimum" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="currentIndex" >
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="tab" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>501</width>
+ <height>472</height>
+ </rect>
+ </property>
+ <attribute name="title" >
+ <string>Fcp connection</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <property name="spacing" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>Adjusts the name the client uses to connect to the node. Use this for example to adjust the connection name in case the name is already in use by other clients. WARNING: changing this will loose all your current qequests</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
+ <property name="textInteractionFlags" >
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout" >
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Connection name:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="edFcpConnectionName" />
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_6" >
+ <property name="text" >
+ <string>How long should the client try to connect to the node before finally giving up? How long should he wait before retrying to establish a connection? WARNING: setting timeout to low values may cause the gui to slow down</string>
+ </property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
+ <property name="textInteractionFlags" >
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2" >
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <item>
+ <widget class="QLabel" name="label_3" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Connect duration: </string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_4" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Connect timeout:</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <item>
+ <widget class="QSpinBox" name="spinFcpConnectionTimerMaxDuration" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="suffix" >
+ <string> seconds</string>
+ </property>
+ <property name="maximum" >
+ <number>999</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="spinConnectionTimerTimeout" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="suffix" >
+ <string> miliseconds</string>
+ </property>
+ <property name="maximum" >
+ <number>99999</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_7" >
+ <property name="text" >
+ <string>How long should the client wait before polling the node for a the next message? Warning: setting this to high values will make messages come in more slowly. Setting it to low values may cause the gui to slow down.
+</string>
+ </property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
+ <property name="textInteractionFlags" >
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3" >
+ <item>
+ <widget class="QLabel" name="label_2" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Poll frequency: </string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="spinFcpPollTimerTimeout" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="suffix" >
+ <string> miliseconds</string>
+ </property>
+ <property name="maximum" >
+ <number>99999</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <spacer name="verticalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>502</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
Deleted: trunk/fclient/src/fclient/impl/tpls/Ui_DlgConnectionExpertSettingsTpl.py
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/Ui_DlgConnectionExpertSettingsTpl.py 2008-07-27 13:13:29 UTC (rev 785)
+++ trunk/fclient/src/fclient/impl/tpls/Ui_DlgConnectionExpertSettingsTpl.py 2008-07-27 18:20:55 UTC (rev 786)
@@ -1,173 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Form implementation generated from reading ui file '/home/me/src/proj/fclient/trunk/fclient/src/fclient/tpls/DlgConnectionExpertSettingsTpl.ui'
-#
-# Created: Sat Jul 26 13:40:11 2008
-# by: PyQt4 UI code generator 4.4.3-snapshot-20080705
-#
-# WARNING! All changes made in this file will be lost!
-
-from PyQt4 import QtCore, QtGui
-
-class Ui_DlgConnectionExpertSettings(object):
- def setupUi(self, DlgConnectionExpertSettings):
- DlgConnectionExpertSettings.setObjectName("DlgConnectionExpertSettings")
- DlgConnectionExpertSettings.resize(392, 589)
- self.gridLayout_2 = QtGui.QGridLayout(DlgConnectionExpertSettings)
- self.gridLayout_2.setObjectName("gridLayout_2")
- self.tabWidget = QtGui.QTabWidget(DlgConnectionExpertSettings)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
- self.tabWidget.setSizePolicy(sizePolicy)
- self.tabWidget.setObjectName("tabWidget")
- self.tab = QtGui.QWidget()
- self.tab.setGeometry(QtCore.QRect(0, 0, 370, 472))
- self.tab.setObjectName("tab")
- self.gridLayout = QtGui.QGridLayout(self.tab)
- self.gridLayout.setObjectName("gridLayout")
- self.verticalLayout = QtGui.QVBoxLayout()
- self.verticalLayout.setSpacing(0)
- self.verticalLayout.setObjectName("verticalLayout")
- self.label_5 = QtGui.QLabel(self.tab)
- self.label_5.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
- self.label_5.setWordWrap(True)
- self.label_5.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByKeyboard)
- self.label_5.setObjectName("label_5")
- self.verticalLayout.addWidget(self.label_5)
- self.horizontalLayout = QtGui.QHBoxLayout()
- self.horizontalLayout.setSpacing(6)
- self.horizontalLayout.setObjectName("horizontalLayout")
- self.label = QtGui.QLabel(self.tab)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
- self.label.setSizePolicy(sizePolicy)
- self.label.setObjectName("label")
- self.horizontalLayout.addWidget(self.label)
- self.edFcpConnectionName = QtGui.QLineEdit(self.tab)
- self.edFcpConnectionName.setObjectName("edFcpConnectionName")
- self.horizontalLayout.addWidget(self.edFcpConnectionName)
- self.verticalLayout.addLayout(self.horizontalLayout)
- self.label_6 = QtGui.QLabel(self.tab)
- self.label_6.setWordWrap(True)
- self.label_6.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByKeyboard)
- self.label_6.setObjectName("label_6")
- self.verti...
[truncated message content] |
|
From: <jU...@us...> - 2008-07-27 20:05:24
|
Revision: 789
http://fclient.svn.sourceforge.net/fclient/?rev=789&view=rev
Author: jUrner
Date: 2008-07-27 20:05:32 +0000 (Sun, 27 Jul 2008)
Log Message:
-----------
reworked SaveKeyToDisk ++ add to dls widget
Modified Paths:
--------------
trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py
trunk/fclient/src/fclient/impl/ViewBrowser.py
trunk/fclient/src/fclient/impl/ViewDownloads.py
trunk/fclient/src/fclient/impl/tpls/DlgDownloadKeyToDiskTpl.ui
trunk/fclient/src/fclient/impl/tpls/Ui_DlgDownloadKeyToDiskTpl.py
Modified: trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py
===================================================================
--- trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py 2008-07-27 20:02:55 UTC (rev 788)
+++ trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py 2008-07-27 20:05:32 UTC (rev 789)
@@ -1,3 +1,10 @@
+#***************************************************************************************
+#TODO:
+# x. have to inject (..whatebver) a checkbox into msg box invalid key warning <x don't show this message again>
+# x. save dialog pos/size on exit
+#
+#*************************************************************************************
+
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__)]
@@ -6,18 +13,18 @@
from PyQt4 import QtCore, QtGui
from . import config
-from .lib.compactpath.qt4 import pathlabelwrap
+from .lib import fcp2
-
from .tpls.Ui_DlgDownloadKeyToDiskTpl import Ui_DlgDownloadKeyToDisk
#**********************************************************************************
#
#**********************************************************************************
class DlgDownloadKeyToDisk(QtGui.QDialog, Ui_DlgDownloadKeyToDisk):
- IdLabelKey = 'labelKey'
- IdEdDownloadFileName = 'edDownloadFileName'
- IdBtChooseDownloadFileName = 'btChooseDownloadFileName'
+ IdEdKey = 'edKey'
+ IdEdFileName = 'edFileName'
+ IdEdDirectory = 'edDirectory'
+ IdBtChooseDirectory = 'btChooseDirectory'
def __init__(self, parent=None, fcpKey=None):
@@ -26,52 +33,100 @@
self.setupUi(self)
self.setWindowTitle(config.FclientAppName + self.trUtf8(' - Download key..'))
- self._filePath = None
+ self._fileName = None
self._fcpKey = fcpKey
- self.pathLabelWrap = pathlabelwrap.PathLabelWrap(
- self.labelKey,
- fpath=unicode(self.labelKey.text()),
- path_module=config.CompactPathFcpKeyModule
- )
- self.connect(self.btChooseDownloadFileName, QtCore.SIGNAL('clicked()'), self.onChooseDownloadFileName)
+ # setup key editbox
+ ed = self.controlById(self.IdEdKey)
+ if fcpKey is not None:
+ ed.setText(fcpKey.toString())
+
+ # setup filename editbox
+ ed = self.controlById(self.IdEdFileName)
+ if fcpKey is not None:
+ # find out fileName to dl key to
+ fileName = config.guessFileNameFromKey(self._fcpKey)
+ if fileName is None:
+ fileName = self.trUtf8('UNKNOWN')
+ ed.setText(fileName)
+
+ # setup directory editbox
+ ed = self.controlById(self.IdEdDirectory)
+ ed.setText(unicode(config.settings.value('DownloadDir')))
+ bt = self.controlById(self.IdBtChooseDirectory)
+ self.connect(bt, QtCore.SIGNAL('clicked()'), self.onChooseDirectory)
- # find out fileName to dl key to
- fileName = config.guessFileNameFromKey(fcpKey)
- if fileName is None:
- fileName = self.trUtf8('UNKNOWN')
- self._filePath = os.path.join(unicode(config.settings.value('DownloadDir')), unicode(fileName))
- self.edDownloadFileName.setText(self._filePath)
- if self._fcpKey is not None:
- self.pathLabelWrap.setPath(self._fcpKey.toString())
-
- def filePath(self):
- return self._filePath
+ ##############################
+ ## methods
+ ##############################
+ def controlById(self, idControl):
+ return getattr(self, idControl)
- def onChooseDownloadFileName(self):
- filePath = QtGui.QFileDialog.getSaveFileName(
+ def fileName(self):
+ return self._fileName
+
+ def fcpKey(self):
+ return self._fcpKey
+
+ ##############################
+ ## overwritten methods
+ ##############################
+ def accept(self):
+ edKey = self.controlById(self.IdEdKey)
+ edFileName = self.controlById(self.IdEdFileName)
+ edDirectory = self.controlById(self.IdEdDirectory)
+
+ key = unicode(edKey.text())
+ if not key:
+ return QtGui.QMessageBox.critical(self, self.windowTitle(), 'Please enter a key to download')
+ try:
+ self._fcpKey = fcp2.Key(key)
+ except fcp2.ErrorKey:
+ result = QtGui.QMessageBox.warning(self,
+ self.windowTitle(),
+ 'Looks like the key entered is not valid. \nProceed anyways?',
+ QtGui.QMessageBox.Yes | QtGui.QMessageBox.No
+ )
+ if result == QtGui.QMessageBox.Yes:
+ self._fcpKey = fcp2.KeyAny(key)
+ else:
+ return
+
+ fileName = edFileName.text()
+ if fileName.isEmpty():
+ return QtGui.QMessageBox.critical(self, self.windowTitle(), 'Please enter a filename for the key')
+
+ directory = edDirectory.text()
+ if directory.isEmpty():
+ return QtGui.QMessageBox.critical(self, self.windowTitle(), 'Please enter a directory under wich to save the key')
+
+ self._fileName = os.path.join(unicode(directory), unicode(fileName))
+ self.done(self.Accepted)
+
+ ##############################
+ ## event handlers
+ ##############################
+ def onChooseDirectory(self):
+ edDirectory = self.controlById(self.IdEdDirectory)
+ directory = QtGui.QFileDialog.getExistingDirectory(
self,
- config.FclientAppName + self.trUtf8(' - Save key To..'),
- self.edDownloadFileName.text(),
+ config.FclientAppName + self.trUtf8(' - Download key to..'),
+ edDirectory.text(),
)
- if filePath:
- self._filePath = filePath
- self.edDownloadFileName.setText(filePath)
-
-
+ if directory:
+ edDirectory.setText(directory)
+
#**********************************************************************************
#
#**********************************************************************************
if __name__ == '__main__':
import sys
- class DummyKey(object):
- KeyType = 'USK@'
- def __init__(self): self.key = 'USG@qweqqweqwe'
- def toString(self): return self.key
-
app = QtGui.QApplication(sys.argv)
- w = DownloadKeyToDiskDlg(None, fcpKey=DummyKey())
+ w = DlgDownloadKeyToDisk(
+ #None,
+ fcpKey=fcp2.KeyKSK('foo.txt')
+ )
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 20:02:55 UTC (rev 788)
+++ trunk/fclient/src/fclient/impl/ViewBrowser.py 2008-07-27 20:05:32 UTC (rev 789)
@@ -23,6 +23,7 @@
# x. browser settings - QWebSettings
# x. shortcuts
# x. user staring gui for first time. maybe we should not connext untill the user connects explicitely
+# x. looks like on error loading page reload does not work
#******************************************************************************************
"""
@@ -545,16 +546,15 @@
if fcpKey is not None:
dlg = DlgDownloadKeyToDisk.DlgDownloadKeyToDisk(self, fcpKey=fcpKey)
if dlg.exec_() == dlg.Accepted:
- filePath = dlg.filePath()
+ fileName = dlg.fileName()
downloadsWidget = config.ObjectRegistry.get(config.IdViewCDownloadsWidget, None)
if downloadsWidget is None:
raise ValueError('no downloads widget found')
downloadsWidget.downloadFile(
fcpKey,
- filePath,
+ fileName,
persistence=fcp2.ConstPersistence.Forever,
handleFilenameCollision=True,
-
)
return True
return False
Modified: trunk/fclient/src/fclient/impl/ViewDownloads.py
===================================================================
--- trunk/fclient/src/fclient/impl/ViewDownloads.py 2008-07-27 20:02:55 UTC (rev 788)
+++ trunk/fclient/src/fclient/impl/ViewDownloads.py 2008-07-27 20:05:32 UTC (rev 789)
@@ -33,6 +33,7 @@
from . import config
from .lib import fcp2
from .lib.fcp2.lib import pmstruct
+from . import DlgDownloadKeyToDisk
from .tpls.Ui_ViewDownloadsWidgetTpl import Ui_ViewDownloadsWidget
#**********************************************************************************
@@ -47,8 +48,81 @@
self.displayName=self.trUtf8('Downloads')
self.icon=QtGui.QIcon()
+
+
#**********************************************************************************
#
+#**********************************************************************************
+class DownloadsWidgetGlobalFeedback(config.GlobalFeedbackBase):
+ """wrapper for global statusbar widgets, menus"""
+
+ def __init__(self, parent, idGlobalFeedback):
+ config.GlobalFeedbackBase.__init__(self, parent, idGlobalFeedback)
+
+ # menus
+ self.menus = []
+ if self.menuBar is not None and hasattr(parent, 'fcViewObject'):
+ menu = QtGui.QMenu(parent.fcViewObject.displayName, self.menuBar)
+ parent.populateMenu(menu)
+ self.menus.append(menu)
+ self.menuBar.addViewMenu(menu)
+
+ # status bar widgets
+ self.labelStatus = None
+ self.progress = None
+ self.labelFeedbackWrap = None
+ #if self.statusBar is not None:
+ # self.labelStatus = QtGui.QLabel(QtCore.QString(), self.statusBar)
+ # self.statusBar.addWidget(self.labelStatus)
+ #
+ # self.progress = QtGui.QProgressBar(self.statusBar)
+ # self.progress.setRange(0, Browser.MaxProgress)
+ # self.progress.setValue(0)
+ # self.statusBar.addWidget(self.progress)
+ #
+ # label = QtGui.QLabel(self.statusBar)
+ # label.setFrameStyle(QtGui.QLabel.Sunken | QtGui.QLabel.Box)
+ # self.labelFeedbackWrap = pathlabelwrap.PathLabelWrap(
+ # label,
+ # path_module=config.CompactPathFcpKeyModule,
+ # )
+ # self.statusBar.addWidget(self.labelFeedbackWrap.label, 1)
+
+
+ def setVisible(self, flag):
+ if self.menuBar is not None:
+ for menu in self.menus:
+ menu.children()[0].setVisible(flag)
+ #if self.statusBar is not None:
+ # self.progress.setVisible(flag)
+ # self.labelStatus.setVisible(flag)
+ # self.labelFeedbackWrap.label.setVisible(flag)
+
+ #def setProgress(self, n):
+ # if self.progress is not None:
+ # self.progress.setValue(n)
+
+ #def setStatusMessage(self, qString):
+ # if self.labelStatus is not None:
+ # self.labelStatus.setText(qString)
+
+ #def setFeedback(self, qString):
+ # if self.labelFeedbackWrap is not None:
+ # self.labelFeedbackWrap.setPath(unicode(qString))
+
+class DownloadsWidgetActions(config.ActionsBase):
+
+ def __init__(self, parent):
+ config.ActionsBase.__init__(self, parent)
+
+ self.action(
+ name='ActionDownloadKeyToDisk',
+ text=self.trUtf8('Download &key...'),
+ trigger=parent.onDownloadKey,
+ )
+
+#**********************************************************************************
+#
#**********************************************************************************
class PersistentRequestData(pmstruct.PMStruct):
_fields_ = (
@@ -138,8 +212,9 @@
self.setupUi(self)
config.ObjectRegistry.register(self)
-
+ self.fcActions = DownloadsWidgetActions(self)
self.fcViewObject = DownloadsViewObject(self)
+ self.fcGlobalFeedback = DownloadsWidgetGlobalFeedback(self, idGlobalFeedback)
self.fcpEvents = (
(config.fcpClient.events.ConfigData, self.onFcpConfigData),
(config.fcpClient.events.RequestCompleted, self.onFcpRequestCompleted),
@@ -188,6 +263,12 @@
self.viewClose()
+ def hideEvent(self, event):
+ self.fcGlobalFeedback.setVisible(False)
+
+ def showEvent(self, event):
+ self.fcGlobalFeedback.setVisible(True)
+
def viewClose(self):
config.fcpClient.events -= self.fcpEvents
@@ -201,10 +282,12 @@
persistentUserData=PersistentRequestData(ClientName=unicode(self.objectName())).dump(),
**kws
)
- item = self._createItemFromFcpRequest(config.fcpClient.getRequest(cpIdentifier))
+ item = self._createItemFromFcpRequest(config.fcpClient.getRequest(fcpIdentifier))
+ def populateMenu(self, menu):
+ menu.addAction(self.fcActions['ActionDownloadKeyToDisk'])
+ return menu
-
#########################################
## methods
@@ -213,6 +296,19 @@
return getattr(idGlobalFeedback, idControl)
#########################################
+ ## event handlers
+ #########################################
+ def onDownloadKey(self, action):
+ dlg = DlgDownloadKeyToDisk.DlgDownloadKeyToDisk(self, fcpKey=None)
+ if dlg.exec_() == dlg.Accepted:
+ self.downloadFile(
+ dlg.fcpKey(),
+ dlg.fileName(),
+ persistence=fcp2.ConstPersistence.Forever,
+ handleFilenameCollision=True,
+ )
+
+ #########################################
## fcp event handlers
#########################################
def onFcpConfigData(self, fcpEvent, fcpRequest):
Modified: trunk/fclient/src/fclient/impl/tpls/DlgDownloadKeyToDiskTpl.ui
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/DlgDownloadKeyToDiskTpl.ui 2008-07-27 20:02:55 UTC (rev 788)
+++ trunk/fclient/src/fclient/impl/tpls/DlgDownloadKeyToDiskTpl.ui 2008-07-27 20:05:32 UTC (rev 789)
@@ -6,7 +6,7 @@
<x>0</x>
<y>0</y>
<width>431</width>
- <height>175</height>
+ <height>243</height>
</rect>
</property>
<property name="windowTitle" >
@@ -18,43 +18,45 @@
<item>
<widget class="QLabel" name="label" >
<property name="text" >
- <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Key:</span></p></body></html></string>
+ <string><b>Key:</b></string>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="labelKey" >
+ <widget class="QLineEdit" name="edKey" >
+ <property name="dragEnabled" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3" >
<property name="text" >
- <string>USK@qwweqweqweqwe.../foo</string>
+ <string><b>File name:</b></string>
</property>
</widget>
</item>
<item>
+ <widget class="QLineEdit" name="edFileName" />
+ </item>
+ <item>
<widget class="QLabel" name="label_2" >
<property name="text" >
- <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Download to:</span></p></body></html></string>
+ <string><b>Directory:</b></string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
- <widget class="QLineEdit" name="edDownloadFileName" >
+ <widget class="QLineEdit" name="edDirectory" >
<property name="dragEnabled" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="btChooseDownloadFileName" >
+ <widget class="QPushButton" name="btChooseDirectory" >
<property name="text" >
<string>...</string>
</property>
Modified: trunk/fclient/src/fclient/impl/tpls/Ui_DlgDownloadKeyToDiskTpl.py
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/Ui_DlgDownloadKeyToDiskTpl.py 2008-07-27 20:02:55 UTC (rev 788)
+++ trunk/fclient/src/fclient/impl/tpls/Ui_DlgDownloadKeyToDiskTpl.py 2008-07-27 20:05:32 UTC (rev 789)
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
-# Form implementation generated from reading ui file '/home/me/src/proj/fclient/trunk/fclient/src/fclient/tpls/DlgDownloadKeyToDiskTpl.ui'
+# Form implementation generated from reading ui file '/home/me/src/proj/fclient/trunk/fclient/src/fclient/impl/tpls/DlgDownloadKeyToDiskTpl.ui'
#
-# Created: Thu Jul 24 10:12:00 2008
+# Created: Sun Jul 27 21:01:10 2008
# by: PyQt4 UI code generator 4.4.3-snapshot-20080705
#
# WARNING! All changes made in this file will be lost!
@@ -12,7 +12,7 @@
class Ui_DlgDownloadKeyToDisk(object):
def setupUi(self, DlgDownloadKeyToDisk):
DlgDownloadKeyToDisk.setObjectName("DlgDownloadKeyToDisk")
- DlgDownloadKeyToDisk.resize(431, 175)
+ DlgDownloadKeyToDisk.resize(431, 243)
self.gridLayout = QtGui.QGridLayout(DlgDownloadKeyToDisk)
self.gridLayout.setObjectName("gridLayout")
self.verticalLayout = QtGui.QVBoxLayout()
@@ -20,21 +20,28 @@
self.label = QtGui.QLabel(DlgDownloadKeyToDisk)
self.label.setObjectName("label")
self.verticalLayout.addWidget(self.label)
- self.labelKey = QtGui.QLabel(DlgDownloadKeyToDisk)
- self.labelKey.setObjectName("labelKey")
- self.verticalLayout.addWidget(self.labelKey)
+ self.edKey = QtGui.QLineEdit(DlgDownloadKeyToDisk)
+ self.edKey.setDragEnabled(True)
+ self.edKey.setObjectName("edKey")
+ self.verticalLayout.addWidget(self.edKey)
+ self.label_3 = QtGui.QLabel(DlgDownloadKeyToDisk)
+ self.label_3.setObjectName("label_3")
+ self.verticalLayout.addWidget(self.label_3)
+ self.edFileName = QtGui.QLineEdit(DlgDownloadKeyToDisk)
+ self.edFileName.setObjectName("edFileName")
+ self.verticalLayout.addWidget(self.edFileName)
self.label_2 = QtGui.QLabel(DlgDownloadKeyToDisk)
self.label_2.setObjectName("label_2")
self.verticalLayout.addWidget(self.label_2)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
- self.edDownloadFileName = QtGui.QLineEdit(DlgDownloadKeyToDisk)
- self.edDownloadFileName.setDragEnabled(True)
- self.edDownloadFileName.setObjectName("edDownloadFileName")
- self.horizontalLayout.addWidget(self.edDownloadFileName)
- self.btChooseDownloadFileName = QtGui.QPushButton(DlgDownloadKeyToDisk)
- self.btChooseDownloadFileName.setObjectName("btChooseDownloadFileName")
- self.horizontalLayout.addWidget(self.btChooseDownloadFileName)
+ self.edDirectory = QtGui.QLineEdit(DlgDownloadKeyToDisk)
+ self.edDirectory.setDragEnabled(True)
+ self.edDirectory.setObjectName("edDirectory")
+ self.horizontalLayout.addWidget(self.edDirectory)
+ self.btChooseDirectory = QtGui.QPushButton(DlgDownloadKeyToDisk)
+ self.btChooseDirectory.setObjectName("btChooseDirectory")
+ self.horizontalLayout.addWidget(self.btChooseDirectory)
self.verticalLayout.addLayout(self.horizontalLayout)
self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
spacerItem = QtGui.QSpacerItem(20, 15, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
@@ -57,18 +64,10 @@
def retranslateUi(self, DlgDownloadKeyToDisk):
DlgDownloadKeyToDisk.setWindowTitle(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "Dialog", None, QtGui.QApplication.UnicodeUTF8))
- self.label.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
-"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
-"p, li { white-space: pre-wrap; }\n"
-"</style></head><body style=\" font-family:\'Sans Serif\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
-"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Key:</span></p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
- self.labelKey.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "USK@qwweqweqweqwe.../foo", None, QtGui.QApplication.UnicodeUTF8))
- self.label_2.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
-"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
-"p, li { white-space: pre-wrap; }\n"
-"</style></head><body style=\" font-family:\'Sans Serif\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
-"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Download to:</span></p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
- self.btChooseDownloadFileName.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "...", None, QtGui.QApplication.UnicodeUTF8))
+ self.label.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "<b>Key:</b>", None, QtGui.QApplication.UnicodeUTF8))
+ self.label_3.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "<b>File name:</b>", None, QtGui.QApplication.UnicodeUTF8))
+ self.label_2.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "<b>Directory:</b>", None, QtGui.QApplication.UnicodeUTF8))
+ self.btChooseDirectory.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "...", None, QtGui.QApplication.UnicodeUTF8))
if __name__ == "__main__":
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jU...@us...> - 2008-07-28 19:26:39
|
Revision: 805
http://fclient.svn.sourceforge.net/fclient/?rev=805&view=rev
Author: jUrner
Date: 2008-07-28 19:26:47 +0000 (Mon, 28 Jul 2008)
Log Message:
-----------
combed over prefs dialog. most settings are now present (untested)
Modified Paths:
--------------
trunk/fclient/src/fclient/impl/PrefsGlobal.py
trunk/fclient/src/fclient/impl/tpls/PrefsGlobalWidgetTpl.ui
trunk/fclient/src/fclient/impl/tpls/Ui_PrefsGlobalWidgetTpl.py
Modified: trunk/fclient/src/fclient/impl/PrefsGlobal.py
===================================================================
--- trunk/fclient/src/fclient/impl/PrefsGlobal.py 2008-07-28 19:25:47 UTC (rev 804)
+++ trunk/fclient/src/fclient/impl/PrefsGlobal.py 2008-07-28 19:26:47 UTC (rev 805)
@@ -4,10 +4,11 @@
import os; __path__ = [os.path.dirname(__file__)]
-from PyQt4 import QtGui
+from PyQt4 import QtCore, QtGui
from . import config
from .lib.qt4ex import dlgpreferences
+from .lib.qt4ex.lib import settings
from .tpls.Ui_PrefsGlobalWidgetTpl import Ui_PrefsGlobalWidget
#**********************************************************************************
@@ -15,10 +16,79 @@
#**********************************************************************************
class PrefsGlobalWidget(QtGui.QWidget, Ui_PrefsGlobalWidget):
- def __init__(self, parent):
+ IdEdSettingsDir = 'edSettingsDir'
+ IdBtSelectSettingsDir = 'btSelectSettingsDir'
+
+ IdCkSettingsAllUsers = 'ckSettingsAllUsers'
+
+ IdEdDownloadDir = 'edDownloadDir'
+ IdBtSelectDownloadDir = 'btSelectDownloadDir'
+
+
+ def __init__(self, parent=None, page=None):
QtGui.QWidget.__init__(self, parent)
+
self.setupUi(self)
+ self.fcSettingsControler = settings.SettingsControler(config.settings, parent=self)
+ if page is not None:
+ page.connect(self.fcSettingsControler, QtCore.SIGNAL('isDirty(bool)'), page.setDirty)
+
+ self.fcSettingsControler.addLineEdit(
+ self.controlById(self.IdEdSettingsDir),
+ 'SettingsDir',
+ )
+ self.fcSettingsControler.addCheckBox(
+ self.controlById(self.IdCkSettingsAllUsers),
+ 'SettingsAllUsers',
+ )
+ self.fcSettingsControler.addLineEdit(
+ self.controlById(self.IdEdDownloadDir),
+ 'DownloadDir',
+ )
+
+ bt = self.controlById(self.IdBtSelectSettingsDir)
+ self.connect(bt, QtCore.SIGNAL('clicked()'), self.onBtSelectSettingsDirClicked)
+ bt = self.controlById(self.IdBtSelectDownloadDir)
+ self.connect(bt, QtCore.SIGNAL('clicked()'), self.onBtSelectDownloadDirClicked)
+
+
+ def controlById(self, idControl):
+ return getattr(self, idControl)
+
+ def doApply(self):
+ if self.fcSettingsControler is not None:
+ return self.fcSettingsControler.apply()
+ return False
+
+ def doRestoreDefaults(self):
+ if self.fcSettingsControler is not None:
+ return self.fcSettingsControler.restoreDefaults()
+ return False
+
+ #####################
+ ## event handlers
+ #####################
+ def onBtSelectSettingsDirClicked(self):
+ ed = self.controlById(self.IdEdSettingsDir)
+ directory = QtGui.QFileDialog.getExistingDirectory(
+ self,
+ config.FclientAppName + self.trUtf8(' - Select settings directory..'),
+ ed.text(),
+ )
+ if directory:
+ ed.setText(directory)
+
+ def onBtSelectDownloadDirClicked(self):
+ ed = self.controlById(self.IdEdDownloadDir)
+ directory = QtGui.QFileDialog.getExistingDirectory(
+ self,
+ config.FclientAppName + self.trUtf8(' - Select download directory..'),
+ ed.text(),
+ )
+ if directory:
+ ed.setText(directory)
+
#***********************************************************************
#
#***********************************************************************
@@ -29,24 +99,22 @@
def __init__(self):
dlgpreferences.Page.__init__(self, self.UUID)
self._widget = None
- self.setDirty(True)
-
+
def displayName(self):
return self.trUtf8('Global')
def canApply(self): return True
- def canHelp(self): return True
+ def canHelp(self): return False
+ def canRestoreDefaults(self): return True
def setVisible(self, parent, flag):
createdNew = False
if flag and self._widget is None:
createdNew = True
- self._widget = PrefsGlobalWidget(parent)
+ self._widget = PrefsGlobalWidget(parent=parent, page=self)
self._widget.setVisible(flag)
return (createdNew, self._widget)
-
-
#***********************************************************************
#
#***********************************************************************
Modified: trunk/fclient/src/fclient/impl/tpls/PrefsGlobalWidgetTpl.ui
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/PrefsGlobalWidgetTpl.ui 2008-07-28 19:25:47 UTC (rev 804)
+++ trunk/fclient/src/fclient/impl/tpls/PrefsGlobalWidgetTpl.ui 2008-07-28 19:26:47 UTC (rev 805)
@@ -6,37 +6,80 @@
<x>0</x>
<y>0</y>
<width>465</width>
- <height>247</height>
+ <height>269</height>
</rect>
</property>
<property name="windowTitle" >
<string>Form</string>
</property>
- <layout class="QGridLayout" >
+ <layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
- <string>Specify directory to store settings to. If unchecked, settings are stored in an os dependend location.</string>
+ <string>Specify directory to store settings to.Leave empty to store settings in a location your os feels best with</string>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
+ <property name="textInteractionFlags" >
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard</set>
+ </property>
</widget>
</item>
<item row="1" column="0" >
<layout class="QHBoxLayout" >
<item>
- <widget class="QCheckBox" name="ckStoreSettingsLocally" >
+ <widget class="QLineEdit" name="edSettingsDir" />
+ </item>
+ <item>
+ <widget class="QPushButton" name="btSelectSettingsDir" >
<property name="text" >
- <string/>
+ <string>...</string>
</property>
</widget>
</item>
+ </layout>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>If no path for settings is specified, store settings only for the the current user or for all users?</string>
+ </property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
+ <property name="textInteractionFlags" >
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QCheckBox" name="ckSettingsAllUsers" >
+ <property name="text" >
+ <string>Store settings for all users</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Default directory to store downloads to </string>
+ </property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
+ <property name="textInteractionFlags" >
+ <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" >
+ <layout class="QHBoxLayout" name="horizontalLayout" >
<item>
- <widget class="QLineEdit" name="edStoreSettingsLocally" />
+ <widget class="QLineEdit" name="edDownloadDir" />
</item>
<item>
- <widget class="QPushButton" name="btStoreSettingsLocally" >
+ <widget class="QPushButton" name="btSelectDownloadDir" >
<property name="text" >
<string>...</string>
</property>
@@ -44,15 +87,15 @@
</item>
</layout>
</item>
- <item row="2" column="0" >
- <spacer>
+ <item row="6" column="0" >
+ <spacer name="verticalSpacer" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0" >
<size>
<width>20</width>
- <height>40</height>
+ <height>38</height>
</size>
</property>
</spacer>
Modified: trunk/fclient/src/fclient/impl/tpls/Ui_PrefsGlobalWidgetTpl.py
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/Ui_PrefsGlobalWidgetTpl.py 2008-07-28 19:25:47 UTC (rev 804)
+++ trunk/fclient/src/fclient/impl/tpls/Ui_PrefsGlobalWidgetTpl.py 2008-07-28 19:26:47 UTC (rev 805)
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file '/home/me/src/proj/fclient/trunk/fclient/src/fclient/impl/tpls/PrefsGlobalWidgetTpl.ui'
#
-# Created: Sun Jul 27 13:41:35 2008
+# Created: Mon Jul 28 21:19:19 2008
# by: PyQt4 UI code generator 4.4.3-snapshot-20080705
#
# WARNING! All changes made in this file will be lost!
@@ -12,35 +12,59 @@
class Ui_PrefsGlobalWidget(object):
def setupUi(self, PrefsGlobalWidget):
PrefsGlobalWidget.setObjectName("PrefsGlobalWidget")
- PrefsGlobalWidget.resize(465, 247)
- self.gridlayout = QtGui.QGridLayout(PrefsGlobalWidget)
- self.gridlayout.setObjectName("gridlayout")
+ PrefsGlobalWidget.resize(465, 269)
+ self.gridLayout = QtGui.QGridLayout(PrefsGlobalWidget)
+ self.gridLayout.setObjectName("gridLayout")
self.label = QtGui.QLabel(PrefsGlobalWidget)
self.label.setWordWrap(True)
+ self.label.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByKeyboard)
self.label.setObjectName("label")
- self.gridlayout.addWidget(self.label, 0, 0, 1, 1)
+ self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.hboxlayout = QtGui.QHBoxLayout()
self.hboxlayout.setObjectName("hboxlayout")
- self.ckStoreSettingsLocally = QtGui.QCheckBox(PrefsGlobalWidget)
- self.ckStoreSettingsLocally.setObjectName("ckStoreSettingsLocally")
- self.hboxlayout.addWidget(self.ckStoreSettingsLocally)
- self.edStoreSettingsLocally = QtGui.QLineEdit(PrefsGlobalWidget)
- self.edStoreSettingsLocally.setObjectName("edStoreSettingsLocally")
- self.hboxlayout.addWidget(self.edStoreSettingsLocally)
- self.btStoreSettingsLocally = QtGui.QPushButton(PrefsGlobalWidget)
- self.btStoreSettingsLocally.setObjectName("btStoreSettingsLocally")
- self.hboxlayout.addWidget(self.btStoreSettingsLocally)
- self.gridlayout.addLayout(self.hboxlayout, 1, 0, 1, 1)
- spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridlayout.addItem(spacerItem, 2, 0, 1, 1)
+ self.edSettingsDir = QtGui.QLineEdit(PrefsGlobalWidget)
+ self.edSettingsDir.setObjectName("edSettingsDir")
+ self.hboxlayout.addWidget(self.edSettingsDir)
+ self.btSelectSettingsDir = QtGui.QPushButton(PrefsGlobalWidget)
+ self.btSelectSettingsDir.setObjectName("btSelectSettingsDir")
+ self.hboxlayout.addWidget(self.btSelectSettingsDir)
+ self.gridLayout.addLayout(self.hboxlayout, 1, 0, 1, 1)
+ self.label_2 = QtGui.QLabel(PrefsGlobalWidget)
+ self.label_2.setWordWrap(True)
+ self.label_2.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
+ self.label_2.setObjectName("label_2")
+ self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
+ self.ckSettingsAllUsers = QtGui.QCheckBox(PrefsGlobalWidget)
+ self.ckSettingsAllUsers.setObjectName("ckSettingsAllUsers")
+ self.gridLayout.addWidget(self.ckSettingsAllUsers, 3, 0, 1, 1)
+ self.label_3 = QtGui.QLabel(PrefsGlobalWidget)
+ self.label_3.setWordWrap(True)
+ self.label_3.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
+ self.label_3.setObjectName("label_3")
+ self.gridLayout.addWidget(self.label_3, 4, 0, 1, 1)
+ self.horizontalLayout = QtGui.QHBoxLayout()
+ self.horizontalLayout.setObjectName("horizontalLayout")
+ self.edDownloadDir = QtGui.QLineEdit(PrefsGlobalWidget)
+ self.edDownloadDir.setObjectName("edDownloadDir")
+ self.horizontalLayout.addWidget(self.edDownloadDir)
+ self.btSelectDownloadDir = QtGui.QPushButton(PrefsGlobalWidget)
+ self.btSelectDownloadDir.setObjectName("btSelectDownloadDir")
+ self.horizontalLayout.addWidget(self.btSelectDownloadDir)
+ self.gridLayout.addLayout(self.horizontalLayout, 5, 0, 1, 1)
+ spacerItem = QtGui.QSpacerItem(20, 38, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.gridLayout.addItem(spacerItem, 6, 0, 1, 1)
self.retranslateUi(PrefsGlobalWidget)
QtCore.QMetaObject.connectSlotsByName(PrefsGlobalWidget)
def retranslateUi(self, PrefsGlobalWidget):
PrefsGlobalWidget.setWindowTitle(QtGui.QApplication.translate("PrefsGlobalWidget", "Form", None, QtGui.QApplication.UnicodeUTF8))
- self.label.setText(QtGui.QApplication.translate("PrefsGlobalWidget", "Specify directory to store settings to. If unchecked, settings are stored in an os dependend location.", None, QtGui.QApplication.UnicodeUTF8))
- self.btStoreSettingsLocally.setText(QtGui.QApplication.translate("PrefsGlobalWidget", "...", None, QtGui.QApplication.UnicodeUTF8))
+ self.label.setText(QtGui.QApplication.translate("PrefsGlobalWidget", "Specify directory to store settings to.Leave empty to store settings in a location your os feels best with", None, QtGui.QApplication.UnicodeUTF8))
+ self.btSelectSettingsDir.setText(QtGui.QApplication.translate("PrefsGlobalWidget", "...", None, QtGui.QApplication.UnicodeUTF8))
+ self.label_2.setText(QtGui.QApplication.translate("PrefsGlobalWidget", "If no path for settings is specified, store settings only for the the current user or for all users?", None, QtGui.QApplication.UnicodeUTF8))
+ self.ckSettingsAllUsers.setText(QtGui.QApplication.translate("PrefsGlobalWidget", "Store settings for all users", None, QtGui.QApplication.UnicodeUTF8))
+ self.label_3.setText(QtGui.QApplication.translate("PrefsGlobalWidget", "Default directory to store downloads to ", None, QtGui.QApplication.UnicodeUTF8))
+ self.btSelectDownloadDir.setText(QtGui.QApplication.translate("PrefsGlobalWidget", "...", None, QtGui.QApplication.UnicodeUTF8))
if __name__ == "__main__":
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jU...@us...> - 2008-07-28 20:00:40
|
Revision: 809
http://fclient.svn.sourceforge.net/fclient/?rev=809&view=rev
Author: jUrner
Date: 2008-07-28 20:00:43 +0000 (Mon, 28 Jul 2008)
Log Message:
-----------
naming
Modified Paths:
--------------
trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py
trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py
trunk/fclient/src/fclient/impl/MainWindow.py
trunk/fclient/src/fclient/impl/PrefsConnectionWidget.py
trunk/fclient/src/fclient/impl/PrefsGlobal.py
trunk/fclient/src/fclient/impl/ViewBrowser.py
trunk/fclient/src/fclient/impl/ViewConnection.py
trunk/fclient/src/fclient/impl/ViewDownloads.py
trunk/fclient/src/fclient/impl/config.py
Modified: trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py
===================================================================
--- trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -41,7 +41,7 @@
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
- self.setWindowTitle(config.FclientAppName + self.trUtf8(' - Download key..'))
+ self.setWindowTitle(config.FcAppName + self.trUtf8(' - Download key..'))
self.fcSettings = Settings(self).restore()
self._fileName = None
@@ -63,7 +63,7 @@
# setup directory editbox
ed = self.controlById(self.IdEdDirectory)
- ed.setText(unicode(config.settings.value('DownloadDir')))
+ ed.setText(unicode(config.fcSettings.value('DownloadDir')))
bt = self.controlById(self.IdBtChooseDirectory)
self.connect(bt, QtCore.SIGNAL('clicked()'), self.onChooseDirectory)
@@ -122,7 +122,7 @@
edDirectory = self.controlById(self.IdEdDirectory)
directory = QtGui.QFileDialog.getExistingDirectory(
self,
- config.FclientAppName + self.trUtf8(' - Download key to..'),
+ config.FcAppName + self.trUtf8(' - Download key to..'),
edDirectory.text(),
)
if directory:
Modified: trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py
===================================================================
--- trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -35,7 +35,7 @@
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
- self.setWindowTitle(config.FclientAppName + self.trUtf8(' - Properties'))
+ self.setWindowTitle(config.FcAppName + self.trUtf8(' - Properties'))
if hitTestResult is not None:
Modified: trunk/fclient/src/fclient/impl/MainWindow.py
===================================================================
--- trunk/fclient/src/fclient/impl/MainWindow.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/MainWindow.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -1,5 +1,5 @@
from __future__ import absolute_import
-if __name__ == '__main__': # see --> http://bugs.python.org/issue1510172 . works only current dir and below
+if __name__ == '__main__': # see --> http://bugs.Fc.org/issue1510172 . works only current dir and below
import os; __path__ = [os.path.dirname(__file__)]
import logging
@@ -62,13 +62,13 @@
self.menuApplication = QtGui.QMenu(self.trUtf8('&Application'), self)
self.addMenu(self.menuApplication)
- self.menuApplication.addAction(parent.fclientActions['ActionPreferences'])
- self.menuApplication.addAction(parent.fclientActions['ActionExit'])
+ self.menuApplication.addAction(parent.fcActions['ActionPreferences'])
+ self.menuApplication.addAction(parent.fcActions['ActionExit'])
self.menuHelp = QtGui.QMenu(self.trUtf8('&Help'), self)
self.addMenu(self.menuHelp)
- self.menuHelp.addAction(parent.fclientActions['ActionAbout'])
- self.menuHelp.addAction(parent.fclientActions['ActionHelp'])
+ self.menuHelp.addAction(parent.fcActions['ActionAbout'])
+ self.menuHelp.addAction(parent.fcActions['ActionHelp'])
def addViewMenu(self, menu):
@@ -97,18 +97,18 @@
self.setupUi(self)
config.ObjectRegistry.register(self)
- self.fclientSettings = Settings().restore()
- self.fclientActions = Actions(self)
+ self.fcSettings = Settings().restore()
+ self.fcActions = Actions(self)
self.setMenuBar(MenuBar(self))
self.setStatusBar(StatusBar(self))
- self.restoreGeometry(self.fclientSettings.value('Geometry'))
+ self.restoreGeometry(self.fcSettings.value('Geometry'))
##################################################
## events
##################################################
def closeEvent(self, event):
- self.fclientSettings.setValues(Geometry=self.saveGeometry())
+ self.fcSettings.setValues(Geometry=self.saveGeometry())
def showEvent(self, event):
@@ -134,14 +134,14 @@
dlg = dlgabout.DlgAbout(
self,
##state=self.guiSettings['DlgAboutState'],
- caption=config.FclientAppName + ' - ' + self.trUtf8('About'),
- appName=config.FclientAppName,
- description=self.trUtf8('a freenet client written in python and Qt4'),
- version=config.FclientVersion,
- author=config.FclientAuthor,
- licence=config.FclientLicence,
- copyright=config.FclientCopyright,
- homepage=config.FclientHomepage
+ caption=config.FcAppName + ' - ' + self.trUtf8('About'),
+ appName=config.FcAppName,
+ description=self.trUtf8('a freenet client written in Fc and Qt4'),
+ version=config.FcVersion,
+ author=config.FcAuthor,
+ licence=config.FcLicence,
+ copyright=config.FcCopyright,
+ homepage=config.FcHomepage
)
dlg.exec_()
#self.guiSettings['DlgAboutState'] = dlg.saveState()
Modified: trunk/fclient/src/fclient/impl/PrefsConnectionWidget.py
===================================================================
--- trunk/fclient/src/fclient/impl/PrefsConnectionWidget.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/PrefsConnectionWidget.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -9,7 +9,7 @@
#******************************************************************************
from __future__ import absolute_import
-if __name__ == '__main__': # see --> http://bugs.python.org/issue1510172 . works only current dir and below
+if __name__ == '__main__': # see --> http://bugs.Fc.org/issue1510172 . works only current dir and below
import os; __path__ = [os.path.dirname(__file__)]
@@ -35,7 +35,7 @@
QtGui.QWidget.__init__(self, parent)
self.setupUi(self)
- self.setWindowTitle(config.FclientAppName + self.trUtf8(' - Connection expert settings'))
+ self.setWindowTitle(config.FcAppName + self.trUtf8(' - Connection expert settings'))
self.fcSettingsControler = None
#
Modified: trunk/fclient/src/fclient/impl/PrefsGlobal.py
===================================================================
--- trunk/fclient/src/fclient/impl/PrefsGlobal.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/PrefsGlobal.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -1,6 +1,6 @@
from __future__ import absolute_import
-if __name__ == '__main__': # see --> http://bugs.python.org/issue1510172 . works only current dir and below
+if __name__ == '__main__': # see --> http://bugs.python.org/Fc1510172 . works only current dir and below
import os; __path__ = [os.path.dirname(__file__)]
@@ -73,7 +73,7 @@
ed = self.controlById(self.IdEdSettingsDir)
directory = QtGui.QFileDialog.getExistingDirectory(
self,
- config.FclientAppName + self.trUtf8(' - Select settings directory..'),
+ config.FcAppName + self.trUtf8(' - Select settings directory..'),
ed.text(),
)
if directory:
@@ -83,7 +83,7 @@
ed = self.controlById(self.IdEdDownloadDir)
directory = QtGui.QFileDialog.getExistingDirectory(
self,
- config.FclientAppName + self.trUtf8(' - Select download directory..'),
+ config.FcAppName + self.trUtf8(' - Select download directory..'),
ed.text(),
)
if directory:
Modified: trunk/fclient/src/fclient/impl/ViewBrowser.py
===================================================================
--- trunk/fclient/src/fclient/impl/ViewBrowser.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/ViewBrowser.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -33,6 +33,7 @@
if __name__ == '__main__': # see --> http://bugs.python.org/issue1510172 . works only current dir and below
import os; __path__ = [os.path.dirname(__file__)]
+import os
from PyQt4 import QtCore, QtGui, QtWebKit
from . import config
@@ -316,7 +317,7 @@
text=self.trUtf8('Back'),
trigger=None,
isEnabled=False,
- icon=config.resources.getIcon('back', iconSize, iconTheme=iconTheme),
+ icon=config.fcResources.getIcon('back', iconSize, iconTheme=iconTheme),
userData=(None, None),
)
self.action(
@@ -324,7 +325,7 @@
text=self.trUtf8('Forward'),
trigger=None,
isEnabled=False,
- icon=config.resources.getIcon('forward', iconSize, iconTheme=iconTheme),
+ icon=config.fcResources.getIcon('forward', iconSize, iconTheme=iconTheme),
userData=(None, None),
)
self.action(
@@ -332,7 +333,7 @@
text=self.trUtf8('Reload'),
trigger=None,
isEnabled=False,
- icon=config.resources.getIcon('reload_page', iconSize, iconTheme=iconTheme),
+ icon=config.fcResources.getIcon('reload_page', iconSize, iconTheme=iconTheme),
userData=(None, None),
)
self.action(
@@ -340,14 +341,14 @@
text=self.trUtf8('Stop'),
trigger=None,
isEnabled=False,
- icon=config.resources.getIcon('stop', iconSize, iconTheme=iconTheme),
+ icon=config.fcResources.getIcon('stop', iconSize, iconTheme=iconTheme),
userData=(None, None),
)
self.action(
name='ActionBackIsClose',
text=self.trUtf8('Back is close'),
- icon=config.resources.getIcon('button_cancel', iconSize, iconTheme=iconTheme),
+ icon=config.fcResources.getIcon('button_cancel', iconSize, iconTheme=iconTheme),
trigger=None,
)
@@ -513,8 +514,8 @@
# thow a dialog box at the user to select a filename
# ..qt seems to place the filename part as suggestion into the filename box. so try it
- caption = config.FclientAppName + self.trUtf8(' - Save Image To..')
- directory = unicode(config.settings.value('DownloadDir'))
+ caption = config.FcAppName + self.trUtf8(' - Save Image To..')
+ directory = unicode(config.fcSettings.value('DownloadDir'))
fileName = unicode(config.guessFileNameFromKey(key, default=QtCore.QString('')))
if directory and fileName:
Modified: trunk/fclient/src/fclient/impl/ViewConnection.py
===================================================================
--- trunk/fclient/src/fclient/impl/ViewConnection.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/ViewConnection.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -66,7 +66,7 @@
_key_ = config.IdViewConnectionWidget
_settings_ = (
('FcpAutoConnect', 'Bool', True, config.SettingScopeUser),
- ('FcpConnectionName', 'String', config.FclientConnectionName, config.SettingScopeExpert),
+ ('FcpConnectionName', 'String', config.FcConnectionName, config.SettingScopeExpert),
('FcpConnectionHost', 'String', fcp2.Client.DefaultFcpHost, config.SettingScopeUser),
('FcpConnectionPort', 'UInt', fcp2.Client.DefaultFcpPort, config.SettingScopeUser),
('FcpConnectionTimerTimeout', 'UInt', 500, config.SettingScopeExpert),
Modified: trunk/fclient/src/fclient/impl/ViewDownloads.py
===================================================================
--- trunk/fclient/src/fclient/impl/ViewDownloads.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/ViewDownloads.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -319,7 +319,7 @@
# for testing: dl some frost.zip
key = fcp2.Key('CHK@tJ0qyIr8dwvYKoSkmR1N-soABstL0RjgiYqQm3Gtv8g,Pqj7jpPUBzRgnVTaA3fEw6gE8QHcJsTwA4liL9FZ-Fg,AAIC--8/frost-04-Mar-2008.zip')
fileName = config.guessFileNameFromKey(key, default=self.trUtf8('Unknown.file'))
- directory = config.settings.value('DownloadDir')
+ directory = config.fcSettings.value('DownloadDir')
fpath = os.path.join(unicode(directory), unicode(fileName))
self.downloadFile(key, fpath)
Modified: trunk/fclient/src/fclient/impl/config.py
===================================================================
--- trunk/fclient/src/fclient/impl/config.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/config.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -13,23 +13,23 @@
#**********************************************************************************
#
#**********************************************************************************
-FclientOrgName = 'fclient'
-FclientAppName = 'fclient'
-FclientVersion = '0.1.0'
-FclientAuthor = 'Juergen Urner'
-FclientLicence = 'MIT'
-FclientCopyright = '(c) 2008 Juergen Urner'
-FclientHomepage = 'http://fclient.sourceforge.net/'
-FclientConnectionName = QtCore.QString(FclientAppName + '{08625b10-2b44-4689-b1bf-8baf208b9641}')
+FcOrgName = 'fclient'
+FcAppName = 'fclient'
+FcVersion = '0.1.0'
+FcAuthor = 'Juergen Urner'
+FcLicence = 'MIT'
+FcCopyright = '(c) 2008 Juergen Urner'
+FcHomepage = 'http://fclient.sourceforge.net/'
+FcConnectionName = QtCore.QString(FcAppName + '{08625b10-2b44-4689-b1bf-8baf208b9641}')
_implDir = os.path.dirname(os.path.abspath(__file__))
_fclientDir = os.path.dirname(_implDir)
-FclientImplDir = QtCore.QString(_implDir)
-FclientDir = QtCore.QString(_fclientDir)
-FclientDocDir = QtCore.QString(os.path.join(_fclientDir, 'doc'))
-FclientDownloadDir = QtCore.QString(os.path.join(_fclientDir, 'downloads'))
-FclientResDir = QtCore.QString(os.path.join(_implDir, 'res'))
-FclientSettingsDir = QtCore.QString(os.path.join(_fclientDir, 'settings'))
+FcImplDir = QtCore.QString(_implDir)
+FcDir = QtCore.QString(_fclientDir)
+FcDocDir = QtCore.QString(os.path.join(_fclientDir, 'doc'))
+FcDownloadDir = QtCore.QString(os.path.join(_fclientDir, 'downloads'))
+FcResDir = QtCore.QString(os.path.join(_implDir, 'res'))
+FcSettingsDir = QtCore.QString(os.path.join(_fclientDir, 'settings'))
del _implDir, _fclientDir
#**********************************************************************************
# looks like QObject.findChild() does not always work. docs mention troubles
@@ -93,7 +93,7 @@
scope = QtCore.QSettings.SystemScope
if self._config_settings_.value('SettingsAllUsers'):
scope = QtCore.QSettings.UserScope
- settings = QtCore.QSettings(format, scope, FclientOrgName, FclientAppName, self.parent())
+ settings = QtCore.QSettings(format, scope, FcOrgName, FcAppName, self.parent())
settings.setFallbacksEnabled(False)
return settings
@@ -101,10 +101,10 @@
class Settings(SettingsBase):
_key_ = 'ConfigSettings'
_settings_ = (
- ('SettingsDir', 'String', QtCore.QString(FclientSettingsDir), SettingScopeUser), # if not None, settings are stored locally in the app folder
+ ('SettingsDir', 'String', QtCore.QString(FcSettingsDir), SettingScopeUser), # if not None, settings are stored locally in the app folder
('SettingsAllUsers', 'Bool', False, SettingScopeUser), # store settings for all users?
- ('IconTheme', 'String', 'crystal', SettingScopeUser),
- ('DownloadDir', 'String', FclientDownloadDir, SettingScopeUser),
+ ('IconTheme', 'String', 'crystal', SettingScopeUser), #TODO: global icon theme?
+ ('DownloadDir', 'String', FcDownloadDir, SettingScopeUser),
)
SettingsBase._config_settings_ = Settings()
@@ -112,8 +112,8 @@
#
#**********************************************************************************
fcpClient = fcp2.Client() # global fcp client
-settings = Settings(None).restore() # global settings class
-resources = resources.Resources([FclientResDir, ], ) # access to global resources
+fcSettings = Settings(None).restore() # global settings class
+fcResources = resources.Resources([FcResDir, ], ) # access to global resources
#**********************************************************************************
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jU...@us...> - 2008-07-31 16:42:47
|
Revision: 833
http://fclient.svn.sourceforge.net/fclient/?rev=833&view=rev
Author: jUrner
Date: 2008-07-31 16:42:53 +0000 (Thu, 31 Jul 2008)
Log Message:
-----------
let css do the job of styling
Modified Paths:
--------------
trunk/fclient/src/fclient/impl/res/stylesheets/default.css
trunk/fclient/src/fclient/impl/tpls/DlgDownloadKeyToDiskTpl.ui
trunk/fclient/src/fclient/impl/tpls/DlgPropsBrowserObjectTpl.ui
trunk/fclient/src/fclient/impl/tpls/DlgSingleAppErrorTpl.ui
trunk/fclient/src/fclient/impl/tpls/PrefsSingleAppTpl.ui
trunk/fclient/src/fclient/impl/tpls/Ui_DlgDownloadKeyToDiskTpl.py
trunk/fclient/src/fclient/impl/tpls/Ui_DlgPropsBrowserObjectTpl.py
trunk/fclient/src/fclient/impl/tpls/Ui_DlgSingleAppErrorTpl.py
trunk/fclient/src/fclient/impl/tpls/Ui_PrefsSingleAppTpl.py
Modified: trunk/fclient/src/fclient/impl/res/stylesheets/default.css
===================================================================
--- trunk/fclient/src/fclient/impl/res/stylesheets/default.css 2008-07-31 16:41:55 UTC (rev 832)
+++ trunk/fclient/src/fclient/impl/res/stylesheets/default.css 2008-07-31 16:42:53 UTC (rev 833)
@@ -1,2 +1,27 @@
-/* fclient default stylesheet */
+/***********************************************************************************************
+fclient default stylesheet
+
+Notes:
+----------
+x. multiple widgets of the same Css class should follow QTDesigners naming convention..
+
+ myObjectName
+ myObjectName_2
+ myObjectName_3
+ (..)
+
+**********************************************************************************************/
+
+/* style for "Name: | |" labels. for example "Host: |9999|" */
+QLabel#fieldName,
+QLabel#fieldName_2,
+QLabel#fieldName_3,
+QLabel#fieldName_4,
+QLabel#fieldName_5,
+QLabel#fieldName_6,
+QLabel#fieldName_7,
+QLabel#fieldName_8,
+QLabel#fieldName_9{
+ font: bold;
+ }
\ No newline at end of file
Modified: trunk/fclient/src/fclient/impl/tpls/DlgDownloadKeyToDiskTpl.ui
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/DlgDownloadKeyToDiskTpl.ui 2008-07-31 16:41:55 UTC (rev 832)
+++ trunk/fclient/src/fclient/impl/tpls/DlgDownloadKeyToDiskTpl.ui 2008-07-31 16:42:53 UTC (rev 833)
@@ -16,9 +16,9 @@
<item row="0" column="0" >
<layout class="QVBoxLayout" name="verticalLayout" >
<item>
- <widget class="QLabel" name="label" >
+ <widget class="QLabel" name="fieldName" >
<property name="text" >
- <string><b>Key:</b></string>
+ <string>Key:</string>
</property>
</widget>
</item>
@@ -30,9 +30,9 @@
</widget>
</item>
<item>
- <widget class="QLabel" name="label_3" >
+ <widget class="QLabel" name="fieldName_2" >
<property name="text" >
- <string><b>File name:</b></string>
+ <string>File name:</string>
</property>
</widget>
</item>
@@ -40,9 +40,9 @@
<widget class="QLineEdit" name="edFileName" />
</item>
<item>
- <widget class="QLabel" name="label_2" >
+ <widget class="QLabel" name="fieldName_3" >
<property name="text" >
- <string><b>Directory:</b></string>
+ <string>Directory:</string>
</property>
</widget>
</item>
Modified: trunk/fclient/src/fclient/impl/tpls/DlgPropsBrowserObjectTpl.ui
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/DlgPropsBrowserObjectTpl.ui 2008-07-31 16:41:55 UTC (rev 832)
+++ trunk/fclient/src/fclient/impl/tpls/DlgPropsBrowserObjectTpl.ui 2008-07-31 16:42:53 UTC (rev 833)
@@ -16,7 +16,7 @@
<item row="0" column="0" >
<layout class="QVBoxLayout" name="verticalLayout" >
<item>
- <widget class="QLabel" name="label" >
+ <widget class="QLabel" name="fieldName" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
<horstretch>0</horstretch>
@@ -24,7 +24,7 @@
</sizepolicy>
</property>
<property name="text" >
- <string><b>Type:</b></string>
+ <string>Type:</string>
</property>
<property name="alignment" >
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
@@ -48,7 +48,7 @@
</widget>
</item>
<item>
- <widget class="QLabel" name="label_2" >
+ <widget class="QLabel" name="fieldName_2" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
<horstretch>0</horstretch>
@@ -56,7 +56,7 @@
</sizepolicy>
</property>
<property name="text" >
- <string><b>Title:</b></string>
+ <string>Title:</string>
</property>
<property name="alignment" >
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
@@ -80,7 +80,7 @@
</widget>
</item>
<item>
- <widget class="QLabel" name="label_99" >
+ <widget class="QLabel" name="fieldName_3" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
<horstretch>0</horstretch>
@@ -88,7 +88,7 @@
</sizepolicy>
</property>
<property name="text" >
- <string><b>Name:</b></string>
+ <string>Name:</string>
</property>
<property name="alignment" >
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
@@ -112,7 +112,7 @@
</widget>
</item>
<item>
- <widget class="QLabel" name="label_4" >
+ <widget class="QLabel" name="fieldName_4" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
<horstretch>0</horstretch>
@@ -120,7 +120,7 @@
</sizepolicy>
</property>
<property name="text" >
- <string><b>LinkUrl:</b></string>
+ <string>LinkUrl:</string>
</property>
<property name="alignment" >
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
@@ -144,7 +144,7 @@
</widget>
</item>
<item>
- <widget class="QLabel" name="label_5" >
+ <widget class="QLabel" name="fieldName_5" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
<horstretch>0</horstretch>
@@ -152,7 +152,7 @@
</sizepolicy>
</property>
<property name="text" >
- <string><b>ImageUrl:</b></string>
+ <string>ImageUrl:</string>
</property>
<property name="alignment" >
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
Modified: trunk/fclient/src/fclient/impl/tpls/DlgSingleAppErrorTpl.ui
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/DlgSingleAppErrorTpl.ui 2008-07-31 16:41:55 UTC (rev 832)
+++ trunk/fclient/src/fclient/impl/tpls/DlgSingleAppErrorTpl.ui 2008-07-31 16:42:53 UTC (rev 833)
@@ -13,20 +13,37 @@
<string>Dialog</string>
</property>
<layout class="QGridLayout" name="gridLayout" >
+ <item row="1" column="0" >
+ <widget class="Line" name="line" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
<item row="0" column="0" >
<widget class="QSplitter" name="splitter" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<widget class="QTextEdit" name="textEdit" />
- <widget class="QWidget" name="" >
+ <widget class="QWidget" name="layoutWidget" >
<layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
<layout class="QVBoxLayout" name="verticalLayout" >
<item>
- <widget class="QLabel" name="label" >
+ <widget class="QLabel" name="fieldName" >
<property name="text" >
- <string><b>Host: </b></string>
+ <string>Host: </string>
</property>
</widget>
</item>
@@ -34,9 +51,9 @@
<widget class="QLineEdit" name="edHost" />
</item>
<item>
- <widget class="QLabel" name="label_3" >
+ <widget class="QLabel" name="fieldName_2" >
<property name="text" >
- <string><b>Port: </b></string>
+ <string>Port: </string>
</property>
</widget>
</item>
@@ -62,29 +79,9 @@
</widget>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="Line" name="line" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons" >
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
</layout>
- <zorder>textEdit</zorder>
<zorder>line</zorder>
<zorder>buttonBox</zorder>
- <zorder>textEdit</zorder>
- <zorder>textEdit</zorder>
<zorder>splitter</zorder>
</widget>
<resources/>
Modified: trunk/fclient/src/fclient/impl/tpls/PrefsSingleAppTpl.ui
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/PrefsSingleAppTpl.ui 2008-07-31 16:41:55 UTC (rev 832)
+++ trunk/fclient/src/fclient/impl/tpls/PrefsSingleAppTpl.ui 2008-07-31 16:42:53 UTC (rev 833)
@@ -32,9 +32,9 @@
<item row="1" column="0" >
<layout class="QVBoxLayout" name="verticalLayout" >
<item>
- <widget class="QLabel" name="label_2" >
+ <widget class="QLabel" name="fieldName" >
<property name="text" >
- <string><b>Single application host: </b></string>
+ <string>Single application host: </string>
</property>
</widget>
</item>
@@ -42,9 +42,9 @@
<widget class="QLineEdit" name="edHost" />
</item>
<item>
- <widget class="QLabel" name="label_3" >
+ <widget class="QLabel" name="fieldName_2" >
<property name="text" >
- <string><b>Single application port: </b></string>
+ <string>Single application port: </string>
</property>
</widget>
</item>
Modified: trunk/fclient/src/fclient/impl/tpls/Ui_DlgDownloadKeyToDiskTpl.py
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/Ui_DlgDownloadKeyToDiskTpl.py 2008-07-31 16:41:55 UTC (rev 832)
+++ trunk/fclient/src/fclient/impl/tpls/Ui_DlgDownloadKeyToDiskTpl.py 2008-07-31 16:42:53 UTC (rev 833)
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file '/home/me/src/proj/fclient/trunk/fclient/src/fclient/impl/tpls/DlgDownloadKeyToDiskTpl.ui'
#
-# Created: Sun Jul 27 21:01:10 2008
+# Created: Thu Jul 31 18:23:06 2008
# by: PyQt4 UI code generator 4.4.3-snapshot-20080705
#
# WARNING! All changes made in this file will be lost!
@@ -17,22 +17,22 @@
self.gridLayout.setObjectName("gridLayout")
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
- self.label = QtGui.QLabel(DlgDownloadKeyToDisk)
- self.label.setObjectName("label")
- self.verticalLayout.addWidget(self.label)
+ self.fieldName = QtGui.QLabel(DlgDownloadKeyToDisk)
+ self.fieldName.setObjectName("fieldName")
+ self.verticalLayout.addWidget(self.fieldName)
self.edKey = QtGui.QLineEdit(DlgDownloadKeyToDisk)
self.edKey.setDragEnabled(True)
self.edKey.setObjectName("edKey")
self.verticalLayout.addWidget(self.edKey)
- self.label_3 = QtGui.QLabel(DlgDownloadKeyToDisk)
- self.label_3.setObjectName("label_3")
- self.verticalLayout.addWidget(self.label_3)
+ self.fieldName_2 = QtGui.QLabel(DlgDownloadKeyToDisk)
+ self.fieldName_2.setObjectName("fieldName_2")
+ self.verticalLayout.addWidget(self.fieldName_2)
self.edFileName = QtGui.QLineEdit(DlgDownloadKeyToDisk)
self.edFileName.setObjectName("edFileName")
self.verticalLayout.addWidget(self.edFileName)
- self.label_2 = QtGui.QLabel(DlgDownloadKeyToDisk)
- self.label_2.setObjectName("label_2")
- self.verticalLayout.addWidget(self.label_2)
+ self.fieldName_3 = QtGui.QLabel(DlgDownloadKeyToDisk)
+ self.fieldName_3.setObjectName("fieldName_3")
+ self.verticalLayout.addWidget(self.fieldName_3)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.edDirectory = QtGui.QLineEdit(DlgDownloadKeyToDisk)
@@ -64,9 +64,9 @@
def retranslateUi(self, DlgDownloadKeyToDisk):
DlgDownloadKeyToDisk.setWindowTitle(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "Dialog", None, QtGui.QApplication.UnicodeUTF8))
- self.label.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "<b>Key:</b>", None, QtGui.QApplication.UnicodeUTF8))
- self.label_3.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "<b>File name:</b>", None, QtGui.QApplication.UnicodeUTF8))
- self.label_2.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "<b>Directory:</b>", None, QtGui.QApplication.UnicodeUTF8))
+ self.fieldName.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "Key:", None, QtGui.QApplication.UnicodeUTF8))
+ self.fieldName_2.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "File name:", None, QtGui.QApplication.UnicodeUTF8))
+ self.fieldName_3.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "Directory:", None, QtGui.QApplication.UnicodeUTF8))
self.btChooseDirectory.setText(QtGui.QApplication.translate("DlgDownloadKeyToDisk", "...", None, QtGui.QApplication.UnicodeUTF8))
Modified: trunk/fclient/src/fclient/impl/tpls/Ui_DlgPropsBrowserObjectTpl.py
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/Ui_DlgPropsBrowserObjectTpl.py 2008-07-31 16:41:55 UTC (rev 832)
+++ trunk/fclient/src/fclient/impl/tpls/Ui_DlgPropsBrowserObjectTpl.py 2008-07-31 16:42:53 UTC (rev 833)
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
-# Form implementation generated from reading ui file '/home/me/src/proj/fclient/trunk/fclient/src/fclient/tpls/DlgPropsBrowserObjectTpl.ui'
+# Form implementation generated from reading ui file '/home/me/src/proj/fclient/trunk/fclient/src/fclient/impl/tpls/DlgPropsBrowserObjectTpl.ui'
#
-# Created: Fri Jul 25 21:08:39 2008
+# Created: Thu Jul 31 18:25:16 2008
# by: PyQt4 UI code generator 4.4.3-snapshot-20080705
#
# WARNING! All changes made in this file will be lost!
@@ -17,15 +17,15 @@
self.gridLayout.setObjectName("gridLayout")
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
- self.label = QtGui.QLabel(DlgPropsBrowserObject)
+ self.fieldName = QtGui.QLabel(DlgPropsBrowserObject)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
- self.label.setSizePolicy(sizePolicy)
- self.label.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
- self.label.setObjectName("label")
- self.verticalLayout.addWidget(self.label)
+ sizePolicy.setHeightForWidth(self.fieldName.sizePolicy().hasHeightForWidth())
+ self.fieldName.setSizePolicy(sizePolicy)
+ self.fieldName.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+ self.fieldName.setObjectName("fieldName")
+ self.verticalLayout.addWidget(self.fieldName)
self.labeType = QtGui.QLabel(DlgPropsBrowserObject)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
@@ -35,15 +35,15 @@
self.labeType.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
self.labeType.setObjectName("labeType")
self.verticalLayout.addWidget(self.labeType)
- self.label_2 = QtGui.QLabel(DlgPropsBrowserObject)
+ self.fieldName_2 = QtGui.QLabel(DlgPropsBrowserObject)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
- self.label_2.setSizePolicy(sizePolicy)
- self.label_2.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
- self.label_2.setObjectName("label_2")
- self.verticalLayout.addWidget(self.label_2)
+ sizePolicy.setHeightForWidth(self.fieldName_2.sizePolicy().hasHeightForWidth())
+ self.fieldName_2.setSizePolicy(sizePolicy)
+ self.fieldName_2.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+ self.fieldName_2.setObjectName("fieldName_2")
+ self.verticalLayout.addWidget(self.fieldName_2)
self.labelTitle = QtGui.QLabel(DlgPropsBrowserObject)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
@@ -53,15 +53,15 @@
self.labelTitle.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
self.labelTitle.setObjectName("labelTitle")
self.verticalLayout.addWidget(self.labelTitle)
- self.label_99 = QtGui.QLabel(DlgPropsBrowserObject)
+ self.fieldName_3 = QtGui.QLabel(DlgPropsBrowserObject)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.label_99.sizePolicy().hasHeightForWidth())
- self.label_99.setSizePolicy(sizePolicy)
- self.label_99.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
- self.label_99.setObjectName("label_99")
- self.verticalLayout.addWidget(self.label_99)
+ sizePolicy.setHeightForWidth(self.fieldName_3.sizePolicy().hasHeightForWidth())
+ self.fieldName_3.setSizePolicy(sizePolicy)
+ self.fieldName_3.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+ self.fieldName_3.setObjectName("fieldName_3")
+ self.verticalLayout.addWidget(self.fieldName_3)
self.labelName = QtGui.QLabel(DlgPropsBrowserObject)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
@@ -71,15 +71,15 @@
self.labelName.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
self.labelName.setObjectName("labelName")
self.verticalLayout.addWidget(self.labelName)
- self.label_4 = QtGui.QLabel(DlgPropsBrowserObject)
+ self.fieldName_4 = QtGui.QLabel(DlgPropsBrowserObject)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
- self.label_4.setSizePolicy(sizePolicy)
- self.label_4.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
- self.label_4.setObjectName("label_4")
- self.verticalLayout.addWidget(self.label_4)
+ sizePolicy.setHeightForWidth(self.fieldName_4.sizePolicy().hasHeightForWidth())
+ self.fieldName_4.setSizePolicy(sizePolicy)
+ self.fieldName_4.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+ self.fieldName_4.setObjectName("fieldName_4")
+ self.verticalLayout.addWidget(self.fieldName_4)
self.labelLinkUrl = QtGui.QLabel(DlgPropsBrowserObject)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
@@ -89,15 +89,15 @@
self.labelLinkUrl.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
self.labelLinkUrl.setObjectName("labelLinkUrl")
self.verticalLayout.addWidget(self.labelLinkUrl)
- self.label_5 = QtGui.QLabel(DlgPropsBrowserObject)
+ self.fieldName_5 = QtGui.QLabel(DlgPropsBrowserObject)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth())
- self.label_5.setSizePolicy(sizePolicy)
- self.label_5.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
- self.label_5.setObjectName("label_5")
- self.verticalLayout.addWidget(self.label_5)
+ sizePolicy.setHeightForWidth(self.fieldName_5.sizePolicy().hasHeightForWidth())
+ self.fieldName_5.setSizePolicy(sizePolicy)
+ self.fieldName_5.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+ self.fieldName_5.setObjectName("fieldName_5")
+ self.verticalLayout.addWidget(self.fieldName_5)
self.labelImageUrl = QtGui.QLabel(DlgPropsBrowserObject)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
@@ -128,15 +128,15 @@
def retranslateUi(self, DlgPropsBrowserObject):
DlgPropsBrowserObject.setWindowTitle(QtGui.QApplication.translate("DlgPropsBrowserObject", "Dialog", None, QtGui.QApplication.UnicodeUTF8))
- self.label.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "<b>Type:</b>", None, QtGui.QApplication.UnicodeUTF8))
+ self.fieldName.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "Type:", None, QtGui.QApplication.UnicodeUTF8))
self.labeType.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "unknown", None, QtGui.QApplication.UnicodeUTF8))
- self.label_2.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "<b>Title:</b>", None, QtGui.QApplication.UnicodeUTF8))
+ self.fieldName_2.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "Title:", None, QtGui.QApplication.UnicodeUTF8))
self.labelTitle.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "unknown", None, QtGui.QApplication.UnicodeUTF8))
- self.label_99.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "<b>Name:</b>", None, QtGui.QApplication.UnicodeUTF8))
+ self.fieldName_3.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "Name:", None, QtGui.QApplication.UnicodeUTF8))
self.labelName.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "unknown", None, QtGui.QApplication.UnicodeUTF8))
- self.label_4.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "<b>LinkUrl:</b>", None, QtGui.QApplication.UnicodeUTF8))
+ self.fieldName_4.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "LinkUrl:", None, QtGui.QApplication.UnicodeUTF8))
self.labelLinkUrl.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "unknown", None, QtGui.QApplication.UnicodeUTF8))
- self.label_5.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "<b>ImageUrl:</b>", None, QtGui.QApplication.UnicodeUTF8))
+ self.fieldName_5.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "ImageUrl:", None, QtGui.QApplication.UnicodeUTF8))
self.labelImageUrl.setText(QtGui.QApplication.translate("DlgPropsBrowserObject", "unknown", None, QtGui.QApplication.UnicodeUTF8))
Modified: trunk/fclient/src/fclient/impl/tpls/Ui_DlgSingleAppErrorTpl.py
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/Ui_DlgSingleAppErrorTpl.py 2008-07-31 16:41:55 UTC (rev 832)
+++ trunk/fclient/src/fclient/impl/tpls/Ui_DlgSingleAppErrorTpl.py 2008-07-31 16:42:53 UTC (rev 833)
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file '/home/me/src/proj/fclient/trunk/fclient/src/fclient/impl/tpls/DlgSingleAppErrorTpl.ui'
#
-# Created: Wed Jul 30 11:43:40 2008
+# Created: Thu Jul 31 18:26:22 2008
# by: PyQt4 UI code generator 4.4.3-snapshot-20080705
#
# WARNING! All changes made in this file will be lost!
@@ -15,43 +15,43 @@
DlgSingleAppError.resize(410, 277)
self.gridLayout = QtGui.QGridLayout(DlgSingleAppError)
self.gridLayout.setObjectName("gridLayout")
+ self.line = QtGui.QFrame(DlgSingleAppError)
+ self.line.setFrameShape(QtGui.QFrame.HLine)
+ self.line.setFrameShadow(QtGui.QFrame.Sunken)
+ self.line.setObjectName("line")
+ self.gridLayout.addWidget(self.line, 1, 0, 1, 1)
+ self.buttonBox = QtGui.QDialogButtonBox(DlgSingleAppError)
+ self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
+ self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
+ self.buttonBox.setObjectName("buttonBox")
+ self.gridLayout.addWidget(self.buttonBox, 2, 0, 1, 1)
self.splitter = QtGui.QSplitter(DlgSingleAppError)
self.splitter.setOrientation(QtCore.Qt.Horizontal)
self.splitter.setObjectName("splitter")
self.textEdit = QtGui.QTextEdit(self.splitter)
self.textEdit.setObjectName("textEdit")
- self.widget = QtGui.QWidget(self.splitter)
- self.widget.setObjectName("widget")
- self.verticalLayout_2 = QtGui.QVBoxLayout(self.widget)
+ self.layoutWidget = QtGui.QWidget(self.splitter)
+ self.layoutWidget.setObjectName("layoutWidget")
+ self.verticalLayout_2 = QtGui.QVBoxLayout(self.layoutWidget)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
- self.label = QtGui.QLabel(self.widget)
- self.label.setObjectName("label")
- self.verticalLayout.addWidget(self.label)
- self.edHost = QtGui.QLineEdit(self.widget)
+ self.fieldName = QtGui.QLabel(self.layoutWidget)
+ self.fieldName.setObjectName("fieldName")
+ self.verticalLayout.addWidget(self.fieldName)
+ self.edHost = QtGui.QLineEdit(self.layoutWidget)
self.edHost.setObjectName("edHost")
self.verticalLayout.addWidget(self.edHost)
- self.label_3 = QtGui.QLabel(self.widget)
- self.label_3.setObjectName("label_3")
- self.verticalLayout.addWidget(self.label_3)
- self.spinPort = QtGui.QSpinBox(self.widget)
+ self.fieldName_2 = QtGui.QLabel(self.layoutWidget)
+ self.fieldName_2.setObjectName("fieldName_2")
+ self.verticalLayout.addWidget(self.fieldName_2)
+ self.spinPort = QtGui.QSpinBox(self.layoutWidget)
self.spinPort.setObjectName("spinPort")
self.verticalLayout.addWidget(self.spinPort)
self.verticalLayout_2.addLayout(self.verticalLayout)
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.verticalLayout_2.addItem(spacerItem)
self.gridLayout.addWidget(self.splitter, 0, 0, 1, 1)
- self.line = QtGui.QFrame(DlgSingleAppError)
- self.line.setFrameShape(QtGui.QFrame.HLine)
- self.line.setFrameShadow(QtGui.QFrame.Sunken)
- self.line.setObjectName("line")
- self.gridLayout.addWidget(self.line, 1, 0, 1, 1)
- self.buttonBox = QtGui.QDialogButtonBox(DlgSingleAppError)
- self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
- self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
- self.buttonBox.setObjectName("buttonBox")
- self.gridLayout.addWidget(self.buttonBox, 2, 0, 1, 1)
self.retranslateUi(DlgSingleAppError)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), DlgSingleAppError.accept)
@@ -60,8 +60,8 @@
def retranslateUi(self, DlgSingleAppError):
DlgSingleAppError.setWindowTitle(QtGui.QApplication.translate("DlgSingleAppError", "Dialog", None, QtGui.QApplication.UnicodeUTF8))
- self.label.setText(QtGui.QApplication.translate("DlgSingleAppError", "<b>Host: </b>", None, QtGui.QApplication.UnicodeUTF8))
- self.label_3.setText(QtGui.QApplication.translate("DlgSingleAppError", "<b>Port: </b>", None, QtGui.QApplication.UnicodeUTF8))
+ self.fieldName.setText(QtGui.QApplication.translate("DlgSingleAppError", "Host: ", None, QtGui.QApplication.UnicodeUTF8))
+ self.fieldName_2.setText(QtGui.QApplication.translate("DlgSingleAppError", "Port: ", None, QtGui.QApplication.UnicodeUTF8))
if __name__ == "__main__":
Modified: trunk/fclient/src/fclient/impl/tpls/Ui_PrefsSingleAppTpl.py
===================================================================
--- trunk/fclient/src/fclient/impl/tpls/Ui_PrefsSingleAppTpl.py 2008-07-31 16:41:55 UTC (rev 832)
+++ trunk/fclient/src/fclient/impl/tpls/Ui_PrefsSingleAppTpl.py 2008-07-31 16:42:53 UTC (rev 833)
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file '/home/me/src/proj/fclient/trunk/fclient/src/fclient/impl/tpls/PrefsSingleAppTpl.ui'
#
-# Created: Wed J...
[truncated message content] |