QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgsoverlaywidgetlayout.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsoverlaywidgetlayout.h
3
---------------------
4
begin : March 2024
5
copyright : (C) 2024 by Nyall Dawson
6
email : nyall dot dawson at gmail dot 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
#ifndef QGSOVERLAYWIDGETLAYOUT_H
17
#define QGSOVERLAYWIDGETLAYOUT_H
18
19
#include "qgis_gui.h"
20
#include "
qgis_sip.h
"
21
22
#include <QLayout>
23
30
class
GUI_EXPORT
QgsOverlayWidgetLayout
:
public
QLayout
31
{
32
Q_OBJECT
33
34
public
:
38
QgsOverlayWidgetLayout
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
39
~QgsOverlayWidgetLayout
()
override
;
40
41
int
count
()
const
final
;
42
void
addItem
( QLayoutItem *item )
final
;
43
QLayoutItem *
itemAt
(
int
index )
const
final
;
44
QLayoutItem *
takeAt
(
int
index )
final
;
45
QSize
sizeHint
()
const
final
;
46
QSize
minimumSize
()
const
final
;
47
void
setGeometry
(
const
QRect &rect )
final
;
48
55
void
addWidget
( QWidget *widget
SIP_TRANSFER
, Qt::Edge edge );
56
62
void
setHorizontalSpacing
(
int
spacing );
63
69
int
horizontalSpacing
()
const
{
return
mHorizontalSpacing; }
70
76
void
setVerticalSpacing(
int
spacing );
77
83
int
verticalSpacing
()
const
{
return
mVerticalSpacing; }
84
85
private
:
86
QList<QLayoutItem *> mLeftItems;
87
QList<QLayoutItem *> mRightItems;
88
QList<QLayoutItem *> mTopItems;
89
QList<QLayoutItem *> mBottomItems;
90
int
mHorizontalSpacing = 0;
91
int
mVerticalSpacing = 0;
92
};
93
94
#endif
// QGSOVERLAYWIDGETLAYOUT_H
QgsOverlayWidgetLayout::itemAt
QLayoutItem * itemAt(int index) const final
Definition
qgsoverlaywidgetlayout.cpp:46
QgsOverlayWidgetLayout::setGeometry
void setGeometry(const QRect &rect) final
Definition
qgsoverlaywidgetlayout.cpp:110
QgsOverlayWidgetLayout::addItem
void addItem(QLayoutItem *item) final
Definition
qgsoverlaywidgetlayout.cpp:40
QgsOverlayWidgetLayout::addWidget
void addWidget(QWidget *widget, Qt::Edge edge)
Adds a widget to the layout, which will be bound to the specified edge.
Definition
qgsoverlaywidgetlayout.cpp:160
QgsOverlayWidgetLayout::sizeHint
QSize sizeHint() const final
Definition
qgsoverlaywidgetlayout.cpp:92
QgsOverlayWidgetLayout::takeAt
QLayoutItem * takeAt(int index) final
Definition
qgsoverlaywidgetlayout.cpp:69
QgsOverlayWidgetLayout::minimumSize
QSize minimumSize() const final
Definition
qgsoverlaywidgetlayout.cpp:101
QgsOverlayWidgetLayout::horizontalSpacing
int horizontalSpacing() const
Returns the spacing between widgets that are laid out side by side.
Definition
qgsoverlaywidgetlayout.h:69
QgsOverlayWidgetLayout::QgsOverlayWidgetLayout
QgsOverlayWidgetLayout(QWidget *parent=nullptr)
Constructor for QgsOverlayWidgetLayout, with the specified parent widget.
Definition
qgsoverlaywidgetlayout.cpp:24
QgsOverlayWidgetLayout::verticalSpacing
int verticalSpacing() const
Returns the spacing between widgets that are laid out on top of each other.
Definition
qgsoverlaywidgetlayout.h:83
QgsOverlayWidgetLayout::setHorizontalSpacing
void setHorizontalSpacing(int spacing)
Sets the spacing between widgets that are laid out side by side.
Definition
qgsoverlaywidgetlayout.cpp:183
QgsOverlayWidgetLayout::count
int count() const final
Definition
qgsoverlaywidgetlayout.cpp:35
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:35
Generated on
for QGIS API Documentation by
1.17.0