2012-07-13 22:44:56 +02:00
|
|
|
#ifndef POPUPWIDGET_H
|
|
|
|
#define POPUPWIDGET_H
|
|
|
|
|
|
|
|
#include <QtGui>
|
|
|
|
#include <QWidget>
|
2013-09-15 23:06:25 +02:00
|
|
|
#include <QHBoxLayout>
|
2012-07-13 22:44:56 +02:00
|
|
|
#include <QDialog>
|
|
|
|
|
|
|
|
|
|
|
|
#include "uavobjectwidgetutils_global.h"
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class PopupWidget;
|
|
|
|
}
|
|
|
|
|
2013-05-05 12:45:35 +02:00
|
|
|
class UAVOBJECTWIDGETUTILS_EXPORT PopupWidget : public QDialog {
|
2012-07-13 22:44:56 +02:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit PopupWidget(QWidget *parent = 0);
|
2013-05-05 12:45:35 +02:00
|
|
|
|
|
|
|
void popUp(QWidget *widget = 0);
|
|
|
|
void setWidget(QWidget *widget);
|
|
|
|
|
|
|
|
QWidget *getWidget()
|
|
|
|
{
|
|
|
|
return m_widget;
|
|
|
|
}
|
|
|
|
|
|
|
|
QHBoxLayout *getLayout()
|
|
|
|
{
|
|
|
|
return m_layout;
|
|
|
|
}
|
|
|
|
|
2012-07-13 22:44:56 +02:00
|
|
|
public slots:
|
2012-07-14 07:41:58 +02:00
|
|
|
bool close();
|
|
|
|
void done(int result);
|
|
|
|
|
2012-07-13 22:44:56 +02:00
|
|
|
private slots:
|
|
|
|
void closePopup();
|
|
|
|
|
|
|
|
private:
|
2013-05-05 12:45:35 +02:00
|
|
|
QHBoxLayout *m_layout;
|
|
|
|
QWidget *m_widget;
|
|
|
|
QWidget *m_widgetParent;
|
|
|
|
QPushButton *m_closeButton;
|
|
|
|
int m_widgetWidth;
|
|
|
|
int m_widgetHeight;
|
2012-07-13 22:44:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // POPUPWIDGET_H
|