def update(self): self.notebook.clear() fulle_sim = True sim_type = newton_solver_get_type() if sim_type == "newton_simple": fulle_sim = False epi = get_epi() for l in epi.layers: if fulle_sim == True: if l.dos_file.startswith("dos") == True: name = "DoS of " + l.name print(l.dos_file) widget = tab_class(l.dos_file + ".inp") self.notebook.addTab(widget, name) for s in l.shapes: if s.shape_dos != "none": name = "DoS of " + s.name widget = tab_class(s.shape_dos + ".inp") self.notebook.addTab(widget, name) #tab.append(s.shape_dos+".inp") else: name = "Electrical " + l.name widget = tab_class(l.shape_electrical + ".inp") self.notebook.addTab(widget, name)
def init(self, index): QTabWidget.__init__(self) self.index = index lines = [] self.file_name = os.path.join(get_sim_path(), "is" + str(self.index) + ".inp") lines = inp_load_file(self.file_name) if lines != False: self.tab_name = inp_search_token_value(lines, "#sim_menu_name") else: self.tab_name = "" self.tmesh = tab_fxmesh(self.index) self.addTab(self.tmesh, _("Frequency mesh")) #if inp().isfile("diagram.inp")==False: self.circuit = circuit(self.index, base_file_name="is_fxdomain_data", token="#fxdomain_sim_mode") self.addTab(self.circuit, _("Circuit")) widget = tab_class(self.file_name) self.addTab(widget, _("Simulation")) self.fx_domain_file_name = os.path.join( get_sim_path(), "is_fxdomain_data" + str(self.index) + ".inp") widget = tab_class(self.fx_domain_file_name) self.addTab(widget, _("FX domain simulation"))
def add_page(self, index): print("here:", index) file_name = os.path.join(get_sim_path(), "laser" + str(index) + ".inp") laser_name = inp_get_token_value(file_name, "#laser_name") tab = tab_class() tab.init(file_name, laser_name) self.notebook.addTab(tab, laser_name)
def __init__(self): QWidgetSavePos.__init__(self, "electrical") self.setFixedSize(1000, 600) self.setWindowIcon(icon_get("preferences-system")) self.setWindowTitle( _("Electrical parameter editor") + " (https://www.gpvdm.com)") self.main_vbox = QVBoxLayout() toolbar = QToolBar() toolbar.setIconSize(QSize(48, 48)) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.undo = QAction(icon_get("help"), _("Help"), self) self.undo.setStatusTip(_("Help")) self.undo.triggered.connect(self.callback_help) toolbar.addAction(self.undo) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) widget = tab_class("device.inp") self.notebook.addTab(widget, _("Device")) self.setLayout(self.main_vbox)
def callback_filter_window(self): widget = tab_class(os.path.join(get_sim_path(), "filter.inp")) widget.setWindowIcon(icon_get("filter_wheel")) widget.setWindowTitle(_("Filter editor") + " (https://www.gpvdm.com)") widget.show()
def __init__(self,index): QTabWidget.__init__(self) css_apply(self,"tab_default.css") lines=[] self.index=index lines=inp_load_file(os.path.join(get_sim_path(),"fit"+str(self.index)+".inp")) if lines!=False: self.tab_name=inp_search_token_value(lines, "#fit_name") else: self.tab_name="" #self.setTabsClosable(True) #self.setMovable(True) self.tmesh = fit_window_plot(self.index) self.addTab(self.tmesh,_("Fit error")) config=tab_class() config.init(os.path.join(get_sim_path(),"fit"+str(self.index)+".inp"),self.tab_name) self.addTab(config,_("Configure fit")) self.tmesh_real = fit_window_plot_real(self.index) self.addTab(self.tmesh_real,_("Experimental data")) self.fit_patch = fit_patch(self.index) self.addTab(self.fit_patch, _("Fit patch")) self.matlab_editor = matlab_editor(self.index) self.addTab(self.matlab_editor, _("MATLAB code"))
def __init__(self,index): QTabWidget.__init__(self) self.index=index lines=[] if inp_load_file(lines,"pulse"+str(self.index)+".inp")==True: self.tab_name=inp_search_token_value(lines, "#sim_menu_name") else: self.tab_name="" self.setTabsClosable(True) self.setMovable(True) self.tmesh = tab_time_mesh(self.index) self.addTab(self.tmesh,_("time mesh")) self.circuit=circuit(self.index) self.addTab(self.circuit,_("Circuit")) tab=tab_class() tab.init("pulse"+str(self.index)+".inp","Configure") self.addTab(tab,"Configure")
def init(self): self.main_vbox = QVBoxLayout() spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self.toolbar.addWidget(spacer) self.undo = QAction(icon_get("help"), _("Help"), self) self.undo.setStatusTip(_("Help")) self.undo.triggered.connect(self.callback_help) self.toolbar.addAction(self.undo) self.main_vbox.addWidget(self.toolbar) self.notebook = QTabWidget() css_apply(self.notebook, "tab_default.css") self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) for i in range(0, len(self.files)): file_name = os.path.join(get_sim_path(), self.files[i]) if inp().isfile(file_name) == True: tab = tab_class(file_name) self.notebook.addTab(tab, self.description[i]) if os.path.basename(file_name) == "dump.inp": tab.changed.connect(self.callback_tab_changed) self.detailed_file_select = dump_select() self.notebook.addTab(self.detailed_file_select, _("Detailed dump control")) self.setLayout(self.main_vbox)
def callback_clone_shape(self): tab = self.notebook.currentWidget() s = self.epi.find_shape_by_file_name(tab.file_name) name = s.name + "_new" new_sim_name = dlg_get_text("Clone the shape:", name, "clone.png") new_sim_name = new_sim_name.ret if new_sim_name != None: old_name = os.path.join(get_sim_path(), tab.file_name) new_name = get_epi().new_electrical_file("shape") my_shape = shape() my_shape.load(old_name) my_shape.name = new_sim_name my_shape.x0 = my_shape.x0 - my_shape.dx my_shape.shape_electrical = get_epi().gen_new_electrical_file( "electrical") my_shape.file_name = new_name my_shape.save() get_epi().layers[self.layer_index].shapes.append(my_shape) get_epi().save() my_tab = tab_class(my_shape.file_name + ".inp") self.notebook.addTab(my_tab, my_shape.name) my_tab.changed.connect(self.callback_edit) global_object_run("gl_force_redraw")
def __init__(self, index): QTabWidget.__init__(self) css_apply(self, "tab_default.css") self.index = index lines = [] self.file_name = os.path.join(get_sim_path(), "pulse" + str(self.index) + ".inp") lines = inp_load_file(self.file_name) if lines != False: self.tab_name = inp_search_token_value(lines, "#sim_menu_name") else: self.tab_name = "" self.setMovable(True) self.tmesh = tab_time_mesh(self.index) self.addTab(self.tmesh, _("time mesh")) self.circuit = circuit(self.index) self.addTab(self.circuit, _("Circuit")) tab = tab_class() tab.init(self.file_name, _("Configure")) self.addTab(tab, _("Configure"))
def callback_unit_click(self, token, widget, unit): if type(widget) == shape_dos_switch: f = inp() f.load(self.file_name) if newton_solver_get_type() == "newton_simple": electrical_file = f.get_token("#shape_electrical") + ".inp" else: electrical_file = f.get_token("#shape_dos") + ".inp" from tab import tab_class self.window = tab_class(electrical_file) self.window.setWindowTitle( _("Electrical parameter editor for shape") + " " + f.get_token("#shape_name") + " (https://www.gpvdm.com)") self.window.show() if type(widget) == gpvdm_select_material: widget.callback_button_click() if type(widget) == gpvdm_select_emission: widget.callback_button_click() if token == "#dostype": from dos_editor import dos_editor self.dos_editor = dos_editor(self.file_name) self.dos_editor.show()
def __init__(self,index): QTabWidget.__init__(self) lines=[] self.index=index if inp_load_file(lines,"fit"+str(self.index)+".inp")==True: self.tab_name=inp_search_token_value(lines, "#fit_name") else: self.tab_name="" self.setTabsClosable(True) self.setMovable(True) self.tmesh = fit_window_plot(self.index) self.addTab(self.tmesh,_("Fit error")) self.tmesh_real = fit_window_plot_real(self.index) self.addTab(self.tmesh_real,_("Experimental data")) self.fit_patch = fit_patch(self.index) self.addTab(self.fit_patch, _("Fit patch")) config=tab_class() config.init("fit"+str(self.index)+".inp",self.tab_name) self.addTab(config,_("Configure fit"))
def init(self): self.setFixedSize(900, 600) self.setWindowIcon(QIcon_load("preferences-system")) self.setWindowTitle(_("Configure") + " (https://www.gpvdm.com)") self.main_vbox = QVBoxLayout() toolbar = QToolBar() toolbar.setIconSize(QSize(48, 48)) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.undo = QAction(QIcon_load("help"), _("Help"), self) self.undo.setStatusTip(_("Help")) self.undo.triggered.connect(self.callback_help) toolbar.addAction(self.undo) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() css_apply(self.notebook, "tab_default.css") self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) files = [ "math.inp", "dump.inp", "thermal.inp", "led.inp", "config.inp", "server.inp" ] description = [ _("Solver configuration"), _("Output files"), _("Thermal"), _("LED"), _("GUI configuration"), _("Server configuration") ] for i in range(0, len(files)): file_name = os.path.join(get_sim_path(), files[i]) if inp_isfile(file_name) == True: tab = tab_class() tab.init(file_name, description[i]) self.notebook.addTab(tab, description[i]) if os.path.basename(file_name) == "dump.inp": tab.changed.connect(self.callback_tab_changed) self.detailed_file_select = dump_select() self.notebook.addTab(self.detailed_file_select, _("Detailed dump control")) lang_tab = language_tab_class() self.notebook.addTab(lang_tab, _("Language")) self.setLayout(self.main_vbox)
def __init__(self): QWidgetSavePos.__init__(self,"electrical") self.setFixedSize(1000, 600) self.setWindowIcon(QIcon_load("preferences-system")) self.setWindowTitle(_("Electrical parameter editor")+" (https://www.gpvdm.com)") self.main_vbox = QVBoxLayout() toolbar=QToolBar() toolbar.setIconSize(QSize(48, 48)) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.undo = QAction(QIcon_load("help"), _("Help"), self) self.undo.setStatusTip(_("Help")) self.undo.triggered.connect(self.callback_help) toolbar.addAction(self.undo) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) widget=tab_class() widget.init("device.inp",_("Device")) self.notebook.addTab(widget,_("Device")) widget=dos_main() widget.update() self.notebook.addTab(widget,_("Electrical parameters")) if enable_betafeatures()==True: widget=tab_bands() widget.update() self.notebook.addTab(widget,_("Complex DoS")) widget=pl_main() widget.update() self.notebook.addTab(widget,_("Luminescence")) self.setLayout(self.main_vbox) #self.connect("delete-event", self.callback_close_window) self.notebook.currentChanged.connect(self.changed_click)
def update(self): self.notebook.clear() epi = get_epi() for i in range(0, len(epi.layers) - 1): l0 = epi.layers[i] l1 = epi.layers[i + 1] if l0.interface_file != "none": name = l0.name + "/" + l1.name widget = tab_class(l0.interface_file + ".inp") self.notebook.addTab(widget, name)
def callback_add_shape(self): layer = get_epi().layers[self.layer_index] s = get_epi().new_shape_file(layer) layer.shapes.append(s) new_filename = s.file_name + ".inp" get_epi().save() my_tab = tab_class(new_filename) self.notebook.addTab(my_tab, s.name) my_tab.changed.connect(self.callback_edit) global_object_run("gl_force_redraw")
def init(self,index): QTabWidget.__init__(self) self.index=index lines=[] self.file_name=os.path.join(get_sim_path(),"cv"+str(self.index)+".inp") lines=inp_load_file(self.file_name) if lines!=False: self.tab_name=inp_search_token_value(lines, "#sim_menu_name") else: self.tab_name="" widget=tab_class(self.file_name) self.addTab(widget,_("CV Configure")) file_name=os.path.join(get_sim_path(),"cv_fxdomain_data"+str(self.index)+".inp") widget=tab_class(file_name) self.addTab(widget,_("FX domain simulation")) self.file_name=os.path.join(get_sim_path(),"cv"+str(self.index)+".inp")
def __init__(self, path): QWidgetSavePos.__init__(self, "spectra_main") self.path = path self.setFixedSize(900, 600) self.setWindowIcon(icon_get("spectra_file")) self.setWindowTitle( _("Optical spectrum editor") + " (https://www.gpvdm.com)" + " " + os.path.basename(self.path)) self.main_vbox = QVBoxLayout() toolbar = QToolBar() toolbar.setIconSize(QSize(48, 48)) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.help = QAction(icon_get("help"), 'Hide', self) self.help.setStatusTip(_("Help")) self.help.triggered.connect(self.callback_help) toolbar.addAction(self.help) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) files = ["mat.inp"] description = [_("Parameters")] eq = equation(self.path, "spectra_eq.inp", "spectra_gen.inp", "spectra.inp", "#spectra_equation_or_data") eq.show_solar_spectra = True eq.set_default_value("3") eq.set_ylabel(_("Intensity") + " (au)") eq.init() self.notebook.addTab(eq, _("Intensity")) for i in range(0, len(files)): tab = tab_class() tab.init(os.path.join(self.path, files[i]), description[i]) self.notebook.addTab(tab, description[i]) self.setLayout(self.main_vbox) self.notebook.currentChanged.connect(self.changed_click)
def __init__(self,name): QWidgetSavePos.__init__(self,name) self.setMinimumSize(900, 600) self.setWindowIcon(QIcon_load("preferences-system")) self.setWindowTitle(_("Fit configure")+" (https://www.gpvdm.com)") self.main_vbox = QVBoxLayout() toolbar=QToolBar() toolbar.setIconSize(QSize(48, 48)) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.undo = QAction(QIcon_load("help"), _("Help"), self) self.undo.setStatusTip(_("Close")) self.undo.triggered.connect(self.callback_help) toolbar.addAction(self.undo) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) files=[os.path.join(get_sim_path(),"fit.inp")] description=[_("Configure minimizer")] for i in range(0,len(files)): tab=tab_class() tab.init(files[i],description[i]) self.notebook.addTab(tab,description[i]) self.duplicate_window=duplicate() self.notebook.addTab(self.duplicate_window,_("Duplicate window")) self.fit_vars_window=fit_vars() self.notebook.addTab(self.fit_vars_window,_("Fit variable window")) self.constraints_window=constraints() self.notebook.addTab(self.constraints_window,_("Fit constraints")) self.setLayout(self.main_vbox)
def __init__(self): QWidget.__init__(self) self.setFixedSize(900, 600) self.setWindowIcon(QIcon(os.path.join(get_image_file_path(),"jv.png"))) self.setWindowTitle(_("Steady state simulation (www.gpvdm.com)")) self.main_vbox = QVBoxLayout() toolbar=QToolBar() toolbar.setIconSize(QSize(48, 48)) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.help = QAction(QIcon(os.path.join(get_image_file_path(),"help.png")), 'Hide', self) self.help.setStatusTip(_("Close")) self.help.triggered.connect(self.callback_help) toolbar.addAction(self.help) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() self.notebook.setTabsClosable(True) self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) files=["jv.inp","jv_simple.inp","sun_voc.inp"] description=["JV simulation","Diode equation","Suns v.s. Voc"] for i in range(0,len(files)): tab=tab_class() tab.init(files[i],description[i]) self.notebook.addTab(tab,description[i]) self.setLayout(self.main_vbox) self.win_list=windows() self.win_list.load() self.win_list.set_window(self,"jv_window") self.notebook.currentChanged.connect(self.changed_click)
def update(self): self.notebook.clear() files = epitaxy_get_dos_files() for i in range(0, epitaxy_get_layers()): pl_file = epitaxy_get_pl_file(i) if pl_file.startswith("pl") == True: widget = QWidget() name = _("Luminescence of ") + epitaxy_get_name(i) widget = tab_class(pl_file + ".inp") self.notebook.addTab(widget, name)
def update(self): self.notebook.clear() files = epitaxy_get_dos_files() for i in range(0, epitaxy_get_layers()): dos_layer = epitaxy_get_electrical_layer(i) if dos_layer.startswith("dos") == True: #add_to_widget=True name = "DoS of " + epitaxy_get_name(i) widget = tab_class() widget.init(dos_layer + ".inp", name) self.notebook.addTab(widget, name)
def __init__(self,file_name): QWidget.__init__(self) self.setFixedSize(900, 600) self.setWindowIcon(QIcon(os.path.join(get_image_file_path(),"jv.png"))) self.setWindowTitle(_("Simulation information (www.gpvdm.com)")) self.main_vbox = QVBoxLayout() toolbar=QToolBar() toolbar.setIconSize(QSize(48, 48)) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.help = QAction(QIcon(os.path.join(get_image_file_path(),"help.png")), 'Hide', self) self.help.setStatusTip(_("Close")) self.help.triggered.connect(self.callback_help) toolbar.addAction(self.help) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) files=[file_name] description=["Simulation Information"] for i in range(0,len(files)): tab=tab_class() tab.set_edit(False) tab.init(files[i],description[i]) self.notebook.addTab(tab,description[i]) self.setLayout(self.main_vbox) self.win_list=windows() self.win_list.load() self.win_list.set_window(self,"sim_info_window")
def __init__(self, path): QWidgetSavePos.__init__(self, "emission_main") self.path = path self.setFixedSize(900, 600) self.setWindowIcon(icon_get("emission")) self.setWindowTitle( _("Emission editor") + " (https://www.gpvdm.com)" + " " + os.path.basename(self.path)) self.main_vbox = QVBoxLayout() self.ribbon = ribbon_emission_db() self.ribbon.import_data.clicked.connect(self.import_data) self.ribbon.equation.clicked.connect(self.callback_equation_editor) self.ribbon.tb_ref.triggered.connect(self.callback_ref) self.ribbon.help.triggered.connect(self.callback_help) self.main_vbox.addWidget(self.ribbon) self.notebook = QTabWidget() self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) fname = os.path.join(self.path, "spectra.inp") self.emission = plot_widget(enable_toolbar=False) self.emission.set_labels([_("Emission")]) self.emission.load_data([fname]) self.emission.do_plot() self.notebook.addTab(self.emission, _("Emission")) files = ["mat.inp"] description = [_("Basic")] for i in range(0, len(files)): full_path = os.path.join(self.path, files[i]) if os.path.isfile(full_path) == True: tab = tab_class(os.path.join(self.path, files[i])) self.notebook.addTab(tab, description[i]) self.setLayout(self.main_vbox) self.notebook.currentChanged.connect(self.changed_click)
def __init__(self, file_name): QTabWidget.__init__(self) css_apply(self, "tab_default.css") lines = [] self.file_name = os.path.join(get_sim_path(), file_name) lines = inp_load_file(self.file_name) if lines != False: self.tab_name = inp_search_token_value(lines, "#sim_menu_name") else: self.tab_name = "" self.setMovable(True) tab = tab_class(self.file_name) self.addTab(tab, _("Configure"))
def update(self): self.notebook.clear() files=epitaxy_get_dos_files() for i in range(0,epitaxy_get_layers()): pl_file=epitaxy_get_pl_file(i) if pl_file.startswith("pl")==True: widget = QWidget() name="Luminescence of "+epitaxy_get_name(i) print(pl_file,files) widget=tab_class() widget.init(pl_file+".inp",name) self.notebook.addTab(widget,name)
def __init__(self): QWidgetSavePos.__init__(self,"sunsvoc") self.setFixedSize(900, 600) self.setWindowIcon(icon_get("sunsvoc")) self.setWindowTitle(_("Steady state simulation")+" (https://www.gpvdm.com)") self.main_vbox = QVBoxLayout() toolbar=QToolBar() toolbar.setIconSize(QSize(48, 48)) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.help = QAction(icon_get("help"), _("Help"), self) self.help.setStatusTip(_("Close")) self.help.triggered.connect(self.callback_help) toolbar.addAction(self.help) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() css_apply(self.notebook,"tab_default.css") self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) files=["sun_voc.inp"] description=[_("Suns v.s. Voc")] for i in range(0,len(files)): tab=tab_class() tab.init(files[i],description[i]) self.notebook.addTab(tab,description[i]) self.setLayout(self.main_vbox) self.notebook.currentChanged.connect(self.changed_click)
def init(self): self.setFixedSize(900, 600) self.setWindowIcon(QIcon(os.path.join(get_image_file_path(),"cog.png"))) self.setWindowTitle(_("Configure (www.gpvdm.com)")) self.main_vbox = QVBoxLayout() toolbar=QToolBar() toolbar.setIconSize(QSize(48, 48)) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.undo = QAction(QIcon(os.path.join(get_image_file_path(),"help.png")), 'Hide', self) self.undo.setStatusTip(_("Close")) self.undo.triggered.connect(self.callback_help) toolbar.addAction(self.undo) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) files=["math.inp","dump.inp","thermal.inp","led.inp","config.inp"] description=["Math","Dump","Thermal","LED","GUI config"] for i in range(0,len(files)): tab=tab_class() tab.init(files[i],description[i]) self.notebook.addTab(tab,description[i]) self.setLayout(self.main_vbox) self.win_list=windows() self.win_list.load() self.win_list.set_window(self,"config_window")
def __init__(self, path): QWidgetSavePos.__init__(self, "spectra_main") self.path = path self.setMinimumSize(900, 600) self.setWindowIcon(icon_get("spectra_file")) self.setWindowTitle( _("Optical spectrum editor") + " (https://www.gpvdm.com)" + " " + os.path.basename(self.path)) self.main_vbox = QVBoxLayout() self.ribbon = ribbon_spectra() self.ribbon.import_data.clicked.connect(self.callback_import) self.ribbon.tb_ref.triggered.connect(self.callback_ref) self.ribbon.help.triggered.connect(self.callback_help) self.main_vbox.addWidget(self.ribbon) self.notebook = QTabWidget() self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) files = ["mat.inp"] description = [_("Parameters")] fname = os.path.join(self.path, "spectra.inp") self.alpha = plot_widget(enable_toolbar=False) self.alpha.set_labels([_("Spectra")]) self.alpha.load_data([fname]) self.alpha.do_plot() self.notebook.addTab(self.alpha, _("Absorption")) for i in range(0, len(files)): tab = tab_class(os.path.join(self.path, files[i])) self.notebook.addTab(tab, description[i]) self.setLayout(self.main_vbox) self.notebook.currentChanged.connect(self.changed_click)
def __init__(self): QWidgetSavePos.__init__(self,"parasitic") self.setFixedSize(900, 600) self.setWindowIcon(icon_get("parasitic")) self.setWindowTitle(_("Edit parasitic components")+" (https://www.gpvdm.com)") self.main_vbox = QVBoxLayout() toolbar=QToolBar() toolbar.setIconSize(QSize(48, 48)) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.help = QAction(icon_get("help"), _("Help"), self) self.help.setStatusTip(_("Close")) self.help.triggered.connect(self.callback_help) toolbar.addAction(self.help) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) files=["parasitic.inp"] description=[_("Parasitic components")] for i in range(0,len(files)): tab=tab_class() tab.init(os.path.join(get_sim_path(),files[i]),description[i]) self.notebook.addTab(tab,description[i]) self.setLayout(self.main_vbox)
def __init__(self): QWidgetSavePos.__init__(self,"eqe") self.setFixedSize(900, 600) self.setWindowIcon(icon_get("qe")) self.setWindowTitle(_("Quantum efficiency editor")+" (https://www.gpvdm.com)") self.main_vbox = QVBoxLayout() toolbar=QToolBar() toolbar.setIconSize(QSize(48, 48)) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.help = QAction(icon_get("help"), _("Help"), self) self.help.setStatusTip(_("Close")) self.help.triggered.connect(self.callback_help) toolbar.addAction(self.help) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() css_apply(self.notebook,"tab_default.css") self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) files=["eqe.inp"] description=[_("EQE")] for i in range(0,len(files)): tab=tab_class(files[i]) self.notebook.addTab(tab,description[i]) self.setLayout(self.main_vbox)
def __init__(self, file_name): """Pass this the file name of the file you want referenced.""" QWidgetSavePos.__init__(self, "ref_window") resize_window_to_be_sane(self, 0.5, 0.5) self.file_name = os.path.splitext(file_name)[0] + ".ref" self.gen_file() self.setWindowIcon(QIcon_load("ref")) self.setWindowTitle( _("Reference manager") + " (https://www.gpvdm.com)") self.vbox = QVBoxLayout() self.toolbar = QToolBar() self.toolbar.setIconSize(QSize(48, 48)) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self.toolbar.addWidget(spacer) self.tb_help = QAction(QIcon_load("help"), _("Help"), self) self.tb_help.setStatusTip(_("Help")) self.tb_help.triggered.connect(self.callback_help) self.toolbar.addAction(self.tb_help) self.vbox.addWidget(self.toolbar) tab = tab_class() tab.icon_file = "ref.png" tab.init(self.file_name, _("Reference")) self.vbox.addWidget(tab) self.button_widget = QWidget() self.button_hbox = QHBoxLayout() self.button_widget.setLayout(self.button_hbox) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) self.button_hbox.addWidget(spacer) self.button_close = QPushButton(_("Close")) self.button_close.clicked.connect(self.callback_close) self.button_hbox.addWidget(self.button_close) self.vbox.addWidget(self.button_widget) self.setLayout(self.vbox)
def load(self, ids): i = 0 if type(ids) == str: ids = [ids] print(ids[0]) self.layer_index = self.epi.find_layer_by_id(ids[0]) for id in ids: s = self.epi.find_shape_by_id(id) my_tab = tab_class(s.file_name + ".inp") my_tab.changed.connect(self.callback_edit) if i == 0: name = _("Layer: ") + s.name else: name = s.name self.notebook.addTab(my_tab, name) i = i + 1
def __init__(self): QDialog.__init__(self) self.main_vbox = QVBoxLayout() self.setFixedSize(600, 450) self.setWindowTitle( _("Connect to cluster") + " (https://www.gpvdm.com)") self.setWindowIcon(icon_get("si")) #self.title=QLabel("<big><b>"+_("Which type of device would you like to simulate?")+"</b></big>") active_file = inp_find_active_file( os.path.join(get_sim_path(), "cluster")) self.viewer = tab_class() self.viewer.init(active_file, "cluster") #gpvdm_viewer(get_device_lib_path()) self.main_vbox.addWidget(self.viewer) self.hwidget = QWidget() self.myserver = server_get() if self.myserver.cluster == False: self.nextButton = QPushButton(_("Connect")) else: self.nextButton = QPushButton(_("Disconnect")) self.cancelButton = QPushButton(_("Cancel")) self.files = [] hbox = QHBoxLayout() hbox.addStretch(1) hbox.addWidget(self.cancelButton) hbox.addWidget(self.nextButton) self.hwidget.setLayout(hbox) self.main_vbox.addWidget(self.hwidget) self.setLayout(self.main_vbox) self.nextButton.clicked.connect(self.callback_connect) self.cancelButton.clicked.connect(self.callback_close)
def update(self): print "PL update" for child in self.notebook.get_children(): self.notebook.remove(child) files=epitaxy_get_dos_files() for i in range(0,epitaxy_get_layers()): pl_file=epitaxy_get_pl_file(i) if pl_file!="none": add_to_widget=True tab=tab_class() tab.show() tab.visible=True name="Luminescence of "+epitaxy_get_name(i) print pl_file,files tab.init(pl_file+".inp",name) tab.label_name=name self.notebook.append_page(tab, gtk.Label(name))
def update(self): print "DoS update" for child in self.notebook.get_children(): self.notebook.remove(child) files=epitaxy_get_dos_files() for i in range(0,epitaxy_get_layers()): dos_layer=epitaxy_get_electrical_layer(i) if dos_layer!="none": add_to_widget=True tab=tab_class() tab.show() tab.visible=True name="DoS of "+epitaxy_get_name(i) print dos_layer,files tab.init(dos_layer+".inp",name) tab.label_name=name self.notebook.append_page(tab, gtk.Label(name))
def __init__(self, file_name): QWidgetSavePos.__init__(self, "info") self.setFixedSize(900, 600) self.setWindowIcon(icon_get("jv")) self.setWindowTitle(_("Simulation information") + " (www.gpvdm.com)") self.main_vbox = QVBoxLayout() toolbar = QToolBar() toolbar.setIconSize(QSize(48, 48)) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.help = QAction(icon_get("help"), _("Help"), self) self.help.setStatusTip(_("Close")) self.help.triggered.connect(self.callback_help) toolbar.addAction(self.help) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) files = [file_name] description = [_("Simulation Information")] for i in range(0, len(files)): tab = tab_class() tab.set_edit(False) tab.init(files[i], description[i]) self.notebook.addTab(tab, description[i]) self.setLayout(self.main_vbox)
def __init__(self): QWidgetSavePos.__init__(self, "mesh_configure") self.setFixedSize(900, 600) self.setWindowIcon(icon_get("preferences-system")) self.setWindowTitle( _("Mesh configuration") + " (https://www.gpvdm.com)") self.main_vbox = QVBoxLayout() toolbar = QToolBar() toolbar.setIconSize(QSize(48, 48)) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.help = QAction(icon_get("help"), _("Help"), self) self.help.setStatusTip(_("Close")) self.help.triggered.connect(self.callback_help) toolbar.addAction(self.help) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) files = ["mesh_x.inp", "mesh_y.inp", "mesh_z.inp"] description = [_("Mesh x"), _("Mesh y"), _("Mesh z")] for i in range(0, len(files)): tab = tab_class() tab.init(files[i], description[i]) self.notebook.addTab(tab, description[i]) self.setLayout(self.main_vbox)
def add_page(self,index): file_name="laser"+str(index)+".inp" laser_name=inp_get_token_value(file_name, "#laser_name") tab=tab_class() tab.init(file_name,laser_name) self.notebook.addTab(tab,laser_name)
def __init__(self,path): QWidget.__init__(self) self.path=path self.setFixedSize(900, 600) self.setWindowIcon(QIcon(os.path.join(get_image_file_path(),"organic_material.png"))) self.setWindowTitle(_("Material editor (www.gpvdm.com)")) self.main_vbox = QVBoxLayout() toolbar=QToolBar() toolbar.setIconSize(QSize(48, 48)) self.cost = QAction(QIcon(os.path.join(get_image_file_path(),"cost.png")), 'Hide', self) self.cost.setStatusTip(_("Cost of material")) self.cost.triggered.connect(self.callback_cost) toolbar.addAction(self.cost) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.help = QAction(QIcon(os.path.join(get_image_file_path(),"help.png")), 'Hide', self) self.help.setStatusTip(_("Help")) self.help.triggered.connect(self.callback_help) toolbar.addAction(self.help) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) files=["dos.inp","pl.inp"] description=[_("Electrical parameters"),_("Luminescence")] for i in range(0,len(files)): tab=tab_class() tab.init(os.path.join(self.path,files[i]),description[i]) self.notebook.addTab(tab,description[i]) alpha=equation(self.path,"alpha_eq.inp","alpha_gen.omat","alpha.omat") alpha.set_default_value("1e7") alpha.set_ylabel("Absorption (m^{-1})") alpha.init() self.notebook.addTab(alpha,"Absorption") n=equation(self.path,"n_eq.inp","n_gen.omat","n.omat") n.set_default_value("3") n.set_ylabel("Refractive index (au)") n.init() self.notebook.addTab(n,"Refractive index") self.setLayout(self.main_vbox) self.win_list=windows() self.win_list.load() self.win_list.set_window(self,"materials_window") self.notebook.currentChanged.connect(self.changed_click)
def load(self): self.clean_menu() self.last_page=0 #print "paths",os.getcwd(),get_bin_path(),(os.path.normcase(os.getcwd())!=os.path.normcase(get_bin_path())) if (os.path.exists("sim.opvdm")==True) and (os.path.normcase(os.getcwd())!=os.path.normcase(get_bin_path())): self.finished_loading=False self.progress.init() self.progress.show() self.progress.start() self.progress.set_text("Loading..") process_events() for child in self.get_children(): self.remove(child) dos_files=inp_get_token_value("device_epitaxy.inp", "#layers") self.main_tab=tab_main() self.main_tab.init() self.main_tab.show() self.append_page(self.main_tab, gtk.Label(_("Device structure"))) lines=[] pos=0 if inp_load_file(lines,"gui_config.inp")==True: pos=0 tab_number=0 tabs=(len(lines)-3)/2 print "tabs=",tabs while (1): add_to_widget=False ret,pos=inp_get_next_token_array(lines,pos) if ret[0]=="#ver": break file_name=ret[0] if file_name[0]=="#": file_name=file_name[1:] name=inp_file_to_description(file_name) if name==False: print "name not found",name break visible=bool(int(ret[1])) self.progress.set_fraction(float(tab_number)/float(tabs)) tab_number=tab_number+1 self.progress.set_text(_("Loading ")+name) process_events() if file_name=="pl0.inp": tab=pl_main() tab.init() tab.update() add_to_widget=True tab.visible=visible tab.label_name=name tab.file_name=file_name elif file_name=="epitaxy.inp": tab=dos_main() tab.init() tab.update() add_to_widget=True tab.visible=visible tab.label_name=name tab.file_name=file_name elif file_name=="lumo0.inp": tab=tab_bands() tab.update() if tab.enabled==True: add_to_widget=True tab.visible=visible tab.wow() tab.label_name=name tab.file_name=file_name elif inp_isfile(file_name)==True: add_to_widget=True tab=tab_class() tab.visible=visible tab.init(file_name,name) tab.label_name=name tab.file_name=file_name if add_to_widget==True: #print file_name,name,visible,type(tab) hbox=gtk.HBox() hbox.set_size_request(-1, 25) mytext=name if len(mytext)<10: for i in range(len(mytext),10): mytext=mytext+" " label=gtk.Label(mytext) label.set_justify(gtk.JUSTIFY_LEFT) self.connect("switch-page", self.callback_switch_page) hbox.pack_start(label, False, True, 0) button = gtk.Button() close_image = gtk.Image() close_image.set_from_file(os.path.join(get_image_file_path(),"close.png")) print os.path.join(get_image_file_path(),"close.png") close_image.show() button = gtk.Button() button.add(close_image) button.props.relief = gtk.RELIEF_NONE button.connect("clicked", self.callback_close_button,name) button.set_size_request(25, 25) button.show() hbox.pack_end(button, False, False, 0) hbox.show_all() if (visible==True): tab.show() self.append_page(tab,hbox) self.set_tab_reorderable(tab,True) self.add_to_menu(name,visible) else: print _("No gui_config.inp file found\n") #for child in self.get_children(): # print type(child) if self.terminal_widget!=None: self.terminal_widget.show() self.append_page(self.terminal_widget, gtk.Label(_("Terminal"))) self.add_welcome_page() self.finished_loading=True self.progress.stop() self.progress.set_fraction(0.0) self.goto_page("tab_main") self.set_tab_pos(gtk.POS_TOP) #self.set_current_page(1) return True else: self.add_welcome_page() self.goto_page(_("Welcome")) return False
def load(self): self.clean_menu() self.last_page=0 #self.setTabsClosable(True) self.setMovable(True) if (os.path.exists("sim.gpvdm")==True) and (os.path.normcase(os.getcwd())!=os.path.normcase(get_bin_path())): self.finished_loading=False #self.progress.init() #self.progress.show() #self.progress.start() #self.progress.set_text("Loading..") #process_events() self.clear() # dos_files=inp_get_token_value("device_epitaxy.inp", "#layers") widget=tab_main() self.addTab(widget,_("Device structure")) lines=[] pos=0 if inp_load_file(lines,"gui_config.inp")==True: pos=0 tab_number=0 tabs=(len(lines)-3)/2 while (1): add_to_widget=False ret,pos=inp_get_next_token_array(lines,pos) if ret[0]=="#ver": break file_name=ret[0] if file_name[0]=="#": file_name=file_name[1:] name=inp_file_to_description(file_name) if name==False: print("name not found",name) break visible=bool(int(ret[1])) #self.progress.set_fraction(float(tab_number)/float(tabs)) tab_number=tab_number+1 #self.progress.set_text(_("Loading ")+name) #process_events() if file_name=="lumo0.inp": widget=tab_bands() #tab.update() add_to_widget=True widget.visible=visible widget.label_name=name widget.file_name=file_name elif file_name=="epitaxy.inp": widget=dos_main() widget.update() add_to_widget=True widget.visible=visible widget.label_name=name widget.file_name=file_name elif file_name=="pl0.inp": widget=pl_main() widget.update() add_to_widget=True widget.visible=visible widget.label_name=name widget.file_name=file_name elif inp_isfile(file_name)==True: add_to_widget=True widget=tab_class() widget.init(file_name,name) # add_to_widget=True # tab= # tab.visible=visible # tab.init(file_name,name) # tab.label_name=name # tab.file_name=file_name if add_to_widget==True: mytext=name if len(mytext)<10: for i in range(len(mytext),10): mytext=mytext+" " self.addTab(widget,mytext) self.terminal=tab_terminal() self.terminal.init() self.addTab(self.terminal,"Terminal") self.terminal.run(os.getcwd(),get_exe_command()+" --version --html") self.add_info_page() return True self.finished_loading=True #self.progress.stop() #self.progress.set_fraction(0.0) self.goto_page("tab_main") else: self.add_info_page() self.goto_page(_("Information")) return False
def init(self): self.progress_window=progress_class() self.progress_window.init() self.articles=[] self.dump_dir=os.path.join(os.getcwd(),"light_dump") find_models() self.main_vbox=gtk.VBox() self.gen_main_menu(self,self.main_vbox) toolbar = gtk.Toolbar() toolbar.set_style(gtk.TOOLBAR_ICONS) toolbar.set_size_request(-1, 50) self.main_vbox.pack_start(toolbar, False, False, 0) self.edit_list=[] self.line_number=[] self.cb = gtk.combo_box_new_text() self.cb.set_wrap_width(5) self.cb_id=self.cb.connect("changed", self.on_changed) self.update_cb() self.cb_model = gtk.combo_box_new_text() self.cb_model.set_wrap_width(5) self.cb_model.connect("changed", self.on_cb_model_changed) self.update_cb_model() self.light_source_model = gtk.combo_box_new_text() self.light_source_model.set_wrap_width(5) self.light_source_model.connect("changed", self.on_light_source_model_changed) self.update_light_source_model() self.light_source_model.show() self.fig_photon_density = band_graph() self.fig_photon_density.set_data_file("light_1d_photons_tot_norm.dat") self.fig_photon_density.init() self.fig_photon_abs = band_graph() self.fig_photon_abs.set_data_file("light_1d_photons_tot_abs_norm.dat") self.fig_photon_abs.init() tool_bar_pos=0 image = gtk.Image() image.set_from_file(os.path.join(get_image_file_path(),"play.png")) self.play = gtk.ToolButton(image) #image.set_from_file(self.icon_theme.lookup_icon("media-playback-start", 32, 0).get_filename()) refresh = gtk.ToolButton(image) refresh.connect("clicked", self.callback_refresh) toolbar.insert(refresh, tool_bar_pos) toolbar.show_all() tool_bar_pos=tool_bar_pos+1 ti_light = gtk.ToolItem() lable=gtk.Label("Optical mode:") lable.show() ti_hbox = gtk.HBox(False, 2) ti_hbox.show() ti_hbox.pack_start(lable, False, False, 0) ti_hbox.pack_start(self.cb, False, False, 0) self.cb.show() lable=gtk.Label("Optical model:") lable.show() ti_hbox.pack_start(lable, False, False, 0) ti_hbox.pack_start(self.cb_model, False, False, 0) self.cb_model.show() ti_light.add(ti_hbox); toolbar.insert(ti_light, tool_bar_pos) ti_light.show() tool_bar_pos=tool_bar_pos+1 sep = gtk.SeparatorToolItem() sep.set_draw(False) sep.set_expand(False) toolbar.insert(sep, tool_bar_pos) sep.show() tool_bar_pos=tool_bar_pos+1 lable=gtk.Label("Light source:") lable.show() ti_hbox.pack_start(lable, False, False, 0) ti_hbox.pack_start(self.light_source_model, False, False, 0) self.cb_model.show() sep = gtk.SeparatorToolItem() sep.set_draw(False) sep.set_expand(True) toolbar.insert(sep, tool_bar_pos) sep.show() tool_bar_pos=tool_bar_pos+1 help = gtk.ToolButton(gtk.STOCK_HELP) toolbar.insert(help, tool_bar_pos) help.connect("clicked", self.callback_help) help.show() tool_bar_pos=tool_bar_pos+1 self.notebook.append_page(self.fig_photon_density,gtk.Label("Photon density") ) self.notebook.append_page(self.fig_photon_abs,gtk.Label("Photon absorbed") ) self.main_vbox.pack_start(self.notebook, False, False, 0) optics_config=tab_class() optics_config.show() self.notebook.append_page(optics_config,gtk.Label("Optical setup")) optics_config.visible=True optics_config.init("optics.inp","Config") optics_config.label_name="Optics config" optics_config.file_name="optics.inp" #Photon distribution photon_dist=photon_dist_class() photon_dist.show() ################## input_files=[] input_files.append("./light_dump/light_2d_photons.dat") input_files.append("./light_dump/light_2d_photons_asb.dat") input_files.append("./light_dump/reflect.dat") plot_labels=[] plot_labels.append("Photon distribution") plot_labels.append("Photon distribution absorbed") plot_labels.append("Reflection") self.plot_widgets=[] self.progress_window.start() for i in range(0,len(input_files)): self.plot_widgets.append(plot_widget()) self.plot_widgets[i].init(self) self.plot_widgets[i].set_labels([plot_labels[0]]) self.plot_widgets[i].load_data([input_files[i]],os.path.splitext(input_files[i])[0]+".oplot") self.plot_widgets[i].do_plot() self.plot_widgets[i].show() self.notebook.append_page(self.plot_widgets[i],gtk.Label(plot_labels[i])) self.connect("delete-event", self.callback_close) self.add(self.main_vbox) self.set_size_request(850,-1) self.main_vbox.show() self.fig_photon_density.draw_graph() self.fig_photon_abs.draw_graph() self.set_icon_from_file(os.path.join(get_image_file_path(),"image.jpg")) self.set_title("Optical Model - (www.opvdm.com)") self.set_position(gtk.WIN_POS_CENTER) self.progress_window.stop()
def __init__(self): QWidget.__init__(self) self.dump_dir=os.path.join(os.getcwd(),"light_dump") find_models() self.setWindowIcon(QIcon(os.path.join(get_image_file_path(),"image.png"))) self.setMinimumSize(1000, 600) self.edit_list=[] self.line_number=[] self.articles=[] input_files=[] input_files.append(os.path.join(os.getcwd(),"light_dump","light_2d_photons.dat")) input_files.append(os.path.join(os.getcwd(),"light_dump","light_2d_photons_asb.dat")) input_files.append(os.path.join(os.getcwd(),"light_dump","reflect.dat")) plot_labels=[] plot_labels.append("Photon distribution") plot_labels.append("Photon distribution absorbed") plot_labels.append("Reflection") self.setGeometry(300, 300, 600, 600) self.setWindowTitle(_("Optical simulation editor (www.gpvdm.com)")) self.setWindowIcon(QIcon(os.path.join(get_image_file_path(),"optics.png"))) self.main_vbox=QVBoxLayout() menubar = QMenuBar() file_menu = menubar.addMenu('&File') self.menu_refresh=file_menu.addAction(_("&Refresh")) self.menu_refresh.triggered.connect(self.update) self.menu_close=file_menu.addAction(_("&Close")) self.menu_close.triggered.connect(self.callback_close) self.main_vbox.addWidget(menubar) toolbar=QToolBar() toolbar.setIconSize(QSize(48, 48)) self.run = QAction(QIcon(os.path.join(get_image_file_path(),"play.png")), _("Run"), self) self.run.triggered.connect(self.callback_run) toolbar.addAction(self.run) label=QLabel(_("Wavelengths:")) toolbar.addWidget(label) self.cb = QComboBox() self.update_cb() toolbar.addWidget(self.cb) self.cb.currentIndexChanged.connect(self.mode_changed) label=QLabel(_("Optical model:")) toolbar.addWidget(label) self.cb_model = QComboBox() toolbar.addWidget(self.cb_model) self.update_cb_model() self.cb_model.activated.connect(self.on_cb_model_changed) label=QLabel(_("Solar spectrum:")) toolbar.addWidget(label) self.light_source_model = QComboBox() self.update_light_source_model() toolbar.addWidget(self.light_source_model) self.light_source_model.activated.connect(self.on_light_source_model_changed) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.help = QAction(QIcon(os.path.join(get_image_file_path(),"help.png")), 'Help', self) self.help.triggered.connect(self.callback_help) toolbar.addAction(self.help) self.main_vbox.addWidget(toolbar) self.progress_window=progress_class() self.notebook = QTabWidget() self.notebook.setMovable(True) self.fig_photon_density = band_graph() self.fig_photon_density.set_data_file("light_1d_photons_tot_norm.dat") self.fig_photon_density.init() self.notebook.addTab(self.fig_photon_density,"Photon density") self.fig_photon_abs = band_graph() self.fig_photon_abs.set_data_file("light_1d_photons_tot_abs_norm.dat") self.fig_photon_abs.init() self.notebook.addTab(self.fig_photon_abs,"Photon absorbed") widget=tab_class() widget.init("light.inp","Optical setup") self.notebook.addTab(widget,"Optical setup") self.plot_widgets=[] self.progress_window.start() for i in range(0,len(input_files)): self.plot_widgets.append(plot_widget()) self.plot_widgets[i].init() self.plot_widgets[i].set_labels([plot_labels[0]]) self.plot_widgets[i].load_data([input_files[i]],os.path.splitext(input_files[i])[0]+".oplot") self.plot_widgets[i].do_plot() #self.plot_widgets[i].show() self.notebook.addTab(self.plot_widgets[i],plot_labels[i]) self.fig_photon_density.draw_graph() self.fig_photon_abs.draw_graph() self.progress_window.stop() self.main_vbox.addWidget(self.notebook) self.setLayout(self.main_vbox) return