OptionalPropertyFactory.h
Go to the documentation of this file.
1
/*
2
* This file is part of ArmarX.
3
*
4
* Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5
*
6
* ArmarX is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation.
9
*
10
* ArmarX is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*
18
* @package
19
* @author
20
* @date
21
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22
* GNU General Public License
23
*/
24
#pragma once
25
26
#include "
OptionalPropertyManager.h
"
27
#include "
OptionalEdit.h
"
28
29
class
OptionalVariantFactory
:
public
QtVariantEditorFactory
30
{
31
Q_OBJECT
32
public
:
33
OptionalVariantFactory
(QObject* parent = 0) :
QtVariantEditorFactory
(parent) { }
34
~OptionalVariantFactory
()
override
;
35
36
void
setElementName
(
const
QString& name);
37
38
protected
:
39
void
connectPropertyManager
(
QtVariantPropertyManager
* manager)
override
;
40
QWidget*
createEditor
(
QtVariantPropertyManager
* manager,
QtProperty
* property,
41
QWidget* parent)
override
;
42
void
disconnectPropertyManager
(
QtVariantPropertyManager
* manager)
override
;
43
44
45
private
slots:
46
void
slotPropertyChanged(
QtProperty
* property,
const
QVariant&
value
);
47
void
slotPropertyAttributeChanged(
QtProperty
* property,
const
QString& attribute,
const
QVariant&
value
);
48
void
slotSetValue(
const
QString&
value
);
49
void
slotSetEnabled(
const
bool
&
value
);
50
void
slotEditorDestroyed(QObject*
object
);
51
private
:
52
QString elementName;
53
QMap<QtProperty*, QList<armarx::OptionalEdit*> > createdEditors;
54
QMap<armarx::OptionalEdit*, QtProperty*> editorToProperty;
55
};
56
57
OptionalVariantFactory::connectPropertyManager
void connectPropertyManager(QtVariantPropertyManager *manager) override
Definition:
OptionalPropertyFactory.cpp:45
QtVariantPropertyManager
The QtVariantPropertyManager class provides and manages QVariant based properties.
Definition:
qtvariantproperty.h:75
OptionalEdit.h
OptionalVariantFactory::setElementName
void setElementName(const QString &name)
Definition:
OptionalPropertyFactory.cpp:40
QtProperty
The QtProperty class encapsulates an instance of a property.
Definition:
qtpropertybrowser.h:71
cxxopts::value
std::shared_ptr< Value > value()
Definition:
cxxopts.hpp:926
OptionalVariantFactory::OptionalVariantFactory
OptionalVariantFactory(QObject *parent=0)
Definition:
OptionalPropertyFactory.h:33
OptionalVariantFactory
Definition:
OptionalPropertyFactory.h:29
QtVariantEditorFactory
The QtVariantEditorFactory class provides widgets for properties created by QtVariantPropertyManager ...
Definition:
qtvariantproperty.h:162
OptionalVariantFactory::~OptionalVariantFactory
~OptionalVariantFactory() override
Definition:
OptionalPropertyFactory.cpp:30
OptionalVariantFactory::disconnectPropertyManager
void disconnectPropertyManager(QtVariantPropertyManager *manager) override
Definition:
OptionalPropertyFactory.cpp:88
OptionalPropertyManager.h
OptionalVariantFactory::createEditor
QWidget * createEditor(QtVariantPropertyManager *manager, QtProperty *property, QWidget *parent) override
Definition:
OptionalPropertyFactory.cpp:54
ArmarXGui
gui-plugins
ScenarioManager
gui
OptionalPropertyFactory.h
Generated on Sat Oct 5 2024 09:13:55 for armarx_documentation by
1.8.17