File indexing completed on 2024-04-28 15:14:02

0001 /***************************************************************************
0002     File                 : SettingsDialog.h
0003     Project              : LabPlot
0004     --------------------------------------------------------------------
0005     Copyright            : (C) 2008-2020 Alexander Semke (alexander.semke@web.de)
0006     Description          : application settings dialog
0007 
0008  ***************************************************************************/
0009 
0010 /***************************************************************************
0011  *                                                                         *
0012  *  This program is free software; you can redistribute it and/or modify   *
0013  *  it under the terms of the GNU General Public License as published by   *
0014  *  the Free Software Foundation; either version 2 of the License, or      *
0015  *  (at your option) any later version.                                    *
0016  *                                                                         *
0017  *  This program is distributed in the hope that it will be useful,        *
0018  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
0019  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
0020  *  GNU General Public License for more details.                           *
0021  *                                                                         *
0022  *   You should have received a copy of the GNU General Public License     *
0023  *   along with this program; if not, write to the Free Software           *
0024  *   Foundation, Inc., 51 Franklin Street, Fifth Floor,                    *
0025  *   Boston, MA  02110-1301  USA                                           *
0026  *                                                                         *
0027  ***************************************************************************/
0028 #ifndef SETTINGSDIALOG_H
0029 #define SETTINGSDIALOG_H
0030 
0031 #include <KPageDialog>
0032 
0033 class QAbstractButton;
0034 class SettingsGeneralPage;
0035 class SettingsSpreadsheetPage;
0036 class SettingsWorksheetPage;
0037 // class SettingsWelcomePage;
0038 class SettingsDatasetsPage;
0039 
0040 #ifdef HAVE_KUSERFEEDBACK
0041 namespace KUserFeedback {
0042     class FeedbackConfigWidget;
0043 }
0044 #endif
0045 
0046 class SettingsDialog : public KPageDialog {
0047     Q_OBJECT
0048 
0049 public:
0050     explicit SettingsDialog(QWidget*);
0051     ~SettingsDialog() override;
0052 
0053 private slots:
0054     void changed();
0055     void slotButtonClicked(QAbstractButton*);
0056 
0057 private:
0058     bool m_changed{false};
0059     SettingsGeneralPage* m_generalPage;
0060     SettingsWorksheetPage* m_worksheetPage;
0061     SettingsSpreadsheetPage* m_spreadsheetPage;
0062 //  SettingsWelcomePage* m_welcomePage;
0063     SettingsDatasetsPage* m_datasetsPage;
0064 
0065 #ifdef HAVE_KUSERFEEDBACK
0066     KUserFeedback::FeedbackConfigWidget* m_userFeedbackWidget;
0067 #endif
0068 
0069     void applySettings();
0070     void restoreDefaults();
0071 
0072 signals:
0073     void settingsChanged();
0074     void resetWelcomeScreen();
0075 };
0076 
0077 #endif