QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
qgseditformconfig_p.h
Go to the documentation of this file.
1/***************************************************************************
2 qgseditformconfig_p - %{Cpp:License:ClassName}
3
4 ---------------------
5 begin : 18.8.2016
6 copyright : (C) 2016 by Matthias Kuhn
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 QGSEDITFORMCONFIG_P_H
17#define QGSEDITFORMCONFIG_P_H
18
19#include <QMap>
20#include "qgsfields.h"
21#include "qgseditformconfig.h"
23
25
26class QgsEditFormConfigPrivate : public QSharedData
27{
28 public:
29 QgsEditFormConfigPrivate()
30 : mInvisibleRootContainer( new QgsAttributeEditorContainer( QString(), nullptr ) )
31 {}
32
33 QgsEditFormConfigPrivate( const QgsEditFormConfigPrivate &o )
34 : QSharedData( o )
35 , mInvisibleRootContainer( static_cast<QgsAttributeEditorContainer *>( o.mInvisibleRootContainer->clone( nullptr ) ) )
36 , mConfiguredRootContainer( o.mConfiguredRootContainer )
37 , mFieldEditables( o.mFieldEditables )
38 , mLabelOnTop( o.mLabelOnTop )
39 , mReuseLastValue( o.mReuseLastValue )
40 , mDataDefinedFieldProperties( o.mDataDefinedFieldProperties )
41 , mWidgetConfigs( o.mWidgetConfigs )
42 , mEditorLayout( o.mEditorLayout )
43 , mUiFormPath( o.mUiFormPath )
44 , mInitFunction( o.mInitFunction )
45 , mInitFilePath( o.mInitFilePath )
46 , mInitCodeSource( o.mInitCodeSource )
47 , mInitCode( o.mInitCode )
48 , mSuppressForm( o.mSuppressForm )
49 , mFields( o.mFields )
50 {}
51
52 ~QgsEditFormConfigPrivate()
53 {
54 delete mInvisibleRootContainer;
55 }
56
57 static QgsPropertiesDefinition &propertyDefinitions()
58 {
59 static QgsPropertiesDefinition sPropertyDefinitions
60 {
61 {
63 QgsPropertyDefinition( "dataDefinedAlias",
64 QObject::tr( "Alias" ),
66 },
67 {
69 QgsPropertyDefinition( "dataDefinedEditable",
70 QObject::tr( "Editable" ),
72 },
73 };
74 return sPropertyDefinitions;
75 };
76
78 QgsAttributeEditorContainer *mInvisibleRootContainer = nullptr;
79
81 bool mConfiguredRootContainer = false;
82
83 QMap< QString, bool> mFieldEditables;
84 QMap< QString, bool> mLabelOnTop;
85 QMap< QString, bool> mReuseLastValue;
86 QMap< QString, QgsPropertyCollection> mDataDefinedFieldProperties;
87
88 QMap<QString, QVariantMap > mWidgetConfigs;
89
92
94 QString mUiFormPath;
96 QString mInitFunction;
98 QString mInitFilePath;
102 QString mInitCode;
103
106
107 QgsFields mFields;
108
109 private:
110 QgsEditFormConfigPrivate &operator= ( const QgsEditFormConfigPrivate & ) = delete;
111};
112
113
115
116#endif // QGSEDITFORMCONFIG_P_H
AttributeFormSuppression
Available form types for layout of the attribute form editor.
Definition qgis.h:5103
@ Default
Use the application-wide setting.
AttributeFormPythonInitCodeSource
The Python init code source for attribute forms.
Definition qgis.h:5118
@ NoSource
Do not use Python code at all.
AttributeFormLayout
Available form types for layout of the attribute form editor.
Definition qgis.h:5088
@ AutoGenerated
Autogenerate a simple tabular layout for the form.
This is a container for attribute editors, used to group them visually in the attribute form if it is...
Container of fields for a vector layer.
Definition qgsfields.h:46
Definition for a property.
Definition qgsproperty.h:45
@ String
Any string value.
Definition qgsproperty.h:59
@ Boolean
Boolean value.
Definition qgsproperty.h:51
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.