class MatchingOptionsPage(OptionsPage): NAME = "matching" TITLE = N_("Matching") PARENT = "advanced" SORT_ORDER = 30 ACTIVE = True options = [ FloatOption("setting", "file_lookup_threshold", 0.7), FloatOption("setting", "cluster_lookup_threshold", 0.8), FloatOption("setting", "track_matching_threshold", 0.4), ] _release_type_sliders = {} def __init__(self, parent=None): super(MatchingOptionsPage, self).__init__(parent) self.ui = Ui_MatchingOptionsPage() self.ui.setupUi(self) def load(self): self.ui.file_lookup_threshold.setValue(int(self.config.setting["file_lookup_threshold"] * 100)) self.ui.cluster_lookup_threshold.setValue(int(self.config.setting["cluster_lookup_threshold"] * 100)) self.ui.track_matching_threshold.setValue(int(self.config.setting["track_matching_threshold"] * 100)) def save(self): self.config.setting["file_lookup_threshold"] = float(self.ui.file_lookup_threshold.value()) / 100.0 self.config.setting["cluster_lookup_threshold"] = float(self.ui.cluster_lookup_threshold.value()) / 100.0 self.config.setting["track_matching_threshold"] = float(self.ui.track_matching_threshold.value()) / 100.0
class MatchingOptionsPage(OptionsPage): NAME = "matching" TITLE = N_("Matching") PARENT = "advanced" SORT_ORDER = 30 ACTIVE = True options = [ config.FloatOption("setting", "file_lookup_threshold", 0.7), config.FloatOption("setting", "cluster_lookup_threshold", 0.7), config.FloatOption("setting", "track_matching_threshold", 0.4), ] _release_type_sliders = {} def __init__(self, parent=None): super().__init__(parent) self.ui = Ui_MatchingOptionsPage() self.ui.setupUi(self) def load(self): self.ui.file_lookup_threshold.setValue(int(config.setting["file_lookup_threshold"] * 100)) self.ui.cluster_lookup_threshold.setValue(int(config.setting["cluster_lookup_threshold"] * 100)) self.ui.track_matching_threshold.setValue(int(config.setting["track_matching_threshold"] * 100)) def save(self): config.setting["file_lookup_threshold"] = float(self.ui.file_lookup_threshold.value()) / 100.0 config.setting["cluster_lookup_threshold"] = float(self.ui.cluster_lookup_threshold.value()) / 100.0 config.setting["track_matching_threshold"] = float(self.ui.track_matching_threshold.value()) / 100.0
def __init__(self, parent=None): super().__init__(parent) self.ui = Ui_MatchingOptionsPage() self.ui.setupUi(self)
def __init__(self, parent=None): super(MatchingOptionsPage, self).__init__(parent) self.ui = Ui_MatchingOptionsPage() self.ui.setupUi(self)