QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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
20#include "qgseditformconfig.h"
21#include "qgsfields.h"
22
23#include <QMap>
24
26
27class QgsEditFormConfigPrivate : public QSharedData
28{
29 public:
30 QgsEditFormConfigPrivate()
31 : mInvisibleRootContainer( new QgsAttributeEditorContainer( QString(), nullptr ) )
32 {}
33
34 QgsEditFormConfigPrivate( const QgsEditFormConfigPrivate &o )
35 : QSharedData( o )
36 , mInvisibleRootContainer( static_cast<QgsAttributeEditorContainer *>( o.mInvisibleRootContainer->clone( nullptr ) ) )
37 , mConfiguredRootContainer( o.mConfiguredRootContainer )
38 , mFieldEditables( o.mFieldEditables )
39 , mLabelOnTop( o.mLabelOnTop )
40 , mReuseLastValuePolicy( o.mReuseLastValuePolicy )
41 , mDataDefinedFieldProperties( o.mDataDefinedFieldProperties )
42 , mWidgetConfigs( o.mWidgetConfigs )
43 , mEditorLayout( o.mEditorLayout )
44 , mUiFormPath( o.mUiFormPath )
45 , mInitFunction( o.mInitFunction )
46 , mInitFilePath( o.mInitFilePath )
47 , mInitCodeSource( o.mInitCodeSource )
48 , mInitCode( o.mInitCode )
49 , mSuppressForm( o.mSuppressForm )
50 , mFields( o.mFields )
51 {}
52
53 ~QgsEditFormConfigPrivate()
54 {
55 delete mInvisibleRootContainer;
56 }
57
58 static QgsPropertiesDefinition &propertyDefinitions()
59 {
60 static QgsPropertiesDefinition sPropertyDefinitions
61 {
62 {
64 QgsPropertyDefinition( "dataDefinedAlias",
65 QObject::tr( "Alias" ),
67 },
68 {
70 QgsPropertyDefinition( "dataDefinedEditable",
71 QObject::tr( "Editable" ),
73 },
74 };
75 return sPropertyDefinitions;
76 };
77
79 QgsAttributeEditorContainer *mInvisibleRootContainer = nullptr;
80
82 bool mConfiguredRootContainer = false;
83
84 QMap< QString, bool> mFieldEditables;
85 QMap< QString, bool> mLabelOnTop;
86 QMap< QString, Qgis::AttributeFormReuseLastValuePolicy> mReuseLastValuePolicy;
87 QMap< QString, QgsPropertyCollection> mDataDefinedFieldProperties;
88
89 QMap<QString, QVariantMap > mWidgetConfigs;
90
93
95 QString mUiFormPath;
97 QString mInitFunction;
99 QString mInitFilePath;
103 QString mInitCode;
104
107
108 QgsFields mFields;
109
110 private:
111 QgsEditFormConfigPrivate &operator= ( const QgsEditFormConfigPrivate & ) = delete;
112};
113
114
116
117#endif // QGSEDITFORMCONFIG_P_H
AttributeFormSuppression
Available form types for layout of the attribute form editor.
Definition qgis.h:5500
@ Default
Use the application-wide setting.
Definition qgis.h:5501
AttributeFormPythonInitCodeSource
The Python init code source for attribute forms.
Definition qgis.h:5515
@ NoSource
Do not use Python code at all.
Definition qgis.h:5516
AttributeFormLayout
Available form types for layout of the attribute form editor.
Definition qgis.h:5485
@ AutoGenerated
Autogenerate a simple tabular layout for the form.
Definition qgis.h:5486
@ String
Any string value.
Definition qgsproperty.h:59
@ Boolean
Boolean value.
Definition qgsproperty.h:51
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.