QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
qgsdialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsdialog.h
3 -------------------
4 begin : July 2012
5 copyright : (C) 2012 by Etienne Tourigny
6 email : etourigny dot dev at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSDIALOG_H
19#define QGSDIALOG_H
20
21#include "qgsguiutils.h"
22
23#include <QDialog>
24#include <QDialogButtonBox>
25#include <QLayout>
26#include "qgis_gui.h"
27#include "qgis_sip.h"
28
33class GUI_EXPORT QgsDialog : public QDialog
34{
35 Q_OBJECT
36 public:
37
41 QgsDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags,
42 QDialogButtonBox::StandardButtons buttons = QDialogButtonBox::Close,
43 Qt::Orientation orientation = Qt::Horizontal );
44
46 QVBoxLayout *layout() { return mLayout; }
48 QDialogButtonBox *buttonBox() { return mButtonBox; }
49
50 protected:
51 QVBoxLayout *mLayout = nullptr;
52 QDialogButtonBox *mButtonBox = nullptr;
53};
54
55#endif
A generic dialog with layout and button box.
Definition: qgsdialog.h:34
QDialogButtonBox * buttonBox()
Returns the button box.
Definition: qgsdialog.h:48
QVBoxLayout * layout()
Returns the central layout. Widgets added to it must have this dialog as parent.
Definition: qgsdialog.h:46
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53