Debian Codegraph @

src/librssguard/gui/settings/settingsgeneral.cpp

raw symbols SCIP
1 // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/gui/settings/settingsgeneral.cpp`/
2
3 #include "gui/settings/settingsgeneral.h"cxx . . $ `<file>/src/librssguard/gui/settings/settingsgeneral.h`/
4
5 #include "miscellaneous/application.h"cxx . . $ `<file>/src/librssguard/miscellaneous/application.h`/
6 #include "miscellaneous/iconfactory.h"cxx . . $ `<file>/src/librssguard/miscellaneous/iconfactory.h`/
7 #include "miscellaneous/settings.h"cxx . . $ `<file>/src/librssguard/miscellaneous/settings.h`/
8 #include "miscellaneous/systemfactory.h"cxx . . $ `<file>/src/librssguard/miscellaneous/systemfactory.h`/
9
10 SettingsGeneralcxx . . $ SettingsGeneral#::SettingsGeneralcxx . . $ SettingsGeneral#SettingsGeneral(e2806c23cebd2a3f).(Settingscxx . . $ Settings#* settings, QWidgetcxx . . $ QWidget#* parent)
11 : SettingsPanelcxx . . $ SettingsPanel#(settings, parent), m_uicxx . . $ SettingsGeneral#m_ui.(new Uicxx . . $ Ui/::SettingsGeneralcxx . . $ Ui/SettingsGeneral#) {
12 m_uicxx . . $ SettingsGeneral#m_ui.->setupUicxx . . $ Ui_SettingsGeneral#setupUi(108f35f7aa7f3cf9).(this);
13 m_uicxx . . $ SettingsGeneral#m_ui.->m_checkAutostartcxx . . $ Ui_SettingsGeneral#m_checkAutostart.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(m_uicxx . . $ SettingsGeneral#m_ui.->m_checkAutostartcxx . . $ Ui_SettingsGeneral#m_checkAutostart.->textcxx . . $ QAbstractButton#text(6ef7b6c27b00b43d).().argcxx . . $ QString#arg(ad0bca07273edcc2).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!(APP_NAMEcxx . . $ `<built-in>:487:9`!)));
14 m_uicxx . . $ SettingsGeneral#m_ui.->m_checkForUpdatesOnStartcxx . . $ Ui_SettingsGeneral#m_checkForUpdatesOnStart.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(m_uicxx . . $ SettingsGeneral#m_ui.->m_checkForUpdatesOnStartcxx . . $ Ui_SettingsGeneral#m_checkForUpdatesOnStart.->textcxx . . $ QAbstractButton#text(6ef7b6c27b00b43d).().argcxx . . $ QString#arg(ad0bca07273edcc2).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!(APP_NAMEcxx . . $ `<built-in>:487:9`!)));
15
16 #if defined(NO_UPDATE_CHECK)
17 m_ui->m_checkForUpdatesOnStart->setVisible(false);
18 #endif
19
20 connectcxx . . $ QObject#connect(dad3a9587f3dce3c).(m_uicxx . . $ SettingsGeneral#m_ui.->m_checkAutostartcxx . . $ Ui_SettingsGeneral#m_checkAutostart., &QCheckBoxcxx . . $ QCheckBox#::stateChangedcxx . . $ QCheckBox#stateChanged(d4f767463ce0a6b3)., this, &SettingsGeneralcxx . . $ SettingsGeneral#::dirtifySettingscxx . . $ SettingsPanel#dirtifySettings(49f6e7a06ebc5aa8).);
21 connectcxx . . $ QObject#connect(dad3a9587f3dce3c).(m_uicxx . . $ SettingsGeneral#m_ui.->m_checkForUpdatesOnStartcxx . . $ Ui_SettingsGeneral#m_checkForUpdatesOnStart., &QCheckBoxcxx . . $ QCheckBox#::stateChangedcxx . . $ QCheckBox#stateChanged(d4f767463ce0a6b3)., this, &SettingsGeneralcxx . . $ SettingsGeneral#::dirtifySettingscxx . . $ SettingsPanel#dirtifySettings(49f6e7a06ebc5aa8).);
22 }
23
24 SettingsGeneralcxx . . $ SettingsGeneral#::~cxx . . $ SettingsGeneral#`~SettingsGeneral`(ced63f7c635d850d).SettingsGeneralcxx . . $ SettingsGeneral#() {
25 delete m_uicxx . . $ SettingsGeneral#m_ui.;
26 }
27
28 QIconcxx . . $ QIcon# SettingsGeneralcxx . . $ SettingsGeneral#::iconcxx . . $ SettingsGeneral#icon(952ef71f8967d9eb).() const {
29 return qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->iconscxx . . $ Application#icons(d976db2a0d825b70).()->fromThemecxx . . $ IconFactory#fromTheme(e457fbbee8993f3).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("applications-system"), QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("emblem-system"));
30 }
31
32 void SettingsGeneralcxx . . $ SettingsGeneral#::loadSettingscxx . . $ SettingsGeneral#loadSettings(49f6e7a06ebc5aa8).() {
33 onBeginLoadSettingscxx . . $ SettingsPanel#onBeginLoadSettings(49f6e7a06ebc5aa8).();
34 m_uicxx . . $ SettingsGeneral#m_ui.->m_checkForUpdatesOnStartcxx . . $ Ui_SettingsGeneral#m_checkForUpdatesOnStart.
35 ->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(settingscxx . . $ SettingsPanel#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(General), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(General::UpdateOnStartup)).toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).());
36
37 // Load auto-start status.
38 const SystemFactorycxx . . $ SystemFactory#::AutoStartStatuscxx . . $ SystemFactory#AutoStartStatus# autostart_status = qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->systemcxx . . $ Application#system(4ec014040ff5a0f7).()->autoStartStatuscxx . . $ SystemFactory#autoStartStatus(c24e8a3ce51f2b39).();
39
40 switch (autostart_status) {
41 case SystemFactorycxx . . $ SystemFactory#::AutoStartStatuscxx . . $ SystemFactory#AutoStartStatus#::Enabledcxx . . $ SystemFactory#AutoStartStatus#Enabled.:
42 m_uicxx . . $ SettingsGeneral#m_ui.->m_checkAutostartcxx . . $ Ui_SettingsGeneral#m_checkAutostart.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(true);
43 break;
44
45 case SystemFactorycxx . . $ SystemFactory#::AutoStartStatuscxx . . $ SystemFactory#AutoStartStatus#::Disabledcxx . . $ SystemFactory#AutoStartStatus#Disabled.:
46 m_uicxx . . $ SettingsGeneral#m_ui.->m_checkAutostartcxx . . $ Ui_SettingsGeneral#m_checkAutostart.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(false);
47 break;
48
49 default:
50 m_uicxx . . $ SettingsGeneral#m_ui.->m_checkAutostartcxx . . $ Ui_SettingsGeneral#m_checkAutostart.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false);
51 m_uicxx . . $ SettingsGeneral#m_ui.->m_checkAutostartcxx . . $ Ui_SettingsGeneral#m_checkAutostart.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(m_uicxx . . $ SettingsGeneral#m_ui.->m_checkAutostartcxx . . $ Ui_SettingsGeneral#m_checkAutostart.->textcxx . . $ QAbstractButton#text(6ef7b6c27b00b43d).() + trcxx . . $ SettingsGeneral#tr(75d9f1c324b4579d).(" (not supported on this platform)"));
52 break;
53 }
54
55 onEndLoadSettingscxx . . $ SettingsPanel#onEndLoadSettings(49f6e7a06ebc5aa8).();
56 }
57
58 void SettingsGeneralcxx . . $ SettingsGeneral#::saveSettingscxx . . $ SettingsGeneral#saveSettings(49f6e7a06ebc5aa8).() {
59 onBeginSaveSettingscxx . . $ SettingsPanel#onBeginSaveSettings(49f6e7a06ebc5aa8).();
60
61 // If auto-start feature is available and user wants to turn it on, then turn it on.
62 if (m_uicxx . . $ SettingsGeneral#m_ui.->m_checkAutostartcxx . . $ Ui_SettingsGeneral#m_checkAutostart.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()) {
63 qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->systemcxx . . $ Application#system(4ec014040ff5a0f7).()->setAutoStartStatuscxx . . $ SystemFactory#setAutoStartStatus(f0f15b2958e0b16).(SystemFactorycxx . . $ SystemFactory#::AutoStartStatuscxx . . $ SystemFactory#AutoStartStatus#::Enabledcxx . . $ SystemFactory#AutoStartStatus#Enabled.);
64 }
65 else {
66 qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->systemcxx . . $ Application#system(4ec014040ff5a0f7).()->setAutoStartStatuscxx . . $ SystemFactory#setAutoStartStatus(f0f15b2958e0b16).(SystemFactorycxx . . $ SystemFactory#::AutoStartStatuscxx . . $ SystemFactory#AutoStartStatus#::Disabledcxx . . $ SystemFactory#AutoStartStatus#Disabled.);
67 }
68
69 settingscxx . . $ SettingsPanel#settings(951936487a2d9252).()->setValuecxx . . $ Settings#setValue(365356ede4ebaabb).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(General), Generalcxx . . $ General/::UpdateOnStartupcxx . . $ General/UpdateOnStartup., m_uicxx . . $ QVariant#QVariant(9f0ba574c1c44ffc).->m_checkForUpdatesOnStartcxx . . $ Ui_SettingsGeneral#m_checkForUpdatesOnStart.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).());
70 onEndSaveSettingscxx . . $ SettingsPanel#onEndSaveSettings(49f6e7a06ebc5aa8).();
71 }