SF.net SVN: fclient: [582] trunk/fclient/src/fclient/Ui_ViewConnection.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-07-11 19:42:16
|
Revision: 582
http://fclient.svn.sourceforge.net/fclient/?rev=582&view=rev
Author: jUrner
Date: 2008-07-11 12:42:24 -0700 (Fri, 11 Jul 2008)
Log Message:
-----------
after 4 months of work. celebrate. the node is alive /houston
Modified Paths:
--------------
trunk/fclient/src/fclient/Ui_ViewConnection.py
Modified: trunk/fclient/src/fclient/Ui_ViewConnection.py
===================================================================
--- trunk/fclient/src/fclient/Ui_ViewConnection.py 2008-07-11 19:37:10 UTC (rev 581)
+++ trunk/fclient/src/fclient/Ui_ViewConnection.py 2008-07-11 19:42:24 UTC (rev 582)
@@ -96,10 +96,47 @@
bt = self.controlById(self.IdBtConnect)
if checked:
bt.setText(QtGui.QApplication.translate("ViewConnectionWidget", "Disconnect", None, QtGui.QApplication.UnicodeUTF8))
+
+ if config.fcpClient.isConnected():
+ config.fcpClient.close()
+ t = self.ConnectTimer(self)
+
else:
bt.setText(QtGui.QApplication.translate("ViewConnectionWidget", "Connect", None, QtGui.QApplication.UnicodeUTF8))
-
-
+ config.fcpClient.close()
+
+ #TODO: under construction!
+ class ConnectTimer(QtCore.QTimer):
+
+ def __init__(self,parent):
+ QtCore.QTimer.__init__(self, parent)
+ #self.setInterval(10)
+ self.connect(self, QtCore.SIGNAL('timeout()'), self.handleNext)
+
+ self.iterConnect = config.fcpClient.iterConnect() # ...more args
+ self.start(10)
+
+ def handleNext(self):
+ try:
+ result = self.iterConnect.next()
+ except StopIteration:
+ self.stop()
+ else:
+ if result is not None:
+ self.stop()
+
+
+
+
+
+
+
+
+ def handleFoo(self):
+ pass
+
+
+
#**********************************************************************************
#
#**********************************************************************************
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|