コード例 #1
0
ファイル: lasers.py プロジェクト: roderickmackenzie/gpvdm
	def callback_delete_page(self):
		tab = self.notebook.currentWidget()
		response=yes_no_dlg(self,_("Should I remove the laser file ")+tab.tab_name)

		if response == True:
			inp_remove_file(tab.file_name)
			index=self.notebook.currentIndex() 
			self.notebook.removeTab(index)
コード例 #2
0
	def clean_dos_files(self):
		files=inp_lsdir()
		tab=[]
		for i in range(0,self.tab.rowCount()):
			tab.append(str(tab_get_value(self.tab,i, 4))+".inp")

		for i in range(0,len(files)):
			if files[i].startswith("dos") and files[i].endswith(".inp"):
				disk_file=files[i]
				if disk_file not in tab:
					inp_remove_file(disk_file)
コード例 #3
0
ファイル: layer_widget.py プロジェクト: xj361685640/gpvdm
    def clean_dos_files(self):
        files = inp_lsdir("sim.gpvdm")
        tab = []
        for i in range(0, self.tab.rowCount()):
            tab.append(str(tab_get_value(self.tab, i, 4)) + ".inp")

        for i in range(0, len(files)):
            if files[i].startswith("dos") and files[i].endswith(".inp"):
                disk_file = files[i]
                if disk_file not in tab:
                    inp_remove_file(disk_file)
コード例 #4
0
    def callback_delete_page(self):
        if self.notebook.count() > 1:
            tab = self.notebook.currentWidget()
            response = yes_no_dlg(
                self,
                _("Should I remove the laser file ") + tab.tab_name)

            if response == True:
                inp_remove_file(tab.file_name)
                index = self.notebook.currentIndex()
                self.notebook.removeTab(index)
コード例 #5
0
	def callback_delete_page(self):
		tab = self.notebook.currentWidget()

		response=yes_no_dlg(self,_("Should I remove the experiment file ")+tab.tab_name.split("@")[0])

		if response == True:
			inp_remove_file("fxdomain"+str(tab.index)+".inp")
			inp_remove_file("fxmesh"+str(tab.index)+".inp")
			index=self.notebook.currentIndex() 
			self.notebook.removeTab(index)
			self.changed.emit()
コード例 #6
0
    def callback_delete_page(self):

        tab = self.notebook.currentWidget()
        name = inp_get_token_value(tab.file_name, "#measure_name")

        response = yes_no_dlg(self,
                              _("Should I remove the measurment file ") + name)

        if response == True:
            inp_remove_file(os.path.join(get_sim_path(), tab.file_name))
            index = self.notebook.currentIndex()
            self.notebook.removeTab(index)
コード例 #7
0
ファイル: jvexperiment.py プロジェクト: xingangahu/gpvdm
    def callback_delete_page(self):

        tab = self.notebook.currentWidget()

        response = yes_no_dlg(
            self,
            _("Should I remove the experiment file ") +
            tab.tab_name.split("@")[0])

        if response == True:
            inp_remove_file(
                os.path.join(get_sim_path(), "jv" + str(tab.index) + ".inp"))
            index = self.notebook.currentIndex()
            self.notebook.removeTab(index)
            self.changed.emit()
コード例 #8
0
ファイル: order_widget.py プロジェクト: xj361685640/gpvdm
    def callback_delete_page(self):

        tab = self.notebook_pointer.currentWidget()
        name = inp_get_token_value(tab.file_name, self.name_token)
        name = name.split("@")[0]

        response = yes_no_dlg(self, self.delete_dlg_text + name)

        if response == True:
            file_number = extract_number_from_file_name(tab.file_name)
            for b in self.base_file_name:
                file_name = b + file_number + ".inp"
                inp_remove_file(os.path.join(get_sim_path(), file_name))

            index = self.notebook_pointer.currentIndex()
            self.notebook_pointer.removeTab(index)
            self.changed.emit()
コード例 #9
0
ファイル: experiment.py プロジェクト: roderickmackenzie/opvdm
	def callback_delete_page(self,widget,data):
		pageNum = self.notebook.get_current_page()
		tab = self.notebook.get_nth_page(pageNum)
		md = gtk.MessageDialog(None, 0, gtk.MESSAGE_QUESTION,  gtk.BUTTONS_YES_NO, _("Should I remove the experiment file ")+tab.tab_name.split("@")[0])

		response = md.run()

		if response == gtk.RESPONSE_YES:
			inp_remove_file("pulse"+str(tab.index)+".inp")
			inp_remove_file("time_mesh_config"+str(tab.index)+".inp")
			self.notebook.remove_page(pageNum)
			global_object_get("tb_item_sim_mode_update")()
			
		elif response == gtk.RESPONSE_NO:
			print _("Not deleting")
			#edit


		md.destroy()
