File indexing completed on 2024-05-19 04:07:47
0001 /* 0002 SPDX-FileCopyrightText: 2010 Stefan Majewsky <majewsky@gmx.net> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef PALAPELI_CONFIGDIALOG_H 0008 #define PALAPELI_CONFIGDIALOG_H 0009 0010 #include "ui_settings.h" 0011 0012 #include <KConfigDialog> 0013 0014 namespace Palapeli 0015 { 0016 class TriggerConfigWidget; 0017 0018 class ConfigDialog : public KConfigDialog 0019 { 0020 Q_OBJECT 0021 public: 0022 explicit ConfigDialog(QWidget* parent = nullptr); 0023 0024 enum SolutionSpace { Center, None, TopLeft, TopRight, 0025 BottomLeft, BottomRight }; 0026 protected: 0027 bool hasChanged() override; 0028 bool isDefault() override; 0029 void updateSettings() override; 0030 void updateWidgets() override; 0031 void updateWidgetsDefault() override; 0032 void showEvent(QShowEvent* event) override; 0033 private Q_SLOTS: 0034 void solutionAreaChange(int index); 0035 private: 0036 void setupSolutionAreaComboBox(); 0037 Ui::Settings m_generalUi; 0038 Palapeli::TriggerConfigWidget* m_triggerPage; 0039 bool m_shownForFirstTime; 0040 }; 0041 } 0042 0043 #endif // PALAPELI_CONFIGDIALOG_H