File indexing completed on 2024-04-21 05:41:00

0001 /*
0002     SPDX-FileCopyrightText: 2011 Vishesh Yadav <vishesh3y@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef HGCONFIGDIALOG_H
0008 #define HGCONFIGDIALOG_H
0009 
0010 #include "hgconfig.h"
0011 #include <KPageDialog>
0012 
0013 class HgGeneralConfigWidget;
0014 class HgPathConfigWidget;
0015 class HgIgnoreWidget;
0016 class HgPluginSettingsWidget;
0017 
0018 /**
0019  * Implements a dialog which provides an easy way to edit several
0020  * configuration options for Mercurial and the plugin.
0021  */
0022 class HgConfigDialog : public KPageDialog
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     explicit HgConfigDialog(HgConfig::ConfigType type, QWidget *parent = nullptr);
0028 
0029 private:
0030     void done(int r) override;
0031 
0032     // user interface
0033     void setupUI();
0034 
0035 private Q_SLOTS:
0036     void saveSettings();
0037     void saveGeometry();
0038     void loadGeometry();
0039 
0040 private:
0041     HgGeneralConfigWidget *m_generalConfig;
0042     HgPathConfigWidget *m_pathConfig;
0043     HgIgnoreWidget *m_ignoreWidget;
0044     HgPluginSettingsWidget *m_pluginSetting;
0045 
0046     HgConfig::ConfigType m_configType;
0047 };
0048 
0049 #endif // HGCONFIGDIALOG_H
0050