How to use the urh.constants.SETTINGS.setValue function in urh

To help you get started, we’ve selected a few urh examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jopohl / urh / tests / test_maincontroller_gui.py View on Github external
def test_open_recent_file(self):
        constants.SETTINGS.setValue("recentFiles", [])

        # Ensure we have at least one recent action
        self.form.add_files([get_path_for_data_file("esaver.coco")])
        self.assertEqual(len(self.form.signal_tab_controller.signal_frames), 1)

        self.form.recentFileActionList[0].trigger()
        self.assertEqual(len(self.form.signal_tab_controller.signal_frames), 2)
github jopohl / urh / src / urh / controller / dialogs / ModulatorDialog.py View on Github external
def closeEvent(self, event: QCloseEvent):
        self.ui.lineEditParameters.editingFinished.emit()
        constants.SETTINGS.setValue("{}/geometry".format(self.__class__.__name__), self.saveGeometry())

        for gv in (self.ui.gVCarrier, self.ui.gVData, self.ui.gVModulated, self.ui.gVOriginalSignal):
            # Eliminate graphic views to prevent segfaults
            gv.eliminate()

        super().closeEvent(event)
github jopohl / urh / src / urh / controller / widgets / DeviceSettingsWidget.py View on Github external
def on_btn_lock_bw_sr_clicked(self):
        self.bw_sr_are_locked = self.ui.btnLockBWSR.isChecked()
        constants.SETTINGS.setValue("lock_bandwidth_sample_rate", self.bw_sr_are_locked)
        if self.bw_sr_are_locked:
            self.ui.btnLockBWSR.setIcon(QIcon(":/icons/icons/lock.svg"))
            self.ui.spinBoxBandwidth.setValue(self.ui.spinBoxSampleRate.value())
            self.ui.spinBoxBandwidth.editingFinished.emit()
        else:
            self.ui.btnLockBWSR.setIcon(QIcon(":/icons/icons/unlock.svg"))
github jopohl / urh / src / urh / controller / FuzzingDialogController.py View on Github external
def closeEvent(self, event: QCloseEvent):
        constants.SETTINGS.setValue("{}/geometry".format(self.__class__.__name__), self.saveGeometry())
        super().closeEvent(event)
github jopohl / urh / src / urh / controller / dialogs / MessageTypeDialog.py View on Github external
def closeEvent(self, event: QCloseEvent):
        self.ui.tblViewRuleset.setItemDelegateForColumn(2, None)
        self.ui.tblViewRuleset.setItemDelegateForColumn(3, None)
        constants.SETTINGS.setValue("{}/geometry".format(self.__class__.__name__), self.saveGeometry())
        super().closeEvent(event)
github jopohl / urh / src / urh / controller / widgets / PluginFrame.py View on Github external
def save_enabled_states(self):
        for plugin in self.model.plugins:
            constants.SETTINGS.setValue(plugin.name, plugin.enabled)
github jopohl / urh / src / urh / controller / dialogs / FilterBandwidthDialog.py View on Github external
def on_accepted(self):
        if self.checked_radiobutton is not None:
            bw_type = self.checked_radiobutton.objectName().replace("radioButton", "").replace("_", " ")
            constants.SETTINGS.setValue("bandpass_filter_bw_type", bw_type)

        constants.SETTINGS.setValue("bandpass_filter_custom_bw", self.ui.doubleSpinBoxCustomBandwidth.value())
github jopohl / urh / src / urh / controller / dialogs / DecoderDialog.py View on Github external
def closeEvent(self, event: QCloseEvent):
        constants.SETTINGS.setValue("{}/geometry".format(self.__class__.__name__), self.saveGeometry())
        super().closeEvent(event)
github jopohl / urh / src / urh / controller / dialogs / OptionsDialog.py View on Github external
def set_gnuradio_status(self):
        self.backend_handler.python2_exe = self.ui.lineEditPython2Interpreter.text()

        self.backend_handler.gnuradio_install_dir = self.ui.lineEditGnuradioDirectory.text()
        constants.SETTINGS.setValue("gnuradio_install_dir", self.ui.lineEditGnuradioDirectory.text())

        self.backend_handler.use_gnuradio_install_dir = self.ui.radioButtonGnuradioDirectory.isChecked()
        self.backend_handler.set_gnuradio_installed_status()
        constants.SETTINGS.setValue("use_gnuradio_install_dir", self.backend_handler.use_gnuradio_install_dir)

        self.refresh_device_tab()