QGCActionButton.cc 719 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
#include "QGCActionButton.h"
#include "ui_QGCActionButton.h"

QGCActionButton::QGCActionButton(QWidget *parent) :
    QGCToolWidgetItem(parent),
    ui(new Ui::QGCActionButton)
{
    ui->setupUi(this);
    connect(ui->editFinishButton, SIGNAL(clicked()), this, SLOT(endEditMode()));
    endEditMode();
}

QGCActionButton::~QGCActionButton()
{
    delete ui;
}

void QGCActionButton::startEditMode()
{
    ui->editActionComboBox->show();
    ui->editActionsRefreshButton->show();
    ui->editFinishButton->show();
    isInEditMode = true;
}

void QGCActionButton::endEditMode()
{
    ui->editActionComboBox->hide();
    ui->editActionsRefreshButton->hide();
    ui->editFinishButton->hide();
    isInEditMode = false;
}