Preparation for KConfigXT based configuration
This commit is contained in:
parent
735d08f1a8
commit
39e3a76e4b
3 changed files with 36 additions and 3 deletions
|
@ -25,6 +25,8 @@ ki18n_wrap_ui(danbooru_client_SRCS
|
||||||
ui/danbooruclientview.ui
|
ui/danbooruclientview.ui
|
||||||
ui/danbooruconnectwidget.ui)
|
ui/danbooruconnectwidget.ui)
|
||||||
|
|
||||||
|
kconfig_add_kcfg_files(danbooru_client_SRCS danboorusettings.kcfgc)
|
||||||
|
|
||||||
add_executable(danbooru_client
|
add_executable(danbooru_client
|
||||||
${danbooru_client_SRCS}
|
${danbooru_client_SRCS}
|
||||||
)
|
)
|
||||||
|
|
30
src/danboorusettings.kcfg
Normal file
30
src/danboorusettings.kcfg
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/standards/kcfg/1.0/kcfg.xsd">
|
||||||
|
|
||||||
|
<kcfgfile name="danbooru_clientrc"/>
|
||||||
|
|
||||||
|
<group name="danbooru_client">
|
||||||
|
<entry name="MaxPosts" type="Int">
|
||||||
|
<default>10</default>
|
||||||
|
<min>1</min>
|
||||||
|
<max>100</max>
|
||||||
|
<label>The number of posts to retrieve.</label>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry name="TagBlacklist" type="StringList">
|
||||||
|
<label>Exclude posts including these tags.</label>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry name="Boards" type="StringList">
|
||||||
|
<label>Danbooru boards to connect to.</label>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry name="CacheSize" type="Int">
|
||||||
|
<label>Size of the thumbnail cache.</label>
|
||||||
|
<min>1000</min>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
</group>
|
||||||
|
</kcfg>
|
|
@ -1,6 +1,7 @@
|
||||||
# Code generation options for kconfig_compiler
|
# Code generation options for kconfig_compiler
|
||||||
File=danbooru_client.kcfg
|
File=danboorusettings.kcfg
|
||||||
ClassName=Settings
|
NameSpace=Danbooru
|
||||||
|
ClassName=DanbooruSettings
|
||||||
Singleton=true
|
Singleton=true
|
||||||
Mutators=col_background,col_foreground
|
Mutators=true
|
||||||
# will create the necessary code for setting those variables
|
# will create the necessary code for setting those variables
|
Loading…
Add table
Add a link
Reference in a new issue