/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "ActionWidget.h"
#include "ui_Action.h"
#include <QMessageBox>

class QActionWidget::Controls : public Ui::ActionWidget
{
public:
  Controls() {}
};

QActionWidget::QActionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QWidget(parent,flags)
{
  m_Controls = new Controls();
  m_Controls->setupUi(this);

  connect(m_Controls->Apply, SIGNAL(clicked()), this, SLOT(ApplyAction()));
}

QActionWidget::~QActionWidget()
{
  delete m_Controls;
}

void QActionWidget::Reset()
{

}

void QActionWidget::SetEnabled(bool b)
{
  m_Controls->Apply->setEnabled(b);
}

void QActionWidget::ControlsToAction()
{
  m_PassAction = true;
}

QWidget* QActionWidget::Properties()
{
  return m_Controls->Properties;
}
