File indexing completed on 2024-04-21 05:46:31
0001 // SPDX-FileCopyrightText: 2020 Simon Persson <simon.persson@mykolab.com> 0002 // 0003 // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 0005 #ifndef KUPKCM_H 0006 #define KUPKCM_H 0007 0008 #include <KCModule> 0009 #include <KSharedConfig> 0010 0011 class BackupPlan; 0012 class BackupPlanWidget; 0013 class KupSettings; 0014 class KupSettingsWidget; 0015 class PlanStatusWidget; 0016 0017 class KAssistantDialog; 0018 class KPageWidgetItem; 0019 class QPushButton; 0020 0021 class QCheckBox; 0022 class QStackedLayout; 0023 class QVBoxLayout; 0024 0025 class KupKcm : public KCModule 0026 { 0027 Q_OBJECT 0028 public: 0029 #if QT_VERSION_MAJOR == 5 0030 KupKcm(QWidget *pParent, const QVariantList &pArgs); 0031 QSize sizeHint() const override; 0032 #else 0033 KupKcm(QObject *parent, const KPluginMetaData &md, const QVariantList &pArgs); 0034 #endif 0035 0036 public slots: 0037 void load() override; 0038 void save() override; 0039 0040 void updateChangedStatus(); 0041 void showFrontPage(); 0042 0043 private: 0044 void createSettingsFrontPage(); 0045 void createPlanWidgets(int pIndex); 0046 void completelyRemovePlan(int pIndex); 0047 void partiallyRemovePlan(int pIndex); 0048 0049 KSharedConfigPtr mConfig; 0050 KupSettings *mSettings; 0051 QWidget *mFrontPage{}; 0052 QList<BackupPlan *> mPlans; 0053 QList<BackupPlanWidget *> mPlanWidgets; 0054 QList<PlanStatusWidget *> mStatusWidgets; 0055 QList<KConfigDialogManager *> mConfigManagers; 0056 QStackedLayout *mStackedLayout; 0057 QVBoxLayout *mVerticalLayout{}; 0058 QCheckBox *mEnableCheckBox{}; 0059 QString mBupVersion; 0060 QString mRsyncVersion; 0061 bool mPar2Available; 0062 int mSourcePageToShow; 0063 }; 0064 0065 #endif // KUPKCM_H