File indexing completed on 2024-04-28 05:40:47

0001 /*
0002     SPDX-FileCopyrightText: 2011 Vishesh Yadav <vishesh3y@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef HGGENERAL_CONFIG_WIDGET_H
0008 #define HGGENERAL_CONFIG_WIDGET_H
0009 
0010 #include <QWidget>
0011 #include "hgconfig.h"
0012 
0013 class QLineEdit;
0014 class QCheckBox;
0015 
0016 /**
0017  * General configuration options, usually found [ui] group of hgrc file.
0018  * Can be used with both, repository hgrc as well as global hgrc
0019  */
0020 class HgGeneralConfigWidget : public QWidget
0021 {
0022     Q_OBJECT
0023 
0024 public:
0025     /**
0026      * @param type Which configuration file to use, Repo or Global
0027      */
0028     explicit HgGeneralConfigWidget(HgConfig::ConfigType type, QWidget *parent = nullptr);
0029 
0030 public Q_SLOTS:
0031     void saveConfig();
0032     void loadConfig();
0033 
0034 private:
0035     void setupUI();
0036 
0037 private:
0038     QLineEdit *m_userEdit;
0039     QLineEdit *m_editorEdit;
0040     QLineEdit *m_mergeEdit;
0041     QCheckBox *m_verboseCheck;
0042 
0043     HgConfig::ConfigType m_configType;
0044 };
0045 
0046 #endif // HGGENERAL_CONFIG_WIDGET_H
0047