コード例 #10
0
ファイル: fit_window.py プロジェクト: xingangahu/gpvdm
    def callback_delete_page(self):
        tab = self.notebook.currentWidget()
        response = yes_no_dlg(
            self,
            _("Should I remove the fit file ") + tab.tab_name.split("@")[0])

        if response == True:
            inp_remove_file("fit" + str(tab.index) + ".inp")
            inp_remove_file("fit_data" + str(tab.index) + ".inp")
            inp_remove_file("fit_patch" + str(tab.index) + ".inp")
            inp_remove_file("fit_math" + str(tab.index) + ".inp")
            index = self.notebook.currentIndex()
            self.notebook.removeTab(index)
コード例 #11
0
    def callback_delete_page(self):
        files = inp_ls_seq_files(os.path.join(get_sim_path(), "sim.gpvdm"),
                                 self.base_file_name[0])
        if (len(files) < 2):
            error_dlg(self, _("You should not delete the last tab."))
            return

        tab = self.notebook_pointer.currentWidget()
        name = inp_get_token_value(tab.file_name, self.name_token)
        name = name.split("@")[0]

        response = yes_no_dlg(self, self.delete_dlg_text + name)

        if response == True:
            file_number = extract_number_from_file_name(tab.file_name)
            for b in self.base_file_name:
                file_name = b + file_number + ".inp"
                inp_remove_file(os.path.join(get_sim_path(), file_name))

            index = self.notebook_pointer.currentIndex()
            self.notebook_pointer.removeTab(index)
            self.changed.emit()
コード例 #12
0
    def callback_delete_shape(self):
        tab = self.notebook.currentWidget()
        s = self.epi.find_shape_by_file_name(tab.file_name)
        name = s.name

        response = yes_no_dlg(self,
                              "Do you really want to delete the file: " + name)

        if response == True:
            inp_remove_file(os.path.join(get_sim_path(), tab.file_name))

            index = self.notebook.currentIndex()
            self.notebook.removeTab(index)

            for i in range(0, len(get_epi().layers[self.layer_index].shapes)):
                if get_epi().layers[self.layer_index].shapes[
                        i].file_name + ".inp" == tab.file_name:
                    get_epi().layers[self.layer_index].shapes.pop(i)
                    get_epi().clean_unused_files()
                    get_epi().save()
                    break

        global_object_run("gl_force_redraw")
コード例 #13
0
ファイル: fit_window.py プロジェクト: roderickmackenzie/gpvdm
	def callback_delete_page(self):
		tab = self.notebook.currentWidget()
		response=yes_no_dlg(self, _("Should I remove the fit file ")+tab.tab_name.split("@")[0])

		if response==True:
			inp_remove_file("fit"+str(tab.index)+".inp")
			inp_remove_file("fit_data"+str(tab.index)+".inp")
			inp_remove_file("fit_patch"+str(tab.index)+".inp")
			self.notebook.remove_page(pageNum)
			global_object_get("tb_item_sim_mode_update")()
コード例 #14
0
	def clean_unused_files(self):
		files=inp_lsdir("sim.gpvdm")
		tab=self.get_all_electrical_files()

		for i in range(0,len(files)):
			disk_file=files[i]
			#dos
			if is_numbered_file(disk_file,"dos")==True:
				if disk_file not in tab:
					inp_remove_file(disk_file)

			#electrical
			if is_numbered_file(disk_file,"electrical")==True:
				if disk_file not in tab:
					inp_remove_file(disk_file)

			#pl
			if is_numbered_file(disk_file,"pl")==True:
				if disk_file not in tab:
					inp_remove_file(disk_file)

			#shape files
			if is_numbered_file(disk_file,"shape")==True:
				if disk_file not in tab:
					inp_remove_file(disk_file)


			if is_numbered_file(disk_file,"lumo")==True:
				if disk_file not in tab:
					inp_remove_file(disk_file)

			#h**o files
			if is_numbered_file(disk_file,"h**o")==True:
				if disk_file not in tab:
					inp_remove_file(disk_file)