コード例 #1
0
    def __init__(self, *args):

        KConfigSkeleton.__init__(self, *args)

        self.setCurrentGroup("General")

        if not PY3:
            self._danbooru_boards_list = QStringList()
            predefined_urls = QStringList(["http://oreno.imouto.org", "http://konachan.com", "http://konachan.net"])
            self._danbooru_boards = self.addItemStringList("danbooruUrls", self._danbooru_boards_list, predefined_urls)
        else:
            self._danbooru_boards_list = list()
            predefined_urls = ["http://oreno.imouto.org", "http://konachan.com", "http://konachan.net"]
            self._danbooru_boards = self.addItemStringList("danbooruUrls", self._danbooru_boards_list, predefined_urls)

        self._max_retrieve = self.addItemInt("thumbnailMaxRetrieve", 100, 100)

        self._nepomuk_enabled = self.addItemBool("nepomukEnabled", False, False)

        self._tag_blacklist_values = QStringList()
        predefined_blacklist = QStringList(["tagme", "jpeg_artifacts", "scan", "fixme", "crease"])
        self._tag_blacklist = self.addItemStringList("tagBlacklist", self._tag_blacklist_values, predefined_blacklist)
        self._column_number = self.addItemInt("displayColumns", 3, 3)

        self._max_rating_value = 0
        self._max_rating = self.addItemInt("maxAllowedRating", self._max_rating_value, 0)

        self.readConfig()
コード例 #2
0
    def __init__(self, *args):

        KConfigSkeleton.__init__(self, *args)

        self.setCurrentGroup("General")

        if not PY3:
            self._danbooru_boards_list = QStringList()
            predefined_urls = QStringList([
                "http://oreno.imouto.org", "http://konachan.com",
                "http://konachan.net"
            ])
            self._danbooru_boards = self.addItemStringList(
                "danbooruUrls", self._danbooru_boards_list, predefined_urls)
        else:
            self._danbooru_boards_list = list()
            predefined_urls = [
                "http://oreno.imouto.org", "http://konachan.com",
                "http://konachan.net"
            ]
            self._danbooru_boards = self.addItemStringList(
                "danbooruUrls", self._danbooru_boards_list, predefined_urls)

        self._max_retrieve = self.addItemInt("thumbnailMaxRetrieve", 100, 100)

        self._nepomuk_enabled = self.addItemBool("nepomukEnabled", False,
                                                 False)

        self._tag_blacklist_values = QStringList()
        predefined_blacklist = QStringList(
            ["tagme", "jpeg_artifacts", "scan", "fixme", "crease"])
        self._tag_blacklist = self.addItemStringList(
            "tagBlacklist", self._tag_blacklist_values, predefined_blacklist)
        self._column_number = self.addItemInt("displayColumns", 3, 3)

        self._max_rating_value = 0
        self._max_rating = self.addItemInt("maxAllowedRating",
                                           self._max_rating_value, 0)

        self.readConfig()
コード例 #3
0
ファイル: trayapplication.py プロジェクト: adaptee/synaptiks
 def __init__(self, parent=None):
     KConfigSkeleton.__init__(self, 'synaptiksrc', parent)
     self.setCurrentGroup('General')
     self.addItemBool('Autostart', False, False)