File indexing completed on 2024-04-28 17:06:09
0001 /* 0002 SPDX-FileCopyrightText: 2000 Shie Erlich <krusader@users.sourceforge.net> 0003 SPDX-FileCopyrightText: 2000 Rafi Yanai <krusader@users.sourceforge.net> 0004 SPDX-FileCopyrightText: 2004-2022 Krusader Krew <https://krusader.org> 0005 0006 SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef KONFIGURATOR_H 0010 #define KONFIGURATOR_H 0011 0012 #include "konfiguratorpage.h" 0013 0014 // QtCore 0015 #include <QTimer> 0016 0017 #include <KWidgetsAddons/KPageDialog> 0018 0019 class QString; 0020 class QResizeEvent; 0021 class QCloseEvent; 0022 0023 class Konfigurator : public KPageDialog 0024 { 0025 Q_OBJECT 0026 0027 signals: 0028 void configChanged(bool isGUIRestartNeeded); 0029 0030 public: 0031 explicit Konfigurator(bool f = false, int startPage = 0); // true if Konfigurator is run for the first time 0032 0033 void reject() override; 0034 0035 protected: 0036 void newPage(KonfiguratorPage *, const QString &, const QString &, const QIcon &); // adds widget and connects to slot 0037 void createLayout(int startPage); 0038 void closeDialog(); 0039 0040 void resizeEvent(QResizeEvent *e) override; 0041 void closeEvent(QCloseEvent *event) override; 0042 0043 protected slots: 0044 void slotApplyEnable(); 0045 bool slotPageSwitch(KPageWidgetItem *, KPageWidgetItem *); 0046 void slotRestorePage(); 0047 void slotClose(); 0048 void slotApply(); 0049 void slotReset(); 0050 void slotRestoreDefaults(); 0051 void slotShowHelp(); 0052 0053 private: 0054 QList<KPageWidgetItem *> kgPages; 0055 bool firstTime; 0056 KPageWidgetItem *lastPage; 0057 bool internalCall; 0058 QTimer restoreTimer; 0059 int sizeX; 0060 int sizeY; 0061 }; 0062 0063 #endif