aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/remotelinux/sshkeycreationdialog.h
blob: f3be9308fe9dd524ba5b115218e3e1186546c2f4 (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
// 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 QComboBox;
class QLabel;
class QPushButton;
class QRadioButton;
QT_END_NAMESPACE

namespace Utils { class FilePath; }

namespace RemoteLinux {

class SshKeyCreationDialog : public QDialog
{
    Q_OBJECT
public:
    SshKeyCreationDialog(QWidget *parent = nullptr);
    ~SshKeyCreationDialog();

    Utils::FilePath privateKeyFilePath() const;
    Utils::FilePath publicKeyFilePath() const;

private:
    void keyTypeChanged();
    void generateKeys();
    void handleBrowseButtonClicked();
    void setPrivateKeyFile(const Utils::FilePath &filePath);
    void showError(const QString &details);

private:
    QComboBox *m_comboBox;
    QLabel *m_privateKeyFileValueLabel;
    QLabel *m_publicKeyFileLabel;
    QPushButton *m_generateButton;
    QRadioButton *m_rsa;
    QRadioButton *m_ecdsa;
};

} // namespace RemoteLinux