QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QmlComponentInfo.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QObject>
4#include <QtCore/QUrl>
5
8class QmlComponentInfo : public QObject
9{
10 Q_OBJECT
11 Q_PROPERTY(QString title READ title CONSTANT)
12 Q_PROPERTY(QUrl url READ url CONSTANT)
13 Q_PROPERTY(QUrl icon READ icon CONSTANT)
14 Q_PROPERTY(bool requiresVehicle READ requiresVehicle CONSTANT)
15
16public:
17 QmlComponentInfo(const QString &title, QUrl url, QUrl icon = QUrl(), QObject *parent = nullptr, bool requiresVehicle = false);
19
20 const QString &title() const { return _title; }
21 QUrl url() const { return _url; }
22 QUrl icon() const { return _icon; }
23 bool requiresVehicle() const { return _requiresVehicle; }
24
25protected:
26 const QString _title;
27 const QUrl _url;
28 const QUrl _icon;
29 const bool _requiresVehicle;
30};
Represents a Qml component which can be loaded from a resource.
bool requiresVehicle() const
const bool _requiresVehicle
Page requires connected vehicle.
const QUrl _icon
Icon for page.
const QUrl _url
Qml source code.
const QString _title
Title for page.
const QString & title() const