QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
editorwidgets
qgsspacerwidgetwrapper.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsspacerwidgetwrapper.h - QgsSpacerWidgetWrapper
3
4
---------------------
5
begin : 16.1.2023
6
copyright : (C) 2023 by Alessandro Pasotti
7
email : elpaso at itopen dot it
8
***************************************************************************
9
* *
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
14
* *
15
***************************************************************************/
16
#ifndef QGSSPACERWIDGETWRAPPER_H
17
#define QGSSPACERWIDGETWRAPPER_H
18
19
#include "qgis_gui.h"
20
#include "
qgswidgetwrapper.h
"
21
27
class
GUI_EXPORT
QgsSpacerWidgetWrapper
:
public
QgsWidgetWrapper
28
{
29
Q_OBJECT
30
public
:
38
explicit
QgsSpacerWidgetWrapper
(
QgsVectorLayer
*
layer
, QWidget *editor =
nullptr
, QWidget *parent =
nullptr
);
39
40
bool
valid
()
const override
;
41
45
bool
drawLine
()
const
;
46
51
void
setDrawLine
(
bool
drawLine
);
52
53
protected
:
54
QWidget *
createWidget
( QWidget *parent )
override
;
55
56
public
slots:
57
void
setFeature
(
const
QgsFeature
&feature )
override
;
58
59
private
:
60
bool
mDrawLine =
false
;
61
};
62
63
#endif
// QGSSPACERWIDGETWRAPPER_H
QgsFeature
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition
qgsfeature.h:60
QgsSpacerWidgetWrapper::drawLine
bool drawLine() const
Returns true if the spacer element will contain an horizontal line.
Definition
qgsspacerwidgetwrapper.cpp:44
QgsSpacerWidgetWrapper::setDrawLine
void setDrawLine(bool drawLine)
Sets a flag to define if the spacer element will contain an horizontal line.
Definition
qgsspacerwidgetwrapper.cpp:49
QgsSpacerWidgetWrapper::QgsSpacerWidgetWrapper
QgsSpacerWidgetWrapper(QgsVectorLayer *layer, QWidget *editor=nullptr, QWidget *parent=nullptr)
Create a new widget wrapper.
Definition
qgsspacerwidgetwrapper.cpp:23
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
QgsWidgetWrapper::setFeature
virtual void setFeature(const QgsFeature &feature)=0
Is called when the value of the widget needs to be changed.
QgsWidgetWrapper::valid
virtual bool valid() const =0
Returns true if the widget has been properly initialized.
QgsWidgetWrapper::QgsWidgetWrapper
QgsWidgetWrapper(QgsVectorLayer *vl, QWidget *editor=nullptr, QWidget *parent=nullptr)
Create a new widget wrapper.
Definition
qgswidgetwrapper.cpp:42
QgsWidgetWrapper::layer
QgsVectorLayer * layer() const
Returns the vector layer associated with the widget.
Definition
qgswidgetwrapper.cpp:94
QgsWidgetWrapper::createWidget
virtual QWidget * createWidget(QWidget *parent)=0
This method should create a new widget with the provided parent.
qgswidgetwrapper.h
Generated on
for QGIS API Documentation by
1.17.0