ValuesWidgetController.h 1.47 KB
Newer Older
1 2 3 4 5 6 7 8 9
/****************************************************************************
 *
 *   (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

#ifndef ValuesWidgetController_H
#define ValuesWidgetController_H

#include <QObject>

class ValuesWidgetController : public QObject
{
    Q_OBJECT
    
public:
    ValuesWidgetController(void);

    Q_PROPERTY(QStringList largeValues READ largeValues WRITE setLargeValues NOTIFY largeValuesChanged)
    Q_PROPERTY(QStringList smallValues READ smallValues WRITE setSmallValues NOTIFY smallValuesChanged)

26 27
    Q_PROPERTY(QStringList altitudeProperties READ altitudeProperties CONSTANT)

28 29 30 31
    QStringList largeValues(void) const { return _largeValues; }
    QStringList smallValues(void) const { return _smallValues; }
    void setLargeValues(const QStringList& values);
    void setSmallValues(const QStringList& values);
32
    QStringList altitudeProperties(void) const { return _altitudeProperties; }
33 34 35 36 37 38 39 40

signals:
    void largeValuesChanged(QStringList values);
    void smallValuesChanged(QStringList values);

private:
    QStringList _largeValues;
    QStringList _smallValues;
41
    QStringList _altitudeProperties;
42 43 44 45 46 47 48

    static const char* _groupKey;
    static const char* _largeValuesKey;
    static const char* _smallValuesKey;
};

#endif