VariantWidget.h
Go to the documentation of this file.
1
/*
2
* This file is part of ArmarX.
3
*
4
* ArmarX is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation.
7
*
8
* ArmarX is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* @package ArmarX::Gui
17
* @author Kai Welke (welke@kit.edu)
18
* @copyright 2012 Humanoids Group, IAIM, IFA
19
* @license http://www.gnu.org/licenses/gpl-2.0.txt
20
* GNU General Public License
21
*/
22
23
#pragma once
24
25
// Qt
26
#include <QWidget>
27
#include <string>
28
#include <map>
29
30
// ArmarX
31
#include <
ArmarXCore/observers/variant/Variant.h
>
32
#include <
ArmarXCore/util/variants/eigen3/Eigen3VariantObjectFactories.h
>
33
34
class
QVBoxLayout;
35
class
QTextEdit;
36
namespace
armarx
37
{
38
class
VariantWidget
:
public
QWidget
39
{
40
Q_OBJECT
41
public
:
42
VariantWidget
(
VariantPtr
variant, QWidget* parent = 0, Qt::WindowFlags f = 0);
43
void
setEnableEdit
(
bool
enableEdit);
44
void
setShowType
(
bool
showType);
45
46
Variant
&
getVariant
();
47
bool
getEnableEdit
();
48
bool
getShowType
();
49
QString
getValueText
();
50
public
slots:
51
void
lineEdit_editFinished
();
52
void
setValue
(
const
VariantPtr
& variant);
53
54
private
:
55
void
setupLayout();
56
57
VariantPtr
variant;
58
bool
enableEdit;
59
bool
showType;
60
QTextEdit* variantEdit;
61
std::vector<QWidget*> widgets;
62
QVBoxLayout* layout;
63
};
64
}
65
armarx::Variant
The Variant class is described here: Variants.
Definition:
Variant.h:224
armarx::VariantWidget::getShowType
bool getShowType()
Definition:
VariantWidget.cpp:122
armarx::VariantWidget::setShowType
void setShowType(bool showType)
Definition:
VariantWidget.cpp:111
armarx::VariantWidget::setValue
void setValue(const VariantPtr &variant)
Definition:
VariantWidget.cpp:43
IceInternal::Handle< Variant >
armarx::VariantWidget::getEnableEdit
bool getEnableEdit()
Definition:
VariantWidget.cpp:117
Eigen3VariantObjectFactories.h
armarx::VariantWidget::lineEdit_editFinished
void lineEdit_editFinished()
Definition:
VariantWidget.cpp:174
armarx::VariantWidget::setEnableEdit
void setEnableEdit(bool enableEdit)
Definition:
VariantWidget.cpp:105
armarx::VariantWidget::getVariant
Variant & getVariant()
Variant.h
armarx::VariantWidget::getValueText
QString getValueText()
Definition:
VariantWidget.cpp:127
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:28
armarx::VariantWidget
Definition:
VariantWidget.h:38
armarx::VariantWidget::VariantWidget
VariantWidget(VariantPtr variant, QWidget *parent=0, Qt::WindowFlags f=0)
Definition:
VariantWidget.cpp:31
ArmarXGui
gui-plugins
ObserverPropertiesPlugin
widgets
VariantWidget.h
Generated on Sat Oct 12 2024 09:14:03 for armarx_documentation by
1.8.17