QGCParamSlider.h 960 Bytes
Newer Older
1 2 3 4
#ifndef QGCPARAMSLIDER_H
#define QGCPARAMSLIDER_H

#include <QWidget>
5
#include <QAction>
6 7
#include <QtDesigner/QDesignerExportWidget>

8 9
#include "QGCToolWidgetItem.h"

10 11 12 13
namespace Ui {
    class QGCParamSlider;
}

pixhawk's avatar
pixhawk committed
14
class QGCParamSlider : public QGCToolWidgetItem
15 16 17 18 19 20 21
{
    Q_OBJECT

public:
    explicit QGCParamSlider(QWidget *parent = 0);
    ~QGCParamSlider();

22 23 24
public slots:
    void startEditMode();
    void endEditMode();
25 26
    /** @brief Send the parameter to the MAV */
    void sendParameter();
27

28
protected:
29 30 31 32 33 34
    QString parameterName;         ///< Key/Name of the parameter
    float parameterValue;          ///< Value of the parameter
    double parameterScalingFactor; ///< Factor to scale the parameter between slider and true value
    float parameterMin;
    float parameterMax;
    int component;                 ///< ID of the MAV component to address
35 36 37 38 39 40 41
    void changeEvent(QEvent *e);

private:
    Ui::QGCParamSlider *ui;
};

#endif // QGCPARAMSLIDER_H