QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsuserinputwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsuserinputwidget.h
3 --------------------------------------
4 Date : 04.2015
5 Copyright : (C) 2015 Denis Rouzaud
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#ifndef QGSUSERINPUTWIDGET_H
18#define QGSUSERINPUTWIDGET_H
19
20#include "qgis_sip.h"
21#include "qgis_gui.h"
22#include "qgsfloatingwidget.h"
23
24#include <QMap>
25#include <QBoxLayout>
26
27class QBoxLayout;
28class QFrame;
29
30
39class GUI_EXPORT QgsUserInputWidget : public QgsFloatingWidget
40{
41 Q_OBJECT
42 public:
44 QgsUserInputWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
45
50 void addUserInputWidget( QWidget *widget );
51
52 protected:
53 // will not display the dock if it contains no widget
54 void paintEvent( QPaintEvent *event ) override;
55
56 private slots:
57 void widgetDestroyed( QObject *obj );
58
59 private:
61 void setLayoutDirection( QBoxLayout::Direction direction );
62
63 // list of widget with their corresponding line separator
64 QMap<QWidget *, QFrame *> mWidgetList;
65
66 bool mLayoutHorizontal = true;
67 QBoxLayout *mLayout = nullptr;
68};
69
70#endif // QGSUSERINPUTWIDGET_H
A QWidget subclass for creating widgets which float outside of the normal Qt layout system.
void paintEvent(QPaintEvent *e) override
The QgsUserInputWidget class is a floating widget that shall be used to display widgets for user inpu...
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53