blob: 53af4f8467cee14d93eb80c22da39a56017d7750 (
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
|
// Copyright (C) 2019 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 <projectexplorer/runconfigurationaspects.h>
QT_FORWARD_DECLARE_CLASS(QComboBox)
namespace WebAssembly {
namespace Internal {
using WebBrowserEntry = QPair<QString, QString>; // first: id, second: display name
using WebBrowserEntries = QList<WebBrowserEntry>;
class WebBrowserSelectionAspect : public Utils::BaseAspect
{
Q_OBJECT
public:
WebBrowserSelectionAspect(ProjectExplorer::Target *target);
void addToLayout(Utils::LayoutBuilder &builder) override;
void fromMap(const QVariantMap &map) override;
void toMap(QVariantMap &map) const override;
QString currentBrowser() const;
struct Data : BaseAspect::Data
{
QString currentBrowser;
};
private:
QComboBox *m_webBrowserComboBox = nullptr;
QString m_currentBrowser;
const WebBrowserEntries m_availableBrowsers;
};
} // namespace Internal
} // namespace Webassembly
|