1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-13 20:48:42 +01:00
LibrePilot/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/popupwidget.h
Mike LaBranche 685fb4e1d4 MixerCurve bugs and tweeks: don't popup if already a popup; enable drawing only text in nodes;
trap close/done/accept/reject events as closePopup();
2012-07-13 22:41:58 -07:00

43 lines
791 B
C++

#ifndef POPUPWIDGET_H
#define POPUPWIDGET_H
#include <QtGui>
#include <QWidget>
#include <QDialog>
#include "uavobjectwidgetutils_global.h"
namespace Ui {
class PopupWidget;
}
class UAVOBJECTWIDGETUTILS_EXPORT PopupWidget : public QDialog
{
Q_OBJECT
public:
explicit PopupWidget(QWidget *parent = 0);
void popUp(QWidget* widget = 0);
void setWidget(QWidget* widget);
QWidget* getWidget() { return m_widget; }
QHBoxLayout* getLayout() { return m_layout; }
signals:
public slots:
bool close();
void done(int result);
private slots:
void closePopup();
private:
QHBoxLayout* m_layout;
QWidget* m_widget;
QWidget* m_widgetParent;
QPushButton* m_closeButton;
};
#endif // POPUPWIDGET_H