aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/remotelinux/publickeydeploymentdialog.h
blob: 81a866d256d3cfc56aeaf836dac9fe5af9b4fd23 (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
// 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 "remotelinux_export.h"

#include <projectexplorer/devicesupport/idevicefwd.h>

#include <QProgressDialog>

namespace Utils { class FilePath; }

namespace RemoteLinux {
namespace Internal { class PublicKeyDeploymentDialogPrivate; }

class REMOTELINUX_EXPORT PublicKeyDeploymentDialog : public QProgressDialog
{
    Q_OBJECT
public:
    // Asks for public key and returns null if the file dialog is canceled.
    static PublicKeyDeploymentDialog *createDialog(const ProjectExplorer::IDeviceConstPtr &deviceConfig,
        QWidget *parent = nullptr);

    PublicKeyDeploymentDialog(const ProjectExplorer::IDeviceConstPtr &deviceConfig,
                              const Utils::FilePath &publicKeyFileName, QWidget *parent = nullptr);

    ~PublicKeyDeploymentDialog() override;

private:
    void handleDeploymentDone(bool succeeded, const QString &errorMessage);

    Internal::PublicKeyDeploymentDialogPrivate * const d;
};

} // namespace RemoteLinux