QGIS API Documentation  2.10.1-Pisa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 : denis.rouzaud@gmail.com
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 <QDockWidget>
22 #include <QMap>
23 
24 class QFrame;
25 class QBoxLayout;
26 
27 
34 class GUI_EXPORT QgsUserInputDockWidget : public QDockWidget
35 {
36  Q_OBJECT
37  public:
38  QgsUserInputDockWidget( QWidget* parent = 0 );
40 
42  void addUserInputWidget( QWidget* widget );
43 
44  protected:
46  void paintEvent( QPaintEvent *event ) override;
47 
48  private slots:
49  void widgetDestroyed( QObject* obj );
50 
52  void areaChanged( Qt::DockWidgetArea area );
53  void floatingChanged( bool floating );
54 
55  private:
57  void updateLayoutDirection();
58 
59  // list of widget with their corresponding line separator
60  QMap<QWidget*, QFrame*> mWidgetList;
61 
62  bool mLayoutHorizontal;
63  QBoxLayout* mLayout;
64 };
65 
66 #endif // QGSUSERINPUTDOCKWIDGET_H
virtual void paintEvent(QPaintEvent *event)
The QgsUserInputDockWidget class is a dock widget that shall be used to display widgets for user inpu...