Example #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_())
Example #2
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_())
Example #3
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()
Example #4
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()
def main(isAdmin):
    """
    Main Application Runner
    :param: isAdmin
    :type : isAdmin: bool
    """
    app = QtGui.QApplication(sys.argv)
    mw = ConfigWindow(None)
    mw.show()
    app.setWindowIcon(QtGui.QIcon())
    sys.exit(app.exec_())
Example #6
0
class ConfigChooserWidget(QtGui.QWidget, Ui_ConfigChooserWidget):
  def __init__(self, *args, **kwargs):
    super(ConfigChooserWidget, self).__init__(*args, **kwargs)
    self.setupUi()
    self.bindUi()

  def setupUi(self):
    super(ConfigChooserWidget, self).setupUi(self)

  def bindUi(self):
    self.btn_open_config.clicked.connect(self.open_clicked)
    
  def open_clicked(self):
    fname, _ = QtGui.QFileDialog.getOpenFileName(self, 'Open file', '~')
    config = FileConfigLoader(fname).load_config()
    self.cf = ConfigWindow(config)
    self.cf.show()
Example #7
0
class ConfigChooserWidget(QtGui.QWidget, Ui_ConfigChooserWidget):
    def __init__(self, *args, **kwargs):
        super(ConfigChooserWidget, self).__init__(*args, **kwargs)
        self.setupUi()
        self.bindUi()

    def setupUi(self):
        super(ConfigChooserWidget, self).setupUi(self)

    def bindUi(self):
        self.btn_open_config.clicked.connect(self.open_clicked)

    def open_clicked(self):
        fname, _ = QtGui.QFileDialog.getOpenFileName(self, 'Open file', '~')
        config = FileConfigLoader(fname).load_config()
        self.cf = ConfigWindow(config)
        self.cf.show()
Example #8
0
 def open_clicked(self):
   fname, _ = QtGui.QFileDialog.getOpenFileName(self, 'Open file', '~')
   config = FileConfigLoader(fname).load_config()
   self.cf = ConfigWindow(config)
   self.cf.show()
Example #9
0
 def open_clicked(self):
     fname, _ = QtGui.QFileDialog.getOpenFileName(self, 'Open file', '~')
     config = FileConfigLoader(fname).load_config()
     self.cf = ConfigWindow(config)
     self.cf.show()