예제 #1
0
	def saveFile(self):
		global dict
		if self.canvas.ui != None: self.canvas.ui.close()
		s = QtGui.QFileDialog.getSaveFileName (self, "Select output file", os.environ['HOME'], "*.xml")
		if len(s) > 0:
			for c1 in self.compConfig:
				for c2 in self.canvas.compList:
					if c1.alias == c2.name:
						c1.x = c2.x
						c1.y = c2.y
						c1.r = c2.r
			rcmanagerConfig.writeConfigToFile(dict, self.compConfig, s)
예제 #2
0
	def saveFile(self):
		global dict
		if self.canvas.ui != None: self.canvas.ui.close()
		s = QtGui.QFileDialog.getSaveFileName (self, "Select output file", os.environ['HOME'], "*.xml")
		if len(s) > 0:
			for c1 in self.compConfig:
				for c2 in self.canvas.compList:
					if c1.alias == c2.name:
						c1.x = c2.x
						c1.y = c2.y
						c1.r = c2.r
			rcmanagerConfig.writeConfigToFile(dict, self.compConfig, s)
예제 #3
0
    def write(self):
        global dict
        s = QtGui.QFileDialog.getSaveFileName(self, "Save file", os.environ["HOME"], "*.xml")
        self.compConfig = []

        print self.ui.table.rowCount()
        for row in range(self.ui.table.rowCount()):
            comp = rcmanagerConfig.CompInfo()
            comp.alias = str(self.ui.table.item(row, 0).text())
            comp.dependences = []
            l = str(self.ui.table.item(row, 1).text()).split(",")
            for dep in l:
                if len(dep) > 0:
                    comp.dependences.append(dep)
            comp.endpoint = str(self.ui.table.item(row, 2).text())
            comp.workingdir = str(self.ui.table.item(row, 3).text())
            comp.compup = str(self.ui.table.item(row, 4).text())
            comp.compdown = str(self.ui.table.item(row, 5).text())
            comp.configFile = str(self.ui.table.item(row, 6).text())
            self.compConfig.append(comp)

        rcmanagerConfig.writeConfigToFile(self.dict, self.compConfig, s)
예제 #4
0
	def write(self):
		global dict
		s = QtGui.QFileDialog.getSaveFileName (self, "Save file", os.environ["HOME"], "*.xml")
		self.compConfig = []

		print self.ui.table.rowCount()
		for row in range(self.ui.table.rowCount()):
			comp = rcmanagerConfig.CompInfo()
			comp.alias = str(self.ui.table.item(row, 0).text())
			comp.dependences = []
			l = str(self.ui.table.item(row, 1).text()).split(',')
			for dep in l:
				if len(dep) > 0:
					comp.dependences.append(dep)
			comp.endpoint = str(self.ui.table.item(row, 2).text())
			comp.workingdir = str(self.ui.table.item(row, 3).text())
			comp.compup = str(self.ui.table.item(row, 4).text())
			comp.compdown = str(self.ui.table.item(row, 5).text())
			comp.configFile = str(self.ui.table.item(row, 6).text())
			self.compConfig.append(comp)

		rcmanagerConfig.writeConfigToFile(self.dict, self.compConfig, s)