SF.net SVN: fclient:[662] trunk/fclient/src/fclient/Ui_ViewConnection.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-07-17 16:06:24
|
Revision: 662
http://fclient.svn.sourceforge.net/fclient/?rev=662&view=rev
Author: jUrner
Date: 2008-07-17 16:06:23 +0000 (Thu, 17 Jul 2008)
Log Message:
-----------
naming ++ this and that
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-17 16:04:41 UTC (rev 661)
+++ trunk/fclient/src/fclient/Ui_ViewConnection.py 2008-07-17 16:06:23 UTC (rev 662)
@@ -27,7 +27,7 @@
# menus
self.menus = []
if self.menuBar is not None:
- menu = QtGui.QMenu(parent.fclientViewObject.displayName, self.menuBar)
+ menu = QtGui.QMenu(parent.fcViewObject.displayName, self.menuBar)
parent.populateMenu(menu)
self.menus.append(menu)
self.menuBar.addViewMenu(menu)
@@ -75,17 +75,17 @@
def __init__(self,parent):
QtCore.QTimer.__init__(self, parent)
self.fcpIterConnect = None
- self.connect(self, QtCore.SIGNAL('timeout()'), self.handleNext)
+ self.connect(self, QtCore.SIGNAL('timeout()'), self.onNext)
def start(self, settings):
self.fcpIterConnect = config.fcpClient.iterConnect(
duration=settings.value('ConnectionTimerMaxDuration'),
timeout=0
)
- if not self.handleNext():
+ if not self.onNext():
QtCore.QTimer.start(self, settings.value('ConnectionTimerTimeout'))
- def handleNext(self):
+ def onNext(self):
try:
result = self.fcpIterConnect.next()
except StopIteration:
@@ -105,12 +105,12 @@
def __init__(self,parent):
QtCore.QTimer.__init__(self, parent)
- self.connect(self, QtCore.SIGNAL('timeout()'), self.handleNext)
+ self.connect(self, QtCore.SIGNAL('timeout()'), self.onNext)
def start(self, settings):
QtCore.QTimer.start(self, settings.value('PollTimerTimeout'))
- def handleNext(self):
+ def onNext(self):
if config.fcpClient.isConnected():
result = config.fcpClient.next()
@@ -130,20 +130,20 @@
self._isCreated = False
self._connectionTimer = ConnectionTimer(self)
self._pollTimer = PollTimer(self)
- self._fcpEventHandlers = (
- (config.fcpClient.events.ClientConnected, self.handleFcpClientConected),
- (config.fcpClient.events.ClientDisconnected, self.handleFcpClientDisconected),
+ self._fcpEventonrs = (
+ (config.fcpClient.events.ClientConnected, self.onFcpClientConected),
+ (config.fcpClient.events.ClientDisconnected, self.onFcpClientDisconected),
)
- config.fcpClient.events += self._fcpEventHandlers
+ config.fcpClient.events += self._fcpEventonrs
self._mainWindowMenus = ()
self.setupUi(self)
config.ObjectRegistry.register(self)
- self.fclientSettings = Settings().restore()
- self.fclientActions = Actions(self)
- self.fclientViewObject = ConnectionViewObject(self)
- self.fclientGlobalFeedback = GlobalFeedback(self, idFeedbackParent)
+ self.fcSettings = Settings().restore()
+ self.fcActions = Actions(self)
+ self.fcViewObject = ConnectionViewObject(self)
+ self.fcGlobalFeedback = GlobalFeedback(self, idFeedbackParent)
@@ -161,7 +161,7 @@
## view methods
#########################################
def viewClose(self):
- config.fcpClient.events -= self._fcpEventHandlers
+ config.fcpClient.events -= self._fcpEventonrs
#########################################
## overwritten events
@@ -170,31 +170,31 @@
self.viewClose()
def hideEvent(self, event):
- self.fclientGlobalFeedback.setVisible(False)
+ self.fcGlobalFeedback.setVisible(False)
def showEvent(self, event):
- self.fclientGlobalFeedback.setVisible(True)
+ self.fcGlobalFeedback.setVisible(True)
if self._isCreated:
return
self._isCreated = True
# setup host / port boxes
edHost = self.controlById(self.IdEdConnectionHost)
- edHost.setText(self.fclientSettings.value('ConnectionHost'))
+ edHost.setText(self.fcSettings.value('ConnectionHost'))
spinPort = self.controlById(self.IdSpinConnectionPort)
spinPort.setRange(0, 0xFFFF) #TODO: no idea if port range (0, 0xFFFF) this is reasonable
- spinPort.setValue(self.fclientSettings.value('ConnectionPort'))
+ spinPort.setValue(self.fcSettings.value('ConnectionPort'))
# setup Connect button and AutoConnect checkbox
- doAutoConnect = self.fclientSettings.value('AutoConnect')
+ doAutoConnect = self.fcSettings.value('AutoConnect')
ck = self.controlById(self.IdckAutoConnect)
ck.setChecked(doAutoConnect)
- self.connect(ck, QtCore.SIGNAL('stateChanged(int)'), self.handleCkAutoConnectStateChanged)
+ self.connect(ck, QtCore.SIGNAL('stateChanged(int)'), self.onCkAutoConnectStateChanged)
bt = self.controlById(self.IdBtConnect)
- self.connect(bt, QtCore.SIGNAL('clicked(bool)'), self.handleBtConnectClicked)
+ self.connect(bt, QtCore.SIGNAL('clicked(bool)'), self.onBtConnectClicked)
if doAutoConnect:
self.controlById(self.IdBtConnect).click()
@@ -208,15 +208,15 @@
#########################################
- ## event handlers
+ ## event onrs
#########################################
- def handleBtConnectClicked(self, isChecked):
+ def onBtConnectClicked(self, isChecked):
bt = self.controlById(self.IdBtConnect)
bt.setText(self.trUtf8('Disconnect') if isChecked else self.trUtf8('Connect'))
if isChecked:
if config.fcpClient.isConnected():
config.fcpClient.close()
- self._connectionTimer.start(self.fclientSettings)
+ self._connectionTimer.start(self.fcSettings)
else:
self._connectionTimer.stop()
if config.fcpClient.isConnected():
@@ -224,19 +224,19 @@
config.fcpClient.close()
- def handleCkAutoConnectStateChanged(self, state):
- self.fclientSettings.setValues(AutoConnect=state == QtCore.Qt.Checked)
+ def onCkAutoConnectStateChanged(self, state):
+ self.fcSettings.setValues(AutoConnect=state == QtCore.Qt.Checked)
#########################################
- ## fcp event handlers
+ ## fcp event onrs
#########################################
- def handleFcpClientDisconected(self, event, msg):
+ def onFcpClientDisconected(self, event, msg):
bt = self.controlById(self.IdBtConnect)
if bt.isChecked():
bt.click()
- def handleFcpClientConected(self, event, msg):
- self._pollTimer.start(self.fclientSettings)
+ def onFcpClientConected(self, event, msg):
+ self._pollTimer.start(self.fcSettings)
#**********************************************************************************
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|