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): 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 __init__(self, parent): QWidgetSavePos.__init__(self, "cluster_window") self.ribbon = cluster_config_ribbon() self.ribbon.install.triggered.connect(self.install_to_cluster) self.ribbon.boot.triggered.connect(self.boot_cluster) self.ribbon.generate_keys.triggered.connect(self.generate_keys) self.ribbon.stop.triggered.connect(self.kill_cluster) self.ribbon.remove.triggered.connect(self.remove_from_cluster) self.setFixedSize(900, 600) self.setWindowIcon(icon_get("preferences-system")) self.setWindowTitle(_("Configure") + " (https://www.gpvdm.com)") self.main_vbox = QVBoxLayout() spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self.main_vbox.addWidget(self.ribbon) self.notebook = QTabWidget() css_apply(self.notebook, "tab_default.css") self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) self.ribbon.order_widget.added.connect(self.callback_add_page) self.ribbon.order_widget.notebook_pointer = self.notebook self.ribbon.order_widget.show_enable() self.ribbon.order_widget.load_tabs() self.setLayout(self.main_vbox)
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 __init__(self): QWidget.__init__(self) css_apply(self,"tab_default.css") self.terminal=None self.update_display_function=None self.currentChanged.connect(self.changed_click) global_object_register("notebook_goto_page",self.goto_page)
def __init__(self, path="", api_callback=None): if path == "": self.path = get_scripts_path() else: self.path = path QWidgetSavePos.__init__(self, "scripts") self.setWindowIcon(icon_get("script")) self.setMinimumSize(1000, 600) self.setWindowTitle(_("Script editor") + " (https://www.gpvdm.com)") self.ribbon = script_ribbon() self.setWindowIcon(icon_get("script")) self.main_vbox = QVBoxLayout() self.ribbon.run.start_sim.connect(self.callback_run) self.ribbon.help.triggered.connect(self.callback_help) self.ribbon.tb_save.clicked.connect(self.callback_save) self.ribbon.tb_new.clicked.connect(self.callback_add_page) #self.ribbon.tb_rename.clicked.connect(self.callback_rename_page) self.ribbon.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) self.main_vbox.addWidget(self.ribbon) self.api_callback = api_callback self.notebook = QTabWidget() css_apply(self.notebook, "tab_default.css") self.notebook.setMovable(True) added = 0 for f in listdir(self.path): if f.endswith(".py"): file_name = os.path.join(self.path, f) a = script_editor() a.api_callback = self.api_callback a.load(file_name) a.status_changed.connect(self.callback_tab_changed) self.notebook.addTab(a, f) added = added + 1 if added == 0: file_name = os.path.join(self.path, "example.py") self.new_script(file_name) a = script_editor() a.api_callback = self.api_callback a.load(file_name) a.status_changed.connect(self.callback_tab_changed) self.notebook.addTab(a, "example.py") self.notebook.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self.main_vbox.addWidget(self.notebook) self.setLayout(self.main_vbox)
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, "lasers") self.main_vbox = QVBoxLayout() self.setFixedSize(900, 500) self.setWindowTitle( _("Laser configuration window") + " https://www.gpvdm.com") self.setWindowIcon(icon_get("lasers")) toolbar = QToolBar() toolbar.setToolButtonStyle(Qt.ToolButtonTextUnderIcon) toolbar.setIconSize(QSize(48, 48)) self.order_widget = order_widget() self.order_widget.new_text = _("New laser") self.order_widget.delete_text = _("Delete laser") self.order_widget.clone_text = _("Clone laser") self.order_widget.rename_text = _("Rename laser") self.order_widget.new_dlg_text = _("New laser name:") self.order_widget.base_file_name = "laser" self.order_widget.new_tab_name = _("laser ") self.order_widget.clone_dlg_text = _( "Clone the current laser to a new laser called:") self.order_widget.rename_dlg_text = _("Rename the laser to be called:") self.order_widget.delete_dlg_text = _( "Should I remove the laser file ") self.order_widget.name_token = "#laser_name" self.order_widget.init() toolbar.addWidget(self.order_widget) self.order_widget.added.connect(self.callback_add_page) 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.order_widget.notebook_pointer = self.notebook self.order_widget.load_tabs() self.main_vbox.addWidget(self.notebook) self.status_bar = QStatusBar() self.main_vbox.addWidget(self.status_bar) self.setLayout(self.main_vbox)
def __init__(self): QWidgetSavePos.__init__(self, "lasers") self.main_vbox = QVBoxLayout() self.setFixedSize(900, 500) self.setWindowTitle( _("Laser configuration window") + " https://www.gpvdm.com") self.setWindowIcon(QIcon_load("lasers")) toolbar = QToolBar() toolbar.setToolButtonStyle(Qt.ToolButtonTextUnderIcon) toolbar.setIconSize(QSize(48, 48)) self.new = QAction(QIcon_load("document-new"), wrap_text(_("New laser"), 2), self) self.new.triggered.connect(self.callback_add_page) toolbar.addAction(self.new) self.new = QAction(QIcon_load("edit-delete"), wrap_text(_("Delete laser"), 3), self) self.new.triggered.connect(self.callback_delete_page) toolbar.addAction(self.new) self.clone = QAction(QIcon_load("clone.png"), wrap_text(_("Clone laser"), 3), self) self.clone.triggered.connect(self.callback_copy_page) toolbar.addAction(self.clone) self.clone = QAction(QIcon_load("rename"), wrap_text(_("Rename laser"), 3), self) self.clone.triggered.connect(self.callback_rename_page) toolbar.addAction(self.clone) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.help = QAction(QIcon_load("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.load_tabs() self.main_vbox.addWidget(self.notebook) self.status_bar = QStatusBar() self.main_vbox.addWidget(self.status_bar) self.setLayout(self.main_vbox)
def __init__(self): QTabWidget.__init__(self) self.cluster_tab = None self.setMaximumHeight(140) #self.setStyleSheet("QWidget { background-color:cyan; }") self.myserver = server_get() self.holder = QWidget() self.hbox = QHBoxLayout() self.holder.setLayout(self.hbox) self.toolbar = QToolBar() self.toolbar.setIconSize(QSize(32, 32)) self.about = QToolButton(self) self.about.setText(_("About")) self.about.pressed.connect(self.callback_about_dialog) self.cluster_button = QAction(QIcon_load("not_connected"), _("Connect to cluster"), self) self.cluster_button.triggered.connect(self.callback_cluster_connect) self.toolbar.addAction(self.cluster_button) self.hbox.addWidget(self.toolbar) self.hbox.addWidget(self.about) self.setCornerWidget(self.holder) w = self.file() self.addTab(w, _("File")) self.home = ribbon_home() self.addTab(self.home, _("Home")) self.simulations = ribbon_simulations() self.addTab(self.simulations, _("Simulations")) self.configure = ribbon_configure() self.addTab(self.configure, _("Configure")) #self.device=ribbon_device() #self.addTab(self.device,_("Device")) self.database = ribbon_database() self.addTab(self.database, _("Databases")) if enable_betafeatures() == True: self.tb_cluster = ribbon_cluster() self.addTab(self.tb_cluster, _("Cluster")) self.information = ribbon_information() self.addTab(self.information, _("Information")) #self.setStyleSheet("QWidget { background-color:cyan; }") css_apply(self, "style.css")
def __init__(self): QWidget.__init__(self) self.tab = QTabWidget() css_apply(self.tab, "style_h.css") self.vbox = QHBoxLayout() self.vbox.addWidget(self.tab) self.usage = cpu_usage() self.vbox.addWidget(self.usage) self.setLayout(self.vbox) self.my_server = server_get()
def __init__(self): QWidgetSavePos.__init__(self, "experiment") self.main_vbox = QVBoxLayout() self.setMinimumSize(1200, 700) self.setWindowTitle( _("Time domain experiment window") + " (https://www.gpvdm.com)") self.setWindowIcon(icon_get("icon")) #toolbar=QToolBar() #toolbar.setToolButtonStyle( Qt.ToolButtonTextUnderIcon) #toolbar.setIconSize(QSize(48, 48)) self.ribbon = timedomain_ribbon() self.ribbon.new.triggered.connect(self.callback_add_page) self.ribbon.delete.triggered.connect(self.callback_delete_page) self.ribbon.clone.triggered.connect(self.callback_copy_page) self.ribbon.rename.triggered.connect(self.callback_rename_page) self.ribbon.tb_save.triggered.connect(self.callback_save) self.ribbon.tb_laser_start_time.triggered.connect( self.callback_laser_start_time) self.ribbon.tb_start.triggered.connect(self.callback_start_time) #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(self.ribbon) self.notebook = QTabWidget() css_apply(self.notebook, "style_h.css") self.notebook.setTabBar(QHTabBar()) self.notebook.setTabPosition(QTabWidget.West) self.notebook.setMovable(True) self.load_tabs() self.main_vbox.addWidget(self.notebook) self.status_bar = QStatusBar() self.main_vbox.addWidget(self.status_bar) self.setLayout(self.main_vbox) self.notebook.currentChanged.connect(self.switch_page) self.switch_page()
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 __init__(self): QWidgetSavePos.__init__(self, "experiment") self.main_vbox = QVBoxLayout() self.setMinimumSize(1200, 700) self.setWindowTitle( _("Time domain experiment window") + " (https://www.gpvdm.com)") self.setWindowIcon(icon_get("icon")) self.ribbon = timedomain_ribbon() self.ribbon.tb_save.triggered.connect(self.callback_save) self.ribbon.order_widget.changed.connect(self.callback_changed) self.ribbon.order_widget.added.connect(self.callback_add_page) self.ribbon.tb_laser_start_time.triggered.connect( self.callback_laser_start_time) self.ribbon.tb_start.triggered.connect(self.callback_start_time) self.main_vbox.addWidget(self.ribbon) self.notebook = QTabWidget() css_apply(self.notebook, "style_h.css") self.notebook.setTabBar(QHTabBar()) self.notebook.setTabPosition(QTabWidget.West) self.notebook.setMovable(True) self.ribbon.order_widget.notebook_pointer = self.notebook self.ribbon.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) self.notebook.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self.load_tabs() self.main_vbox.addWidget(self.notebook) self.status_bar = QStatusBar() self.main_vbox.addWidget(self.status_bar) self.setLayout(self.main_vbox) self.notebook.currentChanged.connect(self.switch_page) self.switch_page()
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): QWidget.__init__(self) self.setMinimumSize(1000, 600) self.main_vbox = QVBoxLayout() self.setWindowIcon(icon_get("preferences-system")) self.setWindowTitle( _("Electrical parameter editor") + " (https://www.gpvdm.com)") 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(_("Help")) self.help.triggered.connect(self.callback_help) toolbar.addAction(self.help) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() css_apply(self, "tab_default.css") self.main_vbox.addWidget(self.notebook) self.setLayout(self.main_vbox) #self.notebook.setTabsClosable(True) #self.notebook.setMovable(True) #self.notebook.setTabBar(QHTabBar()) #self.notebook.setTabPosition(QTabWidget.West) global_object_register("dos_update", self.update) self.status_bar = QStatusBar() self.notebook.currentChanged.connect(self.changed_click) self.main_vbox.addWidget(self.status_bar) self.update()
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): QWidget.__init__(self) self.main_vbox = QVBoxLayout() self.setWindowIcon(icon_get("preferences-system")) self.setWindowTitle( _("Luminescence editor") + " (https://www.gpvdm.com)") 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(_("Help")) self.help.triggered.connect(self.callback_help) toolbar.addAction(self.help) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() css_apply(self, "tab_default.css") self.main_vbox.addWidget(self.notebook) self.setLayout(self.main_vbox) self.notebook.setTabsClosable(True) self.notebook.setMovable(True) bar = QHTabBar() bar.setStyleSheet("QTabBar::tab { height: 35px; width: 200px; }") self.notebook.setTabBar(bar) self.notebook.setTabPosition(QTabWidget.West) global_object_register("pl_update", self.update) self.update()
def __init__(self): QWidgetSavePos.__init__(self, "jvexperiment") self.main_vbox = QVBoxLayout() self.setMinimumSize(1200, 700) self.setWindowTitle( _("JV experiment window") + " (https://www.gpvdm.com)") self.setWindowIcon(icon_get("icon")) toolbar = QToolBar() toolbar.setToolButtonStyle(Qt.ToolButtonTextUnderIcon) toolbar.setIconSize(QSize(48, 48)) self.order_widget = order_widget() self.order_widget.new_text = _("New experiment") self.order_widget.delete_text = _("Delete experiment") self.order_widget.clone_text = _("Clone experiment") self.order_widget.rename_text = _("Rename experiment") self.order_widget.new_dlg_text = _("New experiment name") + ":" self.order_widget.base_file_name = "jv" self.order_widget.new_tab_name = _("experiment ") self.order_widget.clone_dlg_text = _( "Clone the current experiment to a new experiment called:") self.order_widget.rename_dlg_text = _( "Rename the experiment to be called") self.order_widget.delete_dlg_text = _( "Should I remove the experiment file ") self.order_widget.postfix = "@jv" self.order_widget.name_token = "#sim_menu_name" self.order_widget.init() self.order_widget.changed.connect(self.callback_changed) self.order_widget.added.connect(self.callback_add_page) toolbar.addWidget(self.order_widget) 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.order_widget.notebook_pointer = self.notebook css_apply(self.notebook, "style_h.css") self.notebook.setTabBar(QHTabBar()) self.notebook.setTabPosition(QTabWidget.West) self.notebook.setMovable(True) self.order_widget.load_tabs() self.main_vbox.addWidget(self.notebook) self.status_bar = QStatusBar() self.main_vbox.addWidget(self.status_bar) self.setLayout(self.main_vbox)
def __init__(self,name): QWidgetSavePos.__init__(self,name) self.main_vbox = QVBoxLayout() #self.setFixedSize(900, 700) self.setWindowTitle(_("Fit the simulation to experimental data")+" https://www.gpvdm.com") self.setWindowIcon(icon_get("fit")) toolbar=QToolBar() toolbar.setIconSize(QSize(48, 48)) toolbar.setToolButtonStyle( Qt.ToolButtonTextUnderIcon) self.main_vbox.addWidget(toolbar) self.ribbon=fit_ribbon() self.ribbon.order_widget.added.connect(self.callback_add_page) self.ribbon.help.triggered.connect(self.callback_help) self.ribbon.play.start_sim.connect(self.callback_do_fit) self.ribbon.play_one.start_sim.connect(self.callback_one_fit) self.ribbon.import_data.triggered.connect(self.callback_import) self.ribbon.tb_configure.triggered.connect(self.callback_configure) self.ribbon.tb_export_as_jpg.clicked.connect(self.callback_export_image) self.ribbon.tb_export_as_csv.clicked.connect(self.callback_export_csv) self.ribbon.tb_export_as_xls.clicked.connect(self.callback_export_xls) self.ribbon.tb_export_as_gnuplot.clicked.connect(self.callback_export_gnuplot) self.main_vbox.addWidget(self.ribbon) self.notebook = QTabWidget() self.ribbon.order_widget.notebook_pointer=self.notebook self.ribbon.enable.changed.connect(self.callback_enable) self.ribbon.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) self.notebook.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) css_apply(self.notebook,"style_h.css") self.notebook.setTabBar(QHTabBar()) self.notebook.setTabPosition(QTabWidget.West) self.notebook.setMovable(True) self.notebook.currentChanged.connect(self.changed_click) self.load_tabs() self.main_vbox.addWidget(self.notebook) self.status_bar=QStatusBar() self.main_vbox.addWidget(self.status_bar) self.setLayout(self.main_vbox) self.fit_configure_window=None
def __init__(self): QWidgetSavePos.__init__(self, "experiment") self.main_vbox = QVBoxLayout() self.setMinimumSize(1200, 700) self.setWindowTitle( _("Time domain experiment window") + " (https://www.gpvdm.com)") self.setWindowIcon(QIcon_load("icon")) toolbar = QToolBar() toolbar.setToolButtonStyle(Qt.ToolButtonTextUnderIcon) toolbar.setIconSize(QSize(48, 48)) self.new = QAction(QIcon_load("document-new"), wrap_text(_("New experiment"), 2), self) self.new.triggered.connect(self.callback_add_page) toolbar.addAction(self.new) self.new = QAction(QIcon_load("edit-delete"), wrap_text(_("Delete experiment"), 3), self) self.new.triggered.connect(self.callback_delete_page) toolbar.addAction(self.new) self.clone = QAction(QIcon_load("clone"), wrap_text(_("Clone experiment"), 3), self) self.clone.triggered.connect(self.callback_copy_page) toolbar.addAction(self.clone) self.clone = QAction(QIcon_load("rename"), wrap_text(_("Rename experiment"), 3), self) self.clone.triggered.connect(self.callback_rename_page) toolbar.addAction(self.clone) self.tb_save = QAction(QIcon_load(("document-save")), wrap_text(_("Save image"), 3), self) self.tb_save.triggered.connect(self.callback_save) toolbar.addAction(self.tb_save) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.help = QAction(QIcon_load("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, "style_h.css") self.notebook.setTabBar(QHTabBar()) self.notebook.setTabPosition(QTabWidget.West) self.notebook.setMovable(True) self.load_tabs() self.main_vbox.addWidget(self.notebook) self.status_bar = QStatusBar() self.main_vbox.addWidget(self.status_bar) self.setLayout(self.main_vbox) return
def __init__(self, scan_file): QWidget.__init__(self) self.notebook = QTabWidget() self.setWindowTitle(_("Parameter scan editor - (www.gpvdm.com)")) self.setWindowIcon(icon_get("scan")) self.main_vbox = QVBoxLayout() self.scan_tab_vbox = QVBoxLayout() self.tokens = tokens() self.myserver = server_get() self.status_bar = QStatusBar() self.param_list = get_scan_human_labels().list #self.tab_label=tab_label self.scan_io = scan_io() self.scan_io.parent_window = self #self.scan_io.set_path(self.scan_io.scan_dir) self.scan_io.load(scan_file) self.scan_io.make_dir() toolbar = QToolBar() toolbar.setIconSize(QSize(32, 32)) self.tb_add = QAction(icon_get("list-add"), _("Add parameter to scan"), self) self.tb_add.triggered.connect(self.callback_add_item) toolbar.addAction(self.tb_add) self.tb_minus = QAction(icon_get("list-remove"), _("Delete item"), self) self.tb_minus.triggered.connect(self.callback_delete_item) toolbar.addAction(self.tb_minus) self.tb_down = QAction(icon_get("go-down"), _("Move down"), self) self.tb_down.triggered.connect(self.callback_move_down) toolbar.addAction(self.tb_down) self.tb_up = QAction(icon_get("go-up"), _("Move up"), self) self.tb_up.triggered.connect(self.callback_move_up) toolbar.addAction(self.tb_up) self.tb_command = QAction(icon_get("utilities-terminal"), _("Insert python command"), self) self.tb_command.triggered.connect(self.callback_insert_command) toolbar.addAction(self.tb_command) self.scan_tab_vbox.addWidget(toolbar) self.tab = gpvdm_tab() css_apply(self.notebook, "tab_default.css") self.notebook.setMovable(True) self.tab.verticalHeader().setVisible(False) self.tab.setColumnCount(5) #if enable_betafeatures()==False: # self.tab.setColumnHidden(0, True) # self.tab.setColumnHidden(1, True) self.tab.setSelectionBehavior(QAbstractItemView.SelectRows) self.tab.setColumnWidth(2, 300) self.tab.setColumnWidth(3, 300) self.tab.setColumnWidth(4, 300) self.load() self.tab.cellChanged.connect(self.tab_changed) self.scan_tab_vbox.addWidget(self.tab) self.notebook.popMenu = QMenu(self) #self.mp_show_list=QAction(_("Select parameter to scan"), self) #self.mp_show_list.triggered.connect(self.callback_show_list) #self.popMenu.addAction(self.mp_show_list) self.notebook.popMenu.addSeparator() self.mp_delete = QAction(_("Delete item"), self) self.mp_delete.triggered.connect(self.callback_delete_item) self.notebook.popMenu.addAction(self.mp_delete) self.mp_copy = QAction(_("Copy"), self) self.mp_copy.triggered.connect(self.callback_copy_item) self.notebook.popMenu.addAction(self.mp_copy) self.mp_paste = QAction(_("Paste"), self) self.mp_paste.triggered.connect(self.callback_paste_item) self.notebook.popMenu.addAction(self.mp_paste) self.notebook.popMenu.addSeparator() self.mp_add = QAction(_("Add item"), self) self.mp_add.triggered.connect(self.callback_add_item) self.notebook.popMenu.addAction(self.mp_add) self.mp_down = QAction(_("Move down"), self) self.mp_down.triggered.connect(self.callback_move_down) self.notebook.popMenu.addAction(self.mp_down) self.mp_down = QAction(_("Move down"), self) self.mp_down.triggered.connect(self.callback_move_down) self.notebook.popMenu.addAction(self.mp_down) self.notebook.popMenu.addSeparator() self.notebook.setMinimumSize(700, 500) self.program_widget = QWidget() self.program_widget.setLayout(self.scan_tab_vbox) self.notebook.addTab(self.program_widget, "Commands") self.viewer = gpvdm_viewer(self.scan_io.scan_dir) self.viewer.show_back_arrow = True self.notebook.addTab(self.viewer, "Output") self.ribbon = scan_tab_ribbon() self.ribbon.tb_simulate.triggered.connect(self.callback_run_simulation) self.ribbon.tb_clean.triggered.connect(self.clean_scan_dir) self.ribbon.tb_plot.triggered.connect(self.callback_gen_plot_command) self.ribbon.tb_notes.triggered.connect(self.callback_notes) self.main_vbox.addWidget(self.ribbon) self.main_vbox.addWidget(self.notebook) self.main_vbox.addWidget(self.status_bar) self.setLayout(self.main_vbox) self.select_param_window = select_param(self.tab)
def __init__(self): ribbon_base.__init__(self) self.cluster_tab = None #self.setMaximumHeight(140) #self.setStyleSheet("QWidget { background-color:cyan; }") self.myserver = server_get() self.holder = QWidget() self.hbox = QHBoxLayout() self.holder.setLayout(self.hbox) self.toolbar = QToolBar() self.toolbar.setIconSize(QSize(32, 32)) self.help_message = QLabel_click( _(get_lock().question + " <a href=\"" + get_lock().my_email + "\">" + get_lock().my_email + "</a>")) self.help_message.clicked.connect(self.callback_questions) self.about = QToolButton(self) self.about.setText(_("About")) self.about.pressed.connect(self.callback_about_dialog) self.cluster_button = QAction(icon_get("not_connected"), _("Connect to cluster"), self) self.cluster_button.triggered.connect(self.callback_cluster_connect) self.toolbar.addAction(self.cluster_button) self.hbox.addWidget(self.help_message) self.hbox.addWidget(self.toolbar) self.hbox.addWidget(self.about) self.setCornerWidget(self.holder) self.file = ribbon_file() self.addTab(self.file, _("File")) self.home = ribbon_home() self.addTab(self.home, _("Home")) self.ribbon_sim_mode = ribbon_sim_mode() self.addTab(self.ribbon_sim_mode, _("Simulation type")) self.simulations = ribbon_simulations() self.addTab(self.simulations, _("Simulation Editors")) self.simulations.experiments_changed.connect( self.ribbon_sim_mode.update) self.configure = ribbon_configure() self.addTab(self.configure, _("Configure")) #self.device=ribbon_device() #self.addTab(self.device,_("Device")) #self.electrical=ribbon_electrical() #self.addTab(self.electrical,_("Electrical")) self.thermal = ribbon_thermal() self.addTab(self.thermal, _("Thermal")) self.database = ribbon_database() self.addTab(self.database, _("Databases")) if enable_betafeatures() == True: self.tb_cluster = ribbon_cluster() self.addTab(self.tb_cluster, _("Cluster")) self.information = ribbon_information() self.addTab(self.information, _("Information")) #self.setStyleSheet("QWidget { background-color:cyan; }") css_apply(self, "style.css") self.currentChanged.connect(self.changed_click)
def __init__(self): QWidget.__init__(self) self.setWindowIcon(icon_get("optics")) self.setMinimumSize(1000, 600) self.ribbon = optics_ribbon() self.edit_list = [] self.line_number = [] self.articles = [] input_files = [] input_files.append( os.path.join(get_sim_path(), "light_dump", "light_2d_photons.dat")) input_files.append( os.path.join(get_sim_path(), "light_dump", "light_2d_photons_asb.dat")) input_files.append( os.path.join(get_sim_path(), "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") + " (https://www.gpvdm.com)") self.setWindowIcon(icon_get("optics")) self.main_vbox = QVBoxLayout() self.ribbon.run.triggered.connect(self.callback_run) self.ribbon.fx_box.cb.currentIndexChanged.connect(self.mode_changed) self.ribbon.help.triggered.connect(self.callback_help) self.ribbon.tb_save.triggered.connect(self.callback_save) self.main_vbox.addWidget(self.ribbon) self.progress_window = progress_class() self.notebook = QTabWidget() css_apply(self.notebook, "tab_default.css") 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")) self.fig_gen_rate = band_graph() self.fig_gen_rate.set_data_file("light_1d_Gn.dat") self.fig_gen_rate.init() self.notebook.addTab(self.fig_gen_rate, _("Generation rate")) widget = tab_class() widget.init(os.path.join(get_sim_path(), "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(enable_toolbar=False) 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.fig_gen_rate.draw_graph() self.progress_window.stop() self.main_vbox.addWidget(self.notebook) self.setLayout(self.main_vbox) return
def __init__(self,name): QWidgetSavePos.__init__(self,name) self.main_vbox = QVBoxLayout() #self.setFixedSize(900, 700) self.setWindowTitle(_("Fit window")+" https://www.gpvdm.com") self.setWindowIcon(icon_get("fit")) toolbar=QToolBar() toolbar.setIconSize(QSize(48, 48)) toolbar.setToolButtonStyle( Qt.ToolButtonTextUnderIcon) self.order_widget=order_widget() self.order_widget.new_text=_("New fit") self.order_widget.delete_text=_("Delete fit") self.order_widget.clone_text=_("Clone fit") self.order_widget.rename_text=_("Rename fit") self.order_widget.new_dlg_text=_("New fit name:") self.order_widget.base_file_name=["fit","fit_data","fit_patch","fit_math"] self.order_widget.new_tab_name=_("fit ") self.order_widget.clone_dlg_text=_("Clone the current fit to a new fit called:") self.order_widget.rename_dlg_text=_("Rename the fit to be called:") self.order_widget.delete_dlg_text=_("Should I remove the fit file ") self.order_widget.name_token="#fit_name" self.order_widget.init() toolbar.addWidget(self.order_widget) self.order_widget.added.connect(self.callback_add_page) toolbar.addSeparator() self.tb_configure= QAction(icon_get("preferences-system"), wrap_text(_("Configure"),4), self) self.tb_configure.triggered.connect(self.callback_configure) toolbar.addAction(self.tb_configure) self.import_data= QAction(icon_get("import"), _("Import data"), self) self.import_data.triggered.connect(self.callback_import) toolbar.addAction(self.import_data) toolbar.addSeparator() self.play= QAction(icon_get("media-playback-start"), wrap_text(_("Run a single fit"),4), self) self.play.triggered.connect(self.callback_one_fit) toolbar.addAction(self.play) self.play= QAction(icon_get("forward"),wrap_text( _("Start the fitting process"),4), self) self.play.triggered.connect(self.callback_do_fit) toolbar.addAction(self.play) self.pause= QAction(icon_get("media-playback-pause"), wrap_text(_("Stop the simulation"),4), self) self.pause.triggered.connect(self.callback_stop) toolbar.addAction(self.pause) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.help = QAction(icon_get("help"), _("Help"), self) self.help.triggered.connect(self.callback_help) toolbar.addAction(self.help) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() self.order_widget.notebook_pointer=self.notebook css_apply(self.notebook,"style_h.css") self.notebook.setTabBar(QHTabBar()) self.notebook.setTabPosition(QTabWidget.West) self.notebook.setMovable(True) self.load_tabs() self.main_vbox.addWidget(self.notebook) self.status_bar=QStatusBar() self.main_vbox.addWidget(self.status_bar) self.setLayout(self.main_vbox) self.fit_configure_window=None
def __init__(self,my_server): QWidgetSavePos.__init__(self,"scan_window") self.myserver=my_server self.setMinimumSize(1000,500) self.setWindowTitle(_("Parameter scan - gpvdm")) self.setWindowIcon(icon_get("scan")) self.rod=[] self.sim_dir=get_sim_path() self.main_vbox = QVBoxLayout() self.ribbon=scan_ribbon() self.main_vbox.addWidget(self.ribbon) self.ribbon.menu_plot_fits.triggered.connect(self.callback_plot_fits) self.ribbon.sim_no_gen.triggered.connect(self.callback_run_simulation_nogen) self.ribbon.single_fit.triggered.connect(self.callback_run_single_fit) self.ribbon.clean_unconverged.triggered.connect(self.callback_clean_unconverged_simulation) self.ribbon.clean_sim_output.triggered.connect(self.callback_clean_simulation_output) self.ribbon.push_unconverged_to_hpc.triggered.connect(self.callback_push_unconverged_to_hpc) self.ribbon.report.triggered.connect(self.callback_report) self.ribbon.tb_new.triggered.connect(self.callback_new_scan) self.ribbon.tb_delete.triggered.connect(self.callback_delete_page) self.ribbon.tb_clone.triggered.connect(self.callback_clone) self.ribbon.tb_rename.triggered.connect(self.callback_rename) #self.ribbon.tb_simulate.start_sim.connect(self.callback_run_simulation) #self.ribbon.tb_build.triggered.connect(self.callback_build_scan) #self.ribbon.tb_rerun.triggered.connect(self.callback_scan_run) #self.ribbon.tb_zip.triggered.connect(self.callback_scan_archive) self.ribbon.tb_run_all.triggered.connect(self.callback_run_all_simulations) #self.ribbon.tb_plot.triggered.connect(self.callback_plot) #self.ribbon.tb_plot_time.triggered.connect(self.callback_examine) self.ribbon.tb_ml_build_vectors.triggered.connect(self.callback_mb_build_vectors) #self.ribbon.tb_notes.triggered.connect(self.callback_notes) self.ribbon.tb_clean.triggered.connect(self.callback_clean_all) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self.notebook = QTabWidget() self.notebook.setTabBar(QHTabBar()) css_apply(self.notebook,"style_h.css") self.notebook.setTabPosition(QTabWidget.West) self.notebook.setMovable(True) #self.main_vbox.addWidget(self.notebook) self.viewer=gpvdm_viewer(self.sim_dir) self.viewer.allow_navigation=True self.viewer.set_directory_view(True) self.viewer.set_back_arrow(False) self.viewer.show_only=["scan_dir"] self.viewer.set_multi_select() self.viewer.selection_changed.connect(self.callback_selection_changed) self.callback_selection_changed() self.main_vbox.addWidget(self.viewer) self.status_bar=QStatusBar() self.main_vbox.addWidget(self.status_bar) print("!!!!!!!!!!!!>>>>>>>>>>>>>>>>>>>>>") get_scan_human_labels().populate_from_files() self.setLayout(self.main_vbox)
def __init__(self): QWidgetSavePos.__init__(self, "shape_editor") self.setMinimumSize(600, 700) self.setWindowIcon(icon_get("shape")) self.setWindowTitle(_("Object editor") + " (https://www.gpvdm.com)") self.main_vbox = QVBoxLayout() toolbar = QToolBar() toolbar.setToolButtonStyle(Qt.ToolButtonTextUnderIcon) toolbar.setIconSize(QSize(48, 48)) self.tb_new = QAction(icon_get("document-new"), wrap_text("New shape", 2), self) self.tb_new.triggered.connect(self.callback_add_shape) toolbar.addAction(self.tb_new) self.tb_delete = QAction(icon_get("edit-delete"), wrap_text("Delete shape", 3), self) self.tb_delete.triggered.connect(self.callback_delete_shape) toolbar.addAction(self.tb_delete) self.tb_rename = QAction(icon_get("rename"), wrap_text("Rename shape", 3), self) self.tb_rename.triggered.connect(self.callback_rename_shape) toolbar.addAction(self.tb_rename) self.tb_clone = QAction(icon_get("clone"), wrap_text("Clone shape", 3), self) self.tb_clone.triggered.connect(self.callback_clone_shape) toolbar.addAction(self.tb_clone) self.enable = tick_cross(enable_text=_("Shape\nenabled"), disable_text=_("Shape\ndisabled")) self.enable.changed.connect(self.callback_enable_disable) toolbar.addAction(self.enable) 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) self.notebook.currentChanged.connect(self.changed_click) self.status_bar = QStatusBar() self.main_vbox.addWidget(self.status_bar) self.setLayout(self.main_vbox) self.epi = get_epi()
def __init__(self): QWidgetSavePos.__init__(self, "optics") self.setWindowIcon(icon_get("optics")) self.setMinimumSize(1000, 600) self.setWindowTitle( _("Optical simulation editor") + " (https://www.gpvdm.com)") self.ribbon = optics_ribbon() self.edit_list = [] self.line_number = [] self.articles = [] input_files = [] input_files.append( os.path.join(get_sim_path(), "optical_output", "light_2d_photons.dat")) input_files.append( os.path.join(get_sim_path(), "optical_output", "light_2d_photons_asb.dat")) plot_labels = [] plot_labels.append(_("Photon distribution")) plot_labels.append(_("Photon distribution absorbed")) self.setWindowIcon(icon_get("optics")) self.main_vbox = QVBoxLayout() self.ribbon.optics.run.start_sim.connect(self.callback_run) self.ribbon.optics.fx_box.cb.currentIndexChanged.connect( self.mode_changed) self.ribbon.optics.help.triggered.connect(self.callback_help) self.ribbon.tb_save.clicked.connect(self.callback_save) self.ribbon.optics.configwindow.triggered.connect( self.callback_configwindow) self.ribbon.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) self.main_vbox.addWidget(self.ribbon) self.progress_window = progress_class() self.notebook = QTabWidget() css_apply(self.notebook, "tab_default.css") self.notebook.setMovable(True) self.plot_widgets = [] self.progress_window.start() for i in range(0, len(input_files)): self.plot_widgets.append(plot_widget(enable_toolbar=False)) self.plot_widgets[i].hide_title = True self.plot_widgets[i].set_labels([plot_labels[0]]) self.plot_widgets[i].load_data([input_files[i]]) #self.plot_widgets[i].watermark_alpha=0.5 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 = band_graph() self.fig_photon_density.set_data_file("light_1d_photons_tot_norm.dat") 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.notebook.addTab(self.fig_photon_abs,_("Photon absorbed")) self.fig_gen_rate = band_graph() self.fig_gen_rate.set_data_file("light_1d_Gn.dat") self.notebook.addTab(self.fig_gen_rate, _("Generation rate")) self.fig_photon_density.draw_graph() #self.fig_photon_abs.draw_graph() self.fig_gen_rate.draw_graph() self.progress_window.stop() self.notebook.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self.main_vbox.addWidget(self.notebook) self.setLayout(self.main_vbox) if os.path.isfile( os.path.join(get_sim_path(), "optical_output", "light_2d_photons.dat")) == False: response = yes_no_dlg( self, "You have not yet run a full optical simulation, to use this feature you need to. Would you run one now?" ) if response == True: self.callback_run() else: self.close()
def __init__(self, my_server): QWidgetSavePos.__init__(self, "scan_window") self.myserver = my_server self.setMinimumSize(1000, 500) self.setWindowTitle(_("Parameter scan - gpvdm")) self.setWindowIcon(icon_get("scan")) self.rod = [] self.sim_dir = get_sim_path() self.main_vbox = QVBoxLayout() self.ribbon = scan_ribbon() self.main_vbox.addWidget(self.ribbon) self.ribbon.menu_plot_fits.triggered.connect(self.callback_plot_fits) self.ribbon.menu_run_nested.triggered.connect( self.callback_nested_simulation) self.ribbon.sim_no_gen.triggered.connect( self.callback_run_simulation_nogen) self.ribbon.single_fit.triggered.connect(self.callback_run_single_fit) self.ribbon.tb_clean.triggered.connect(self.callback_clean_simulation) self.ribbon.clean_unconverged.triggered.connect( self.callback_clean_unconverged_simulation) self.ribbon.clean_sim_output.triggered.connect( self.callback_clean_simulation_output) self.ribbon.push_unconverged_to_hpc.triggered.connect( self.callback_push_unconverged_to_hpc) self.ribbon.change_dir.triggered.connect(self.callback_change_dir) self.ribbon.report.triggered.connect(self.callback_report) self.ribbon.tb_new.triggered.connect(self.callback_add_page) self.ribbon.tb_delete.triggered.connect(self.callback_delete_page) self.ribbon.tb_clone.triggered.connect(self.callback_copy_page) self.ribbon.tb_rename.triggered.connect(self.callback_rename_page) self.ribbon.tb_simulate.triggered.connect(self.callback_run_simulation) self.ribbon.tb_build.triggered.connect(self.callback_build_scan) self.ribbon.tb_rerun.triggered.connect(self.callback_scan_run) self.ribbon.tb_zip.triggered.connect(self.callback_scan_archive) self.ribbon.tb_run_all.triggered.connect( self.callback_run_all_simulations) self.ribbon.tb_stop.triggered.connect(self.callback_stop_simulation) self.ribbon.tb_plot.triggered.connect(self.callback_plot) self.ribbon.tb_plot_time.triggered.connect(self.callback_examine) self.ribbon.tb_ml_build_vectors.triggered.connect( self.callback_mb_build_vectors) self.ribbon.tb_notes.triggered.connect(self.callback_notes) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self.notebook = QTabWidget() self.notebook.setTabBar(QHTabBar()) css_apply(self.notebook, "style_h.css") self.notebook.setTabPosition(QTabWidget.West) self.notebook.setMovable(True) self.main_vbox.addWidget(self.notebook) self.status_bar = QStatusBar() self.main_vbox.addWidget(self.status_bar) self.load_tabs() self.setLayout(self.main_vbox)
def __init__(self, name): QWidgetSavePos.__init__(self, name) self.main_vbox = QVBoxLayout() #self.setFixedSize(900, 700) self.setWindowTitle(_("Fit window") + " https://www.gpvdm.com") self.setWindowIcon(QIcon_load("fit")) toolbar = QToolBar() toolbar.setIconSize(QSize(48, 48)) toolbar.setToolButtonStyle(Qt.ToolButtonTextUnderIcon) self.new = QAction(QIcon_load("document-new"), wrap_text(_("New fit"), 4), self) self.new.triggered.connect(self.callback_add_page) toolbar.addAction(self.new) self.new = QAction(QIcon_load("edit-delete"), wrap_text(_("Delete fit"), 4), self) self.new.triggered.connect(self.callback_delete_page) toolbar.addAction(self.new) self.clone = QAction(QIcon_load("clone"), wrap_text(_("Clone fit"), 4), self) self.clone.triggered.connect(self.callback_copy_page) toolbar.addAction(self.clone) self.clone = QAction(QIcon_load("rename"), wrap_text(_("Rename fit"), 4), self) self.clone.triggered.connect(self.callback_rename_page) toolbar.addAction(self.clone) toolbar.addSeparator() self.tb_configure = QAction(QIcon_load("preferences-system"), wrap_text(_("Configure"), 4), self) self.tb_configure.triggered.connect(self.callback_configure) toolbar.addAction(self.tb_configure) self.import_data = QAction(QIcon_load("import"), _("Import data"), self) self.import_data.triggered.connect(self.callback_import) toolbar.addAction(self.import_data) toolbar.addSeparator() self.play = QAction(QIcon_load("media-playback-start"), wrap_text(_("Run a single fit"), 4), self) self.play.triggered.connect(self.callback_one_fit) toolbar.addAction(self.play) self.play = QAction(QIcon_load("forward"), wrap_text(_("Start the fitting process"), 4), self) self.play.triggered.connect(self.callback_do_fit) toolbar.addAction(self.play) self.pause = QAction(QIcon_load("media-playback-pause"), wrap_text(_("Stop the simulation"), 4), self) self.pause.triggered.connect(self.callback_stop) toolbar.addAction(self.pause) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolbar.addWidget(spacer) self.help = QAction(QIcon_load("help"), _("Help"), self) self.help.triggered.connect(self.callback_help) toolbar.addAction(self.help) self.main_vbox.addWidget(toolbar) self.notebook = QTabWidget() css_apply(self.notebook, "style_h.css") self.notebook.setTabBar(QHTabBar()) self.notebook.setTabPosition(QTabWidget.West) self.notebook.setMovable(True) self.load_tabs() self.main_vbox.addWidget(self.notebook) self.status_bar = QStatusBar() self.main_vbox.addWidget(self.status_bar) self.setLayout(self.main_vbox) self.fit_configure_window = None