Beispiel #1
0
class FolksonomyOptionsPage(OptionsPage):

    NAME = "folsonomy"
    TITLE = N_("Folksonomy Tags")
    PARENT = "metadata"
    SORT_ORDER = 20
    ACTIVE = True

    options = [
        IntOption("setting", "max_tags", 5),
        IntOption("setting", "min_tag_usage", 90),
        TextOption("setting", "ignore_tags",
                   "seen live,favorites,fixme,owned"),
        TextOption("setting", "join_tags", ""),
        BoolOption("setting", "only_my_tags", False),
    ]

    def __init__(self, parent=None):
        super(FolksonomyOptionsPage, self).__init__(parent)
        self.ui = Ui_FolksonomyOptionsPage()
        self.ui.setupUi(self)

    def load(self):
        self.ui.max_tags.setValue(self.config.setting["max_tags"])
        self.ui.min_tag_usage.setValue(self.config.setting["min_tag_usage"])
        self.ui.join_tags.setEditText(self.config.setting["join_tags"])
        self.ui.ignore_tags.setText(self.config.setting["ignore_tags"])
        self.ui.only_my_tags.setChecked(self.config.setting["only_my_tags"])

    def save(self):
        self.config.setting["max_tags"] = self.ui.max_tags.value()
        self.config.setting["min_tag_usage"] = self.ui.min_tag_usage.value()
        self.config.setting["join_tags"] = self.ui.join_tags.currentText()
        self.config.setting["ignore_tags"] = self.ui.ignore_tags.text()
        self.config.setting["only_my_tags"] = self.ui.only_my_tags.isChecked()
Beispiel #2
0
class FolksonomyOptionsPage(OptionsPage):

    NAME = "folsonomy"
    TITLE = N_("Folksonomy Tags")
    PARENT = "metadata"
    SORT_ORDER = 20
    ACTIVE = True

    options = [
        IntOption("setting", "max_tags", 5),
        IntOption("setting", "min_tag_usage", 90),
        TextOption("setting", "ignore_tags", "seen live,favorites,fixme,owned"),
        TextOption("setting", "join_tags", ""),
        BoolOption("setting", "only_my_tags", False),
    ]

    def __init__(self, parent=None):
        super(FolksonomyOptionsPage, self).__init__(parent)
        self.ui = Ui_FolksonomyOptionsPage()
        self.ui.setupUi(self)

    def load(self):
        self.ui.max_tags.setValue(self.config.setting["max_tags"])
        self.ui.min_tag_usage.setValue(self.config.setting["min_tag_usage"])
        self.ui.join_tags.setEditText(self.config.setting["join_tags"])
        self.ui.ignore_tags.setText(self.config.setting["ignore_tags"])
        self.ui.only_my_tags.setChecked(self.config.setting["only_my_tags"])

    def save(self):
        self.config.setting["max_tags"] = self.ui.max_tags.value()
        self.config.setting["min_tag_usage"] = self.ui.min_tag_usage.value()
        self.config.setting["join_tags"] = self.ui.join_tags.currentText()
        self.config.setting["ignore_tags"] = self.ui.ignore_tags.text()
        self.config.setting["only_my_tags"] = self.ui.only_my_tags.isChecked()
Beispiel #3
0
 def __init__(self, parent=None):
     super(FolksonomyOptionsPage, self).__init__(parent)
     self.ui = Ui_FolksonomyOptionsPage()
     self.ui.setupUi(self)
Beispiel #4
0
 def __init__(self, parent=None):
     super(FolksonomyOptionsPage, self).__init__(parent)
     self.ui = Ui_FolksonomyOptionsPage()
     self.ui.setupUi(self)