aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/mercurial/srcdestdialog.h
blob: 8afcaccef1148deeb09ef843f18a6913c6b8622a (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
// Copyright (C) 2016 Brian McGillion
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#pragma once

#include <utils/pathchooser.h>
#include <vcsbase/vcsbaseplugin.h>
#include <QDialog>

namespace Mercurial {
namespace Internal {

namespace Ui { class SrcDestDialog; }

class SrcDestDialog : public QDialog
{
    Q_OBJECT

public:
    enum Direction { outgoing, incoming };
    explicit SrcDestDialog(const VcsBase::VcsBasePluginState &state, Direction dir, QWidget *parent = nullptr);
    ~SrcDestDialog() override;

    void setPathChooserKind(Utils::PathChooser::Kind kind);
    QString getRepositoryString() const;
    Utils::FilePath workingDir() const;

private:
    QUrl getRepoUrl() const;

private:
    Ui::SrcDestDialog *m_ui;
    Direction m_direction;
    mutable QString m_workingdir;
    VcsBase::VcsBasePluginState m_state;
};

} // namespace Internal
} // namespace Mercurial