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 <QFutureWatcher> 0009 0010 #include "git/gitutils.h" 0011 #include "quickdialog.h" 0012 0013 class QTreeView; 0014 class QLineEdit; 0015 class BranchesDialogModel; 0016 class QAction; 0017 class BranchFilterModel; 0018 class KActionCollection; 0019 class KateProjectPluginView; 0020 0021 namespace KTextEditor 0022 { 0023 class MainWindow; 0024 } 0025 0026 class BranchesDialog : public HUDDialog 0027 { 0028 Q_OBJECT 0029 public: 0030 BranchesDialog(QWidget *window, QString projectPath); 0031 void openDialog(GitUtils::RefType r); 0032 void sendMessage(const QString &message, bool warn); 0033 QString branch() const 0034 { 0035 return m_branch; 0036 } 0037 0038 Q_SIGNALS: 0039 void branchSelected(const QString &branch); 0040 0041 private Q_SLOTS: 0042 void slotReturnPressed(const QModelIndex &index) override; 0043 0044 protected: 0045 BranchesDialogModel *const m_model; 0046 QString m_projectPath; 0047 0048 private: 0049 QString m_branch; 0050 };