QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgshiddenwidgetwrapper.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgshiddenwidgetwrapper.cpp
3 --------------------------------------
4 Date : 5.1.2014
5 Copyright : (C) 2014 Matthias Kuhn
6 Email : matthias at opengis dot ch
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
17#include "moc_qgshiddenwidgetwrapper.cpp"
18
19#include <QWidget>
20
21QgsHiddenWidgetWrapper::QgsHiddenWidgetWrapper( QgsVectorLayer *layer, int fieldIdx, QWidget *editor, QWidget *parent )
22 : QgsEditorWidgetWrapper( layer, fieldIdx, editor, parent )
23{
24}
25
26
28{
29 return mValue;
30}
31
32QWidget *QgsHiddenWidgetWrapper::createWidget( QWidget *parent )
33{
34 QWidget *wdg = new QWidget( parent );
35 wdg->setVisible( false );
36 return wdg;
37}
38
40{
41 editor->setVisible( false );
42}
43
45{
46 return true;
47}
48
49void QgsHiddenWidgetWrapper::updateValues( const QVariant &value, const QVariantList & )
50{
51 mValue = value;
52}
Manages an editor widget Widget and wrapper share the same parent.
QgsHiddenWidgetWrapper(QgsVectorLayer *layer, int fieldIdx, QWidget *editor=nullptr, QWidget *parent=nullptr)
Constructor for QgsHiddenWidgetWrapper.
QWidget * createWidget(QWidget *parent) override
This method should create a new widget with the provided parent.
void initWidget(QWidget *editor) override
This method should initialize the editor widget with runtime data.
QVariant value() const override
Will be used to access the widget's value.
bool valid() const override
Returns true if the widget has been properly initialized.
Represents a vector layer which manages a vector based data sets.