-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
790 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
// This file is generated by kconfig_compiler_kf5 from pakGuiSettings.kcfg. | ||
// All changes you do to this file will be lost. | ||
|
||
#include "pakGuiSettings.h" | ||
|
||
#include <qglobal.h> | ||
#include <QFile> | ||
|
||
class pakGuiSettingsHelper | ||
{ | ||
public: | ||
pakGuiSettingsHelper() : q(nullptr) {} | ||
~pakGuiSettingsHelper() { delete q; q = nullptr; } | ||
pakGuiSettingsHelper(const pakGuiSettingsHelper&) = delete; | ||
pakGuiSettingsHelper& operator=(const pakGuiSettingsHelper&) = delete; | ||
pakGuiSettings *q; | ||
}; | ||
Q_GLOBAL_STATIC(pakGuiSettingsHelper, s_globalpakGuiSettings) | ||
pakGuiSettings *pakGuiSettings::self() | ||
{ | ||
if (!s_globalpakGuiSettings()->q) { | ||
new pakGuiSettings; | ||
s_globalpakGuiSettings()->q->read(); | ||
} | ||
|
||
return s_globalpakGuiSettings()->q; | ||
} | ||
|
||
pakGuiSettings::pakGuiSettings( ) | ||
: KConfigSkeleton( QStringLiteral( "pak-gui.rc" ) ) | ||
{ | ||
Q_ASSERT(!s_globalpakGuiSettings()->q); | ||
s_globalpakGuiSettings()->q = this; | ||
setCurrentGroup( QStringLiteral( "General" ) ); | ||
|
||
KConfigSkeleton::ItemInt *itemHistory_store_time_in_days; | ||
itemHistory_store_time_in_days = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "history_store_time_in_days" ), mHistory_store_time_in_days, 0 ); | ||
addItem( itemHistory_store_time_in_days, QStringLiteral( "history_store_time_in_days" ) ); | ||
KConfigSkeleton::ItemInt *itemHistory_file_size_limit_in_Mb; | ||
itemHistory_file_size_limit_in_Mb = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "history_file_size_limit_in_Mb" ), mHistory_file_size_limit_in_Mb, 5 ); | ||
addItem( itemHistory_file_size_limit_in_Mb, QStringLiteral( "history_file_size_limit_in_Mb" ) ); | ||
KConfigSkeleton::ItemInt *itemInternet_reconnection_time_in_minutes; | ||
itemInternet_reconnection_time_in_minutes = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "internet_reconnection_time_in_minutes" ), mInternet_reconnection_time_in_minutes, 1 ); | ||
addItem( itemInternet_reconnection_time_in_minutes, QStringLiteral( "internet_reconnection_time_in_minutes" ) ); | ||
KConfigSkeleton::ItemInt *itemUpdate_check_time_in_days; | ||
itemUpdate_check_time_in_days = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "update_check_time_in_days" ), mUpdate_check_time_in_days, 0 ); | ||
addItem( itemUpdate_check_time_in_days, QStringLiteral( "update_check_time_in_days" ) ); | ||
KConfigSkeleton::ItemInt *itemUpdate_check_time_in_hours; | ||
itemUpdate_check_time_in_hours = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "update_check_time_in_hours" ), mUpdate_check_time_in_hours, 6 ); | ||
addItem( itemUpdate_check_time_in_hours, QStringLiteral( "update_check_time_in_hours" ) ); | ||
KConfigSkeleton::ItemInt *itemUpdate_check_time_in_minutes; | ||
itemUpdate_check_time_in_minutes = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "update_check_time_in_minutes" ), mUpdate_check_time_in_minutes, 0 ); | ||
addItem( itemUpdate_check_time_in_minutes, QStringLiteral( "update_check_time_in_minutes" ) ); | ||
KConfigSkeleton::ItemBool *itemManual_operations_checkbox; | ||
itemManual_operations_checkbox = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "manual_operations_checkbox" ), mManual_operations_checkbox, false ); | ||
addItem( itemManual_operations_checkbox, QStringLiteral( "manual_operations_checkbox" ) ); | ||
KConfigSkeleton::ItemBool *itemOverwrite_full_history_file; | ||
itemOverwrite_full_history_file = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "overwrite_full_history_file" ), mOverwrite_full_history_file, false ); | ||
addItem( itemOverwrite_full_history_file, QStringLiteral( "overwrite_full_history_file" ) ); | ||
KConfigSkeleton::ItemBool *itemUse_system_tray_icon; | ||
itemUse_system_tray_icon = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "use_system_tray_icon" ), mUse_system_tray_icon, false ); | ||
addItem( itemUse_system_tray_icon, QStringLiteral( "use_system_tray_icon" ) ); | ||
|
||
setCurrentGroup( QStringLiteral( "ConsolesPreview" ) ); | ||
|
||
KConfigSkeleton::ItemColor *itemBackground_preview_color; | ||
itemBackground_preview_color = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "background_preview_color" ), mBackground_preview_color, QColor( "black" ) ); | ||
addItem( itemBackground_preview_color, QStringLiteral( "background_preview_color" ) ); | ||
KConfigSkeleton::ItemColor *itemPreview_font_color; | ||
itemPreview_font_color = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "preview_font_color" ), mPreview_font_color, QColor( "white" ) ); | ||
addItem( itemPreview_font_color, QStringLiteral( "preview_font_color" ) ); | ||
KConfigSkeleton::ItemString *itemPreview_font_family; | ||
itemPreview_font_family = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "preview_font_family" ), mPreview_font_family, QStringLiteral( "Noto Sans" ) ); | ||
addItem( itemPreview_font_family, QStringLiteral( "preview_font_family" ) ); | ||
KConfigSkeleton::ItemInt *itemPreview_font_size; | ||
itemPreview_font_size = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "preview_font_size" ), mPreview_font_size, 15 ); | ||
addItem( itemPreview_font_size, QStringLiteral( "preview_font_size" ) ); | ||
|
||
setCurrentGroup( QStringLiteral( "PackageInfo" ) ); | ||
|
||
QStringList defaultpackages_info_available; | ||
defaultpackages_info_available.append( QString::fromUtf8( "Architecture" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "URL" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Licenses" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Groups" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Provides" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Optional Deps" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "RequiredBy" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Optional For" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Conflicts With" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Replaces" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Installed Size" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Packager" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Build Date" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Install Date" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Install Reason" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Install Script" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Validated By" ) ); | ||
defaultpackages_info_available.append( QString::fromUtf8( "Download Size" ) ); | ||
|
||
KConfigSkeleton::ItemStringList *itemPackages_info_available; | ||
itemPackages_info_available = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "packages_info_available" ), mPackages_info_available, defaultpackages_info_available ); | ||
addItem( itemPackages_info_available, QStringLiteral( "packages_info_available" ) ); | ||
QStringList defaultpackages_info_selected; | ||
defaultpackages_info_selected.append( QString::fromUtf8( "Name" ) ); | ||
defaultpackages_info_selected.append( QString::fromUtf8( "Version" ) ); | ||
defaultpackages_info_selected.append( QString::fromUtf8( "Description" ) ); | ||
defaultpackages_info_selected.append( QString::fromUtf8( "Depends On" ) ); | ||
|
||
KConfigSkeleton::ItemStringList *itemPackages_info_selected; | ||
itemPackages_info_selected = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "packages_info_selected" ), mPackages_info_selected, defaultpackages_info_selected ); | ||
addItem( itemPackages_info_selected, QStringLiteral( "packages_info_selected" ) ); | ||
|
||
setCurrentGroup( QStringLiteral( "Logs" ) ); | ||
|
||
KConfigSkeleton::ItemBool *itemSave_logs_into_file; | ||
itemSave_logs_into_file = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "save_logs_into_file" ), mSave_logs_into_file, true ); | ||
addItem( itemSave_logs_into_file, QStringLiteral( "save_logs_into_file" ) ); | ||
KConfigSkeleton::ItemString *itemLogs_filename; | ||
itemLogs_filename = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "logs_filename" ), mLogs_filename, QStringLiteral( "logs.txt" ) ); | ||
addItem( itemLogs_filename, QStringLiteral( "logs_filename" ) ); | ||
KConfigSkeleton::ItemString *itemLogs_filepath; | ||
itemLogs_filepath = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "logs_filepath" ), mLogs_filepath, QStringLiteral( "~/.config/pak-gui" ) ); | ||
addItem( itemLogs_filepath, QStringLiteral( "logs_filepath" ) ); | ||
KConfigSkeleton::ItemBool *itemShow_debug; | ||
itemShow_debug = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "show_debug" ), mShow_debug, false ); | ||
addItem( itemShow_debug, QStringLiteral( "show_debug" ) ); | ||
KConfigSkeleton::ItemBool *itemHide_info_logs; | ||
itemHide_info_logs = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "hide_info_logs" ), mHide_info_logs, false ); | ||
addItem( itemHide_info_logs, QStringLiteral( "hide_info_logs" ) ); | ||
|
||
setCurrentGroup( QStringLiteral( "Styles" ) ); | ||
|
||
KConfigSkeleton::ItemString *itemApp_style_name; | ||
itemApp_style_name = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "app_style_name" ), mApp_style_name ); | ||
addItem( itemApp_style_name, QStringLiteral( "app_style_name" ) ); | ||
} | ||
|
||
pakGuiSettings::~pakGuiSettings() | ||
{ | ||
if (s_globalpakGuiSettings.exists() && !s_globalpakGuiSettings.isDestroyed()) { | ||
s_globalpakGuiSettings()->q = nullptr; | ||
} | ||
} | ||
|
Oops, something went wrong.