Beispiel #1
0
    def plugin_browse_clicked(self):
        last_dir = get_home_path()

        if len(self.edit_custom_plugin.text()) > 0:
            last_dir = os.path.dirname(os.path.realpath(self.edit_custom_plugin.text()))

        filename = get_open_file_name(get_main_window(), 'Open Plugin', last_dir, '*.bin')

        if len(filename) > 0:
            self.edit_custom_plugin.setText(filename)
Beispiel #2
0
    def sample_file_clicked(self):
        if len(self.sample_edit.text()) > 0:
            last_dir = os.path.dirname(os.path.realpath(self.sample_edit.text()))
        else:
            last_dir = get_home_path()

        filename = get_open_file_name(get_main_window(), "Open Sample Points", last_dir)

        if len(filename) > 0:
            self.sample_edit.setText(filename)
Beispiel #3
0
    def firmware_browse_clicked(self):
        if len(self.edit_custom_firmware.text()) > 0:
            last_dir = os.path.dirname(os.path.realpath(self.edit_custom_firmware.text()))
        else:
            last_dir = get_home_path()

        filename = get_open_file_name(get_main_window(), 'Open Firmware', last_dir, '*.bin')

        if len(filename) > 0:
            self.edit_custom_firmware.setText(filename)
Beispiel #4
0
    def sample_file_clicked(self):
        if len(self.sample_edit.text()) > 0:
            last_dir = os.path.dirname(os.path.realpath(self.sample_edit.text()))
        else:
            last_dir = get_home_path()

        filename = get_open_file_name(get_main_window(), "Open Sample Points", last_dir)

        if len(filename) > 0:
            self.sample_edit.setText(filename)
Beispiel #5
0
    def private_key_browse_clicked(self):
        if len(self.wifi_private_key_url.text()) > 0:
            last_dir = os.path.dirname(os.path.realpath(self.wifi_private_key_url.text()))
        else:
            last_dir = get_home_path()

        filename = get_open_file_name(get_main_window(), 'Open Private Key', last_dir)

        if len(filename) > 0:
            self.wifi_private_key_url.setText(filename)
Beispiel #6
0
    def client_certificate_browse_clicked(self):
        if len(self.wifi_client_certificate_url.text()) > 0:
            last_dir = os.path.dirname(os.path.realpath(self.wifi_client_certificate_url.text()))
        else:
            last_dir = get_home_path()

        filename = get_open_file_name(get_main_window(), 'Open Client Certificate', last_dir)

        if len(filename) > 0:
            self.wifi_client_certificate_url.setText(filename)
    def browse_archive(self):
        if len(self.edit_archive.text()) > 0:
            last_directory = os.path.dirname(os.path.realpath(self.edit_archive.text()))
        else:
            last_directory = get_home_path()

        filename = get_open_file_name(get_main_window(), 'Open Archive', last_directory, '*.tfrba')

        if len(filename) > 0:
            self.edit_archive.setText(filename)
            self.refresh_program_list()
    def browse_archive(self):
        if len(self.edit_archive.text()) > 0:
            last_directory = os.path.dirname(os.path.realpath(self.edit_archive.text()))
        else:
            last_directory = get_home_path()

        filename = get_open_file_name(get_main_window(), 'Open Archive', last_directory, '*.tfrba')

        if len(filename) > 0:
            self.edit_archive.setText(filename)
            self.refresh_program_list()
Beispiel #9
0
    def btn_load_config_clicked(self):
        filename = get_open_file_name(get_main_window(), 'Load Config',
                                      get_home_path(), 'JSON Files (*.json)')

        if len(filename) == 0:
            return

        config = load_and_validate_config(filename)

        if config == None:
            QMessageBox.warning(get_main_window(), 'Load Config',
                                'Could not load config from file! See Debug tab for details.',
                                QMessageBox.Ok)
            return

        self.update_setup_tab(config)
        self.update_devices_tab(config)
Beispiel #10
0
    def btn_load_config_clicked(self):
        filename = get_open_file_name(self, 'Load Config',
                                      get_home_path(), 'JSON Files(*.json);;All Files(*)')

        if len(filename) == 0:
            return

        config = load_and_validate_config(filename)

        if config == None:
            QMessageBox.warning(self, 'Load Config',
                                'Could not load config from file! See Debug tab for details.',
                                QMessageBox.Ok)
            return

        self.update_setup_tab(config)
        self.update_devices_tab(config)