Seamly2D
Code documentation
vpropertyformwidget_p.h
Go to the documentation of this file.
1 /************************************************************************
2  **
3  ** @file vpropertyformwidget_p.h
4  ** @author hedgeware <internal(at)hedgeware.net>
5  ** @date
6  **
7  ** @brief
8  ** @copyright
9  ** All rights reserved. This program and the accompanying materials
10  ** are made available under the terms of the GNU Lesser General Public License
11  ** (LGPL) version 2.1 which accompanies this distribution, and is available at
12  ** http://www.gnu.org/licenses/lgpl-2.1.html
13  **
14  ** This library is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  ** Lesser General Public License for more details.
18  **
19  *************************************************************************/
20 
21 #ifndef VPROPERTYFORMWIDGET_P_H
22 #define VPROPERTYFORMWIDGET_P_H
23 
24 // ONLY INCLUDE THIS IN .CPP FILES
25 
26 #include <QList>
27 #include "vproperty.h"
28 #include "../vmisc/diagnostic.h"
29 
30 namespace VPE
31 {
32 
33 QT_WARNING_PUSH
34 QT_WARNING_DISABLE_CLANG("-Wweak-vtables")
35 
37 {
38 public:
39  //! Stores either another VPropertyFormWidget (then Editor is null) or an editor widget (then FormWidget is null)
41  {
42  SEditorWidget() : FormWidget(nullptr), Editor(nullptr) {}
43  explicit SEditorWidget(VPropertyFormWidget *form_widget) : FormWidget(form_widget), Editor(nullptr) {}
44  explicit SEditorWidget(QWidget *editor_widget) : FormWidget(nullptr), Editor(editor_widget) {}
45 
47  QWidget *Editor;
48  };
49 
50  //! The root property to use
52 
53  //! Binds the properties to their editors
55 
56  //! Determines the behaviour of the editors. If this is true, when a focus out event etc. happens, the data will be
57  //! submitted to the VProperty. If false, you will have to call commitData() yourself.
59 
60  //! Default constructor
62  : Properties(QList<VProperty*>()), EditorWidgets(QList<SEditorWidget>()), UpdateEditors(true)
63  {}
64 
65  //! Constructor
66  explicit VPropertyFormWidgetPrivate(const QList<VProperty*> &properties)
67  : Properties(properties), EditorWidgets(QList<SEditorWidget>()), UpdateEditors(true)
68  {}
69 
71 };
72 
74 
75 }
76 
77 #endif // VPROPERTYFORMWIDGET_P_H
QList< SEditorWidget > EditorWidgets
Binds the properties to their editors.
QList< VProperty * > Properties
The root property to use.
bool UpdateEditors
Determines the behaviour of the editors. If this is true, when a focus out event etc....
VPropertyFormWidgetPrivate()
Default constructor.
VPropertyFormWidgetPrivate(const QList< VProperty * > &properties)
Constructor.
Class that displays the sub properties of a property using a form layout.
@ Properties
Stores either another VPropertyFormWidget (then Editor is null) or an editor widget (then FormWidget ...
SEditorWidget(VPropertyFormWidget *form_widget)