QGCToolWidgetItem.h 691 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#ifndef QGCTOOLWIDGETITEM_H
#define QGCTOOLWIDGETITEM_H

#include <QWidget>
#include <QAction>

class QGCToolWidgetItem : public QWidget
{
    Q_OBJECT
public:
    explicit QGCToolWidgetItem(QWidget *parent = 0);
    ~QGCToolWidgetItem();

    int component() {return _component;}

public slots:
    virtual void startEditMode() {}
    virtual void endEditMode() {}
    virtual void setComponent(int comp) {_component = comp;}

protected:
    QAction* startEditAction;
    QAction* stopEditAction;

    bool isInEditMode;
    int _component;          ///< The MAV component (the process or device ID)

    void contextMenuEvent (QContextMenuEvent* event);

};

#endif // QGCTOOLWIDGETITEM_H