File indexing completed on 2024-04-21 05:40:59

0001 /*
0002     SPDX-FileCopyrightText: 2011 Vishesh Yadav <vishesh3y@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef HG_BACKOUT_DIALOG
0008 #define HG_BACKOUT_DIALOG
0009 
0010 #include "dialogbase.h"
0011 
0012 class QGroupBox;
0013 class QCheckBox;
0014 class QLineEdit;
0015 class HgCommitInfoWidget;
0016 
0017 /**
0018  * Implements dialog for Mercurial's backout feature.
0019  */
0020 class HgBackoutDialog : public DialogBase
0021 {
0022     Q_OBJECT
0023 
0024 public:
0025     explicit HgBackoutDialog(QWidget *parent = nullptr);
0026 
0027 public Q_SLOTS:
0028     void done(int r) override;
0029 
0030 private Q_SLOTS:
0031     void saveGeometry();
0032     void slotSelectBaseChangeset();
0033     void slotSelectParentChangeset();
0034     void slotUpdateOkButton(const QString &text);
0035 
0036 private:
0037     void setupUI();
0038 
0039     /**
0040      * Find appropriate changesets in repository and show them in 
0041      * Commit Selector (CommitInfoWidget)
0042      */
0043     void loadCommits();
0044 
0045     /** 
0046      * Opens a dialog showing all changesets in a list and their respective
0047      * information when highlighted. 
0048      */
0049     QString selectChangeset();
0050 
0051 private:
0052     QGroupBox *m_mainGroup;
0053     HgCommitInfoWidget *m_commitInfo;
0054 
0055     QPushButton *m_selectBaseCommitButton;
0056     QLineEdit *m_baseRevision;
0057 
0058     QPushButton *m_selectParentCommitButton;
0059     QLineEdit *m_parentRevision;
0060 
0061     QCheckBox *m_optMerge;
0062 };
0063 
0064 #endif /* HG_BACKOUT_DIALOG */
0065