QGCCommandButton.h 815 Bytes
Newer Older
lm's avatar
lm committed
1 2 3 4 5
#ifndef QGCCOMMANDBUTTON_H
#define QGCCOMMANDBUTTON_H

#include "QGCToolWidgetItem.h"

6 7 8
namespace Ui
{
class QGCCommandButton;
lm's avatar
lm committed
9 10 11 12 13 14 15 16 17 18 19 20
}

class UASInterface;

class QGCCommandButton : public QGCToolWidgetItem
{
    Q_OBJECT

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

21
    virtual void setEditMode(bool editMode);
22

lm's avatar
lm committed
23 24 25 26 27
public slots:
    void sendCommand();
    void setCommandButtonName(QString text);
    void writeSettings(QSettings& settings);
    void readSettings(const QSettings& settings);
28
    void readSettings(const QString& pre,const QVariantMap& settings);
29 30
signals:
    void showLabel(QString name, int num);
lm's avatar
lm committed
31
private:
32 33
    int responsenum;
    int responsecount;
34
    QString showlabelname;
lm's avatar
lm committed
35 36 37 38 39
    Ui::QGCCommandButton *ui;
    UASInterface* uas;
};

#endif // QGCCOMMANDBUTTON_H