dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
popupwidget.h
Go to the documentation of this file.
1 #ifndef POPUPWIDGET_H
2 #define POPUPWIDGET_H
3 
5 
6 #include <QtGui>
7 #include <QWidget>
8 #include <QDialog>
9 #include <QHBoxLayout>
10 #include <QPushButton>
11 
12 
13 namespace Ui {
14 class PopupWidget;
15 }
16 
17 class UAVOBJECTWIDGETUTILS_EXPORT PopupWidget : public QDialog
18 {
19  Q_OBJECT
20 public:
21  explicit PopupWidget(QWidget *parent = nullptr);
22 
23  void popUp(QWidget *widget = nullptr);
24  void setWidget(QWidget *widget);
25  QWidget *getWidget() { return m_widget; }
26  QHBoxLayout *getLayout() { return m_layout; }
27 
28 signals:
29 
30 public slots:
31  bool close();
32  void done(int result);
33 
34 private slots:
35  void closePopup();
36 
37 private:
38  QHBoxLayout *m_layout;
39  QWidget *m_widget;
40  QWidget *m_widgetParent;
41  QPushButton *m_closeButton;
42  int m_widgetWidth;
43  int m_widgetHeight;
44 };
45 
46 #endif // POPUPWIDGET_H
QHBoxLayout * getLayout()
Definition: popupwidget.h:26
QWidget * getWidget()
Definition: popupwidget.h:25