File indexing completed on 2024-04-28 05:49:04

0001 /*
0002     SPDX-FileCopyrightText: 2021 Waqar Ahmed <waqar.17a@gmail.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 #pragma once
0007 
0008 #include "branchesdialog.h"
0009 
0010 class BranchCheckoutDialog : public BranchesDialog
0011 {
0012     Q_OBJECT
0013 public:
0014     BranchCheckoutDialog(QWidget *mainWindow, QString projectPath);
0015     ~BranchCheckoutDialog() override;
0016     void openDialog();
0017 
0018 private Q_SLOTS:
0019     void slotReturnPressed(const QModelIndex &index) override;
0020     void onCheckoutDone();
0021 
0022 private:
0023     void resetValues();
0024     void createNewBranch(const QString &branch, const QString &fromBranch = QString());
0025 
0026 private:
0027     QFutureWatcher<GitUtils::CheckoutResult> m_checkoutWatcher;
0028     QString m_checkoutFromBranchName;
0029     bool m_checkingOutFromBranch = false;
0030 };