Ejemplo n.º 1
0
	def add_row(self,pos,name,top_btm,active,start,width,depth,voltage):

		pos= tab_insert_row(self.tab)

		self.tab.blockSignals(True)
		self.tab.setItem(pos,0,QTableWidgetItem(name))

		combobox = QComboBoxLang()
		combobox.addItemLang("top",_("top"))
		combobox.addItemLang("bottom",_("bottom"))

		self.tab.setCellWidget(pos,1, combobox)
		combobox.setValue_using_english(top_btm.lower())
		#combobox.setCurrentIndex(combobox.findText(top_btm.lower()))
		combobox.currentIndexChanged.connect(self.save)

		combobox = QComboBoxLang()
		combobox.addItemLang("true",_("true"))
		combobox.addItemLang("false",_("false"))

		self.tab.setCellWidget(pos,2, combobox)
		combobox.setValue_using_english(active.lower()) #setCurrentIndex(combobox.findText(active.lower()))
		combobox.currentIndexChanged.connect(self.save)
		
		self.tab.setItem(pos,3,QTableWidgetItem(start))
		self.tab.setItem(pos,4,QTableWidgetItem(width))
		self.tab.setItem(pos,5,QTableWidgetItem(depth))
		self.tab.setItem(pos,6,QTableWidgetItem(voltage))


		self.tab.blockSignals(False)
Ejemplo n.º 2
0
    def on_add_item_clicked(self):
        row = tab_insert_row(self.tab)

        self.add_row(row, "100e-9", "pcbm", "other", "none",
                     "layer" + str(row))
        self.save_model()
        #self.changed.emit()
        self.emit_change()
Ejemplo n.º 3
0
	def add_row(self,pos,start,width,depth,voltage,active):

		pos= tab_insert_row(self.tab)

		self.tab.blockSignals(True)

		self.tab.setItem(pos,0,QTableWidgetItem(start))
		self.tab.setItem(pos,1,QTableWidgetItem(width))
		self.tab.setItem(pos,2,QTableWidgetItem(depth))
		self.tab.setItem(pos,3,QTableWidgetItem(voltage))

		combobox = QComboBox()
		combobox.addItem(_("true"))
		combobox.addItem(_("false"))

		self.tab.setCellWidget(pos,4, combobox)
		combobox.setCurrentIndex(combobox.findText(active.lower()))
		combobox.currentIndexChanged.connect(self.save)
		self.tab.blockSignals(False)
Ejemplo n.º 4
0
 def callback_add_item(self):
     pos = tab_insert_row(self.tab)
     self.insert_row(pos, "true", _("File"), _("token"), _("path"), "1",
                     "0")
     self.save_combo()
Ejemplo n.º 5
0
	def callback_add_item_mm(self):
		pos=tab_insert_row(self.tab_mm)
		self.insert_row_mm(pos,_("File"),_("Token"),_("Path"),_("Function"),_("Max"),_("Min"),_("Error"))
		self.save_combo()
Ejemplo n.º 6
0
	def on_add_item_clicked(self):
		row=tab_insert_row(self.tab)

		self.add_row(row,"100e-9","pcbm","other","none","layer"+str(row))
		self.save_model()
		self.changed.emit()