config_window.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:gpvdm 作者: roderickmackenzie 项目源码 文件源码
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()

        self.notebook.setMovable(True)

        self.main_vbox.addWidget(self.notebook)

        files=["math.inp","dump.inp","thermal.inp","led.inp","config.inp","server.inp","crypto.inp"]
        description=[_("Solver configuration"),_("Output files"),_("Thermal"),_("LED"),_("GUI configuration"),_("Server configuration"),_("Cryptography")]

        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)

        #self.connect("delete-event", self.callback_close_window) 

        #self.hide()
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号