aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/git/remotedialog.h
blob: 9475405c7b2eed0cd62379c3283853c95c6a127b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#pragma once

#include <QDialog>

QT_BEGIN_NAMESPACE
class QLabel;
class QTreeView;
QT_END_NAMESPACE

namespace Utils { class FilePath; }

namespace Git {
namespace Internal {

class RemoteModel;

class RemoteDialog : public QDialog
{
    Q_OBJECT

public:
    explicit RemoteDialog(QWidget *parent = nullptr);
    ~RemoteDialog() override;

    void refresh(const Utils::FilePath &repository, bool force);

private:
    void refreshRemotes();
    void addRemote();
    void removeRemote();
    void pushToRemote();
    void fetchFromRemote();

    void updateButtonState();

    RemoteModel *m_remoteModel;

    QLabel *m_repositoryLabel;
    QTreeView *m_remoteView;
    QPushButton *m_addButton;
    QPushButton *m_fetchButton;
    QPushButton *m_pushButton;
    QPushButton *m_removeButton;
};

} // namespace Internal
} // namespace Git