File indexing completed on 2024-05-05 16:27:23

0001 /* This file is part of KGraphViewer.
0002    Copyright (C) 2005-2007 Gael de Chalendar <kleag@free.fr>
0003 
0004    KGraphViewer is free software; you can redistribute it and/or
0005    modify it under the terms of the GNU General Public
0006    License as published by the Free Software Foundation, version 2.
0007 
0008    This program is distributed in the hope that it will be useful,
0009    but WITHOUT ANY WARRANTY; without even the implied warranty of
0010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0011    General Public License for more details.
0012 
0013    You should have received a copy of the GNU General Public License
0014    along with this program; if not, write to the Free Software
0015    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
0016    02110-1301, USA
0017 */
0018 
0019 #ifndef KGRAPHVIEWERCONFIGDIALOG_H
0020 #define KGRAPHVIEWERCONFIGDIALOG_H
0021 
0022 #include <QLoggingCategory>
0023 
0024 #include <KConfigSkeleton>
0025 #include <kconfigdialog.h>
0026 
0027 namespace Ui
0028 {
0029 class KGraphViewerPreferencesParsingWidget;
0030 class KGraphViewerPreferencesReloadWidget;
0031 class KGraphViewerPreferencesOpenInExistingWindowWidget;
0032 class KGraphViewerPreferencesReopenPreviouslyOpenedFilesWidget;
0033 class KGraphViewerPreferencesAppearanceWidget;
0034 }
0035 
0036 /**
0037  * This is the KGraphViewer configuration dialog
0038  *
0039  * @short Configuration dialog
0040  * @author Gaƫl de Chalendar <kleag@free.fr>
0041  */
0042 class KgvConfigurationDialog : public KConfigDialog
0043 {
0044     Q_OBJECT
0045 public:
0046     KgvConfigurationDialog(QWidget *parent, const QString &name, KConfigSkeleton *config);
0047 
0048     ~KgvConfigurationDialog() override;
0049 
0050 Q_SIGNALS:
0051     void backgroundColorChanged(const QColor &color);
0052 
0053 protected Q_SLOTS:
0054     void updateSettings() override;
0055     void updateWidgets() override;
0056 
0057     void settingChanged(int);
0058     void slotBackgroundColorChanged(const QColor &color);
0059 
0060 protected:
0061     bool hasChanged() override;
0062 
0063     bool m_changed;
0064 
0065 public:
0066     Ui::KGraphViewerPreferencesParsingWidget *parsingWidget;
0067     Ui::KGraphViewerPreferencesReloadWidget *reloadWidget;
0068     Ui::KGraphViewerPreferencesOpenInExistingWindowWidget *openingWidget;
0069     Ui::KGraphViewerPreferencesReopenPreviouslyOpenedFilesWidget *reopeningWidget;
0070     Ui::KGraphViewerPreferencesAppearanceWidget *appearanceWidget;
0071 };
0072 
0073 #endif