QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
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 <qgswidgetwrapper.h>
20#include "qgis_gui.h"
21
28{
29 Q_OBJECT
30 public:
31
39 explicit QgsSpacerWidgetWrapper( QgsVectorLayer *layer, QWidget *editor = nullptr, QWidget *parent = nullptr );
40
41 bool valid() const override;
42
46 bool drawLine() const;
47
52 void setDrawLine( bool drawLine );
53
54 protected:
55 QWidget *createWidget( QWidget *parent ) override;
56
57 public slots:
58 void setFeature( const QgsFeature &feature ) override;
59
60 private:
61
62 bool mDrawLine = false;
63};
64
65#endif // QGSSPACERWIDGETWRAPPER_H
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition qgsfeature.h:56
Wraps a spacer widget.
Represents a vector layer which manages a vector based data sets.
Manages an editor widget Widget and wrapper share the same parent.
virtual void setFeature(const QgsFeature &feature)=0
Is called when the value of the widget needs to be changed.
virtual bool valid() const =0
Returns true if the widget has been properly initialized.
virtual QWidget * createWidget(QWidget *parent)=0
This method should create a new widget with the provided parent.