aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/ios/createsimulatordialog.h
blob: 85fb2ce154f1ca1d828c6ddd168435e0c8acf226 (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
// Copyright (C) 2017 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 <utils/futuresynchronizer.h>

#include <QDialog>

QT_BEGIN_NAMESPACE
class QComboBox;
class QLineEdit;
QT_END_NAMESPACE

namespace Ios::Internal {

class DeviceTypeInfo;
class RuntimeInfo;

/*!
    A dialog to select the iOS Device type and the runtime for a new
    iOS simulator device.
 */
class CreateSimulatorDialog : public QDialog
{
    Q_OBJECT

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

    QString name() const;
    RuntimeInfo runtime() const;
    DeviceTypeInfo deviceType() const;

private:
    void populateDeviceTypes(const QList<DeviceTypeInfo> &deviceTypes);
    void populateRuntimes(const DeviceTypeInfo &deviceType);

    Utils::FutureSynchronizer m_futureSync;
    QList<RuntimeInfo> m_runtimes;

    QLineEdit *m_nameEdit;
    QComboBox *m_deviceTypeCombo;
    QComboBox *m_runtimeCombo;
};

} // Ios::Internal