Esempio n. 1
0
def main_gui(isAdmin):
    from hal_configurator.ui.configwindow import ConfigWindow
    from hal_configurator.ui.styles import qdarkstyle
    app = QtGui.QApplication(sys.argv)
    app.setStyleSheet(qdarkstyle.load_stylesheet())
    mw = ConfigWindow(None)
    mw.show()
    app.setWindowIcon(QtGui.QIcon())
    sys.exit(app.exec_())
Esempio n. 2
0
 def open_config(self, config_path):
     if os.path.exists(config_path):
         app_config.set_last_dir(os.path.dirname(config_path))
         if not config_path in self.windows:
             c = ConfigWindow(self)
             c.set_configuration(config_path, None)
             app_config.add_config_to_history(config_path)
             c.closeEvent = lambda x: self.windows.pop(config_path)
             self.windows[config_path] = c
         self.windows[config_path].show()
Esempio n. 3
0
 def open_clicked(self):
     fname, _ = QtGui.QFileDialog.getOpenFileName(self, 'Open file', '~')
     config = FileConfigLoader(fname).load_config()
     self.cf = ConfigWindow(config)
     self.cf.show()