QGCToolWidgetItem.h 829 Bytes
Newer Older
1 2 3 4 5 6
#ifndef QGCTOOLWIDGETITEM_H
#define QGCTOOLWIDGETITEM_H

#include <QWidget>
#include <QAction>

7 8
#include "UASInterface.h"

9 10 11 12
class QGCToolWidgetItem : public QWidget
{
    Q_OBJECT
public:
13
    QGCToolWidgetItem(const QString& name, QWidget *parent = 0);
14 15 16 17 18 19 20 21
    ~QGCToolWidgetItem();

    int component() {return _component;}

public slots:
    virtual void startEditMode() {}
    virtual void endEditMode() {}
    virtual void setComponent(int comp) {_component = comp;}
22
    void setActiveUAS(UASInterface *uas);
23 24 25 26 27

protected:
    QAction* startEditAction;
    QAction* stopEditAction;
    bool isInEditMode;
28 29
    QString qgcToolWidgetItemName;
    UASInterface* uas;
30 31 32 33 34 35 36
    int _component;          ///< The MAV component (the process or device ID)

    void contextMenuEvent (QContextMenuEvent* event);

};

#endif // QGCTOOLWIDGETITEM_H