QGIS API Documentation  3.24.2-Tisler (13c1a02865)
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
7  email : [email protected]
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 
26 class 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  {
62  QgsEditFormConfig::DataDefinedProperty::Alias,
63  QgsPropertyDefinition( "dataDefinedAlias",
64  QObject::tr( "Alias" ),
66  },
67  };
68  return sPropertyDefinitions;
69  };
70 
72  QgsAttributeEditorContainer *mInvisibleRootContainer = nullptr;
73 
75  bool mConfiguredRootContainer = false;
76 
77  QMap< QString, bool> mFieldEditables;
78  QMap< QString, bool> mLabelOnTop;
79  QMap< QString, bool> mReuseLastValue;
80  QMap< QString, QgsPropertyCollection> mDataDefinedFieldProperties;
81 
82  QMap<QString, QVariantMap > mWidgetConfigs;
83 
85  QgsEditFormConfig::EditorLayout mEditorLayout = QgsEditFormConfig::EditorLayout::GeneratedLayout;
86 
88  QString mUiFormPath;
90  QString mInitFunction;
92  QString mInitFilePath;
94  QgsEditFormConfig::PythonInitCodeSource mInitCodeSource = QgsEditFormConfig::PythonInitCodeSource::CodeSourceNone;
96  QString mInitCode;
97 
99  QgsEditFormConfig::FeatureFormSuppress mSuppressForm = QgsEditFormConfig::FeatureFormSuppress::SuppressDefault;
100 
101  QgsFields mFields;
102 
103  private:
104  QgsEditFormConfigPrivate &operator= ( const QgsEditFormConfigPrivate & ) = delete;
105 };
106 
107 
109 
110 #endif // QGSEDITFORMCONFIG_P_H
This is a container for attribute editors, used to group them visually in the attribute form if it is...
EditorLayout
The different types to layout the attribute editor.
FeatureFormSuppress
Types of feature form suppression after feature creation.
PythonInitCodeSource
The Python init code source options.
Container of fields for a vector layer.
Definition: qgsfields.h:45
Definition for a property.
Definition: qgsproperty.h:47
@ String
Any string value.
Definition: qgsproperty.h:61
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.