SF.net SVN: fclient:[855] trunk/fclient/fclient/impl/ViewConnection.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-08-02 10:06:43
|
Revision: 855
http://fclient.svn.sourceforge.net/fclient/?rev=855&view=rev
Author: jUrner
Date: 2008-08-02 10:06:52 +0000 (Sat, 02 Aug 2008)
Log Message:
-----------
more work on connection widget
Modified Paths:
--------------
trunk/fclient/fclient/impl/ViewConnection.py
Modified: trunk/fclient/fclient/impl/ViewConnection.py
===================================================================
--- trunk/fclient/fclient/impl/ViewConnection.py 2008-08-02 09:44:44 UTC (rev 854)
+++ trunk/fclient/fclient/impl/ViewConnection.py 2008-08-02 10:06:52 UTC (rev 855)
@@ -1,13 +1,9 @@
#*********************************************************************
#TODO:
-# x. setting fcp connection params currently won't reset connection. how to handle?
+# x. setting fcp/fproxy connection params currently won't reset connection. how to handle?
#
#
#*********************************************************************
-
-
-
-#*********************************************************************
#NOTES:
#
# current handling is:
@@ -127,6 +123,8 @@
def start(self, settings):
config.fcpClient.setConnectionName(settings.value('FcpConnectionName'))
self.fcpIterConnect = config.fcpClient.iterConnect(
+ host=settings.value('FcpConnectionHost'),
+ port=settings.value('FcpConnectionPort'),
duration=settings.value('FcpConnectionTimerMaxDuration'),
timeout=0
)
@@ -179,7 +177,13 @@
def __init__(self, parent, idGlobalFeedback=config.IdMainWindow):
QtGui.QWidget.__init__(self, parent)
self.setupUi(self)
-
+
+ # adjust spin box ranges
+ spinPort = self.controlById(self.IdFcpSpinFcpConnectionPort)
+ spinPort.setRange(0, 0xFFFF) #TODO: no idea if port range (0, 0xFFFF) this is reasonable
+ spinPort = self.controlById(self.IdFproxySpinConnectionPort)
+ spinPort.setRange(0, 0xFFFF) #TODO: no idea if port range (0, 0xFFFF) this is reasonable
+
self._isCreated = False
config.ObjectRegistry.register(self)
self.fcSettings = Settings(self).restore()
@@ -236,29 +240,21 @@
return
self._isCreated = True
-
-
- # setup fcp host / port / name
- edHost = self.controlById(self.IdEdFcpConnectionHost)
- self.connect(edHost, QtCore.SIGNAL('textChanged(const QString &)'), self.onEdFcpConnectionHostChanged)
-
- spinPort = self.controlById(self.IdFcpSpinFcpConnectionPort)
- spinPort.setRange(0, 0xFFFF) #TODO: no idea if port range (0, 0xFFFF) this is reasonable
- self.connect(spinPort, QtCore.SIGNAL('valueChanged(int)'), self.onSpinFcpConnectionPortChanged)
-
doAutoConnect = self.fcSettings.value('FcpAutoConnect')
ck = self.controlById(self.IdCkFcpAutoConnect)
ck.setChecked(doAutoConnect)
self.connect(ck, QtCore.SIGNAL('stateChanged(int)'), self.onCkFcpAutoConnectStateChanged)
+ spinPort = self.controlById(self.IdFcpSpinFcpConnectionPort)
+ self.connect(spinPort, QtCore.SIGNAL('valueChanged(int)'), self.onSpinFcpConnectionPortChanged)
+
+ spinPort = self.controlById(self.IdFproxySpinConnectionPort)
+ self.connect(spinPort, QtCore.SIGNAL('valueChanged(int)'), self.onSpinFproxyConnectionPortChanged)
+
# setup fproxy host / port
edHost = self.controlById(self.IdEdFproxyConnectionHost)
self.connect(edHost, QtCore.SIGNAL('textChanged(const QString &)'), self.onEdFproxyConnectionHostChanged)
- spinPort = self.controlById(self.IdFproxySpinConnectionPort)
- spinPort.setRange(0, 0xFFFF) #TODO: no idea if port range (0, 0xFFFF) this is reasonable
- self.connect(spinPort, QtCore.SIGNAL('valueChanged(int)'), self.onSpinFproxyConnectionPortChanged)
-
bt = self.controlById(self.IdBtConnect)
self.connect(bt, QtCore.SIGNAL('clicked(bool)'), self.onBtConnectClicked)
if doAutoConnect:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|