aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/devicesupport/devicetestdialog.h
blob: 346b242ee2eafe49ff3c5e56ce919a25a130a455 (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 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 "idevice.h"

#include <utils/theme/theme.h>

#include <QDialog>

#include <memory>

namespace ProjectExplorer {
namespace Internal {

class DeviceTestDialog : public QDialog
{
    Q_OBJECT

public:
    DeviceTestDialog(const IDevice::Ptr &deviceConfiguration, QWidget *parent = nullptr);
    ~DeviceTestDialog() override;

    void reject() override;

private:
    void handleProgressMessage(const QString &message);
    void handleErrorMessage(const QString &message);
    void handleTestFinished(ProjectExplorer::DeviceTester::TestResult result);

    void addText(const QString &text, Utils::Theme::Color color, bool bold);

    class DeviceTestDialogPrivate;
    const std::unique_ptr<DeviceTestDialogPrivate> d;
};

} // namespace Internal
} // namespace ProjectExplorer