QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgsuserinputdockwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsuserinputdockwidget.h
3  --------------------------------------
4  Date : 04.2015
5  Copyright : (C) 2015 Denis Rouzaud
6  Email : [email protected]
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 
17 
18 #ifndef QGSUSERINPUTDOCKWIDGET_H
19 #define QGSUSERINPUTDOCKWIDGET_H
20 
21 #include "qgsdockwidget.h"
22 #include <QMap>
23 
24 class QFrame;
25 class QBoxLayout;
26 
27 
34 class GUI_EXPORT QgsUserInputDockWidget : public QgsDockWidget
35 {
36  Q_OBJECT
37  public:
38  QgsUserInputDockWidget( QWidget* parent = nullptr );
40 
44  void addUserInputWidget( QWidget* widget );
45 
46  protected:
48  void paintEvent( QPaintEvent *event ) override;
49 
50  private slots:
51  void widgetDestroyed( QObject* obj );
52 
54  void areaChanged( Qt::DockWidgetArea area );
55  void floatingChanged( bool floating );
56 
57  private:
59  void updateLayoutDirection();
60 
61  // list of widget with their corresponding line separator
62  QMap<QWidget*, QFrame*> mWidgetList;
63 
64  bool mLayoutHorizontal;
65  QBoxLayout* mLayout;
66 };
67 
68 #endif // QGSUSERINPUTDOCKWIDGET_H
QgsDockWidget subclass with more fine-grained control over how the widget is closed or opened...
Definition: qgsdockwidget.h:28
virtual void paintEvent(QPaintEvent *event)
The QgsUserInputDockWidget class is a dock widget that shall be used to display widgets for user inpu...