コード例 #1
0
	def readConfig(self):
		self.canvas.initialize()
		self.ui.checkList.clear()
		self.compConfig = []
		self.back_comps = set()
		self.requests = set()

		newList, newDict = rcmanagerConfig.getConfigFromFile(self.configFile)

		for k, v in newDict.iteritems():
			dict[k] = v

		self.componentChecker.clear()
		for listItem in newList:
			item = QtGui.QListWidgetItem()
			item.setText(listItem.alias)
			self.ui.checkList.insertItem(0, item)
			self.compConfig.insert(0, listItem)
			self.componentChecker[listItem.alias] = ComponentChecker(listItem.endpoint)
			self.componentChecker[listItem.alias].runrun()

		self.log('Configuration loaded')

		n = rcmanagerConfig.unconnectedGroups(newList)
		if n > 1:
			msg = 'WARNING: ' + str(n) + ' unconnected component groups'
			self.log(msg)
			QtGui.QMessageBox.warning(self, 'Warning', msg)
		self.setFastState()
コード例 #2
0
ファイル: rcmanager.py プロジェクト: MehaKaushik/robocomp
	def readConfig(self):
		self.canvas.initialize()
		self.ui.checkList.clear()
		self.compConfig = []
		self.back_comps = set()
		self.requests = set()

		newList, newDict = rcmanagerConfig.getConfigFromFile(self.configFile)

		for k, v in newDict.iteritems():
			dict[k] = v

		self.componentChecker.reset()
		for listItem in newList:
			item = QtGui.QListWidgetItem()
			item.setText(listItem.alias)
			self.ui.checkList.insertItem(0, item)
			self.compConfig.insert(0, listItem)
			self.componentChecker.componentsToCheck[listItem.alias] = listItem.endpoint
		self.componentChecker.runrun()

		self.log('Configuration loaded')

		n = rcmanagerConfig.unconnectedGroups(newList)
		if n > 1:
			msg = 'WARNING: ' + str(n) + ' unconnected component groups'
			self.log(msg)
			QtGui.QMessageBox.warning(self, 'Warning', msg)
		self.setFastState()