Transition.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::
17 * @author Mirko Waechter ( mirko.waechter at kit dot edu)
18 * @date 2014
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #pragma once
24 
25 #include <memory>
26 
27 #include <QString>
28 #include <QPointF>
29 #include <QList>
30 #include <QMetaType>
31 
32 
34 #include "ParameterMapping.h"
35 
36 namespace armarx
37 {
38 
39  using QPointList = QList<QPointF>;
40  using FloatPtr = std::shared_ptr<float>;
41  using QPointPtr = std::shared_ptr<QPointF>;
42 
44  {
46  : startPoint(),
47  endPoint(),
49  {}
50 
52  : startPoint(),
53  endPoint(),
55  {}
56 
60 
61  QList<QPointF> toPointList() const;
62 
63  QList<QPointF> controlPointList() const;
64 
65  void setControlPoints(QList<QPointF> list);
66 
67  void append(const QPointF& point);
68  };
69 }
70 
72 {
73  class Transition
74  {
75  public slots:
76  void detachFromDestination();
77  ParameterMappingPtr findMapping(const QString& destinationKey, const ParameterMappingList& mapping) const;
78  public:
79  Transition();
80  QString eventName;
90  bool transitionUserCode = false;
91 
92  };
93  using TransitionPtr = std::shared_ptr<Transition>;
94  using TransitionCPtr = std::shared_ptr<const Transition>;
95 }
96 
ParameterMapping.h
armarx::QPointList
QList< QPointF > QPointList
Definition: Transition.h:39
armarx::SupportPoints::SupportPoints
SupportPoints(QPointList list)
Definition: Transition.h:51
armarx::statechartmodel::Transition::eventName
QString eventName
Definition: Transition.h:80
armarx::statechartmodel::Transition::Transition
Transition()
Definition: Transition.cpp:32
list
list(APPEND SOURCES ${QT_RESOURCES}) set(COMPONENT_LIBS ArmarXGui ArmarXCoreObservers ArmarXCoreEigen3Variants PlotterController $
Definition: CMakeLists.txt:49
armarx::statechartmodel::TransitionPtr
std::shared_ptr< Transition > TransitionPtr
Definition: Transition.h:93
armarx::FloatPtr
std::shared_ptr< float > FloatPtr
Definition: Transition.h:40
armarx::statechartmodel::Transition::detachFromDestination
void detachFromDestination()
Definition: Transition.cpp:27
armarx::SupportPoints::append
void append(const QPointF &point)
Definition: GraphvizConverter.cpp:386
armarx::statechartmodel::StateInstancePtr
std::shared_ptr< StateInstance > StateInstancePtr
Definition: StateInstance.h:138
armarx::QPointPtr
std::shared_ptr< QPointF > QPointPtr
Definition: Transition.h:41
armarx::SupportPoints::startPoint
QPointPtr startPoint
Definition: Transition.h:57
armarx::SupportPoints::setControlPoints
void setControlPoints(QList< QPointF > list)
Definition: GraphvizConverter.cpp:376
armarx::statechartmodel::Transition
Definition: Transition.h:73
armarx::statechartmodel::Transition::findMapping
ParameterMappingPtr findMapping(const QString &destinationKey, const ParameterMappingList &mapping) const
Definition: Transition.cpp:36
armarx::statechartmodel
Definition: XmlWriter.h:36
armarx::statechartmodel::Transition::destinationState
StateInstancePtr destinationState
Definition: Transition.h:82
armarx::SupportPoints::endPoint
QPointPtr endPoint
Definition: Transition.h:58
armarx::armem::Time
armarx::core::time::DateTime Time
Definition: forward_declarations.h:13
StateInstance.h
armarx::SupportPoints::controlPointList
QList< QPointF > controlPointList() const
Definition: GraphvizConverter.cpp:364
armarx::statechartmodel::Transition::sourceState
StateInstancePtr sourceState
Definition: Transition.h:81
armarx::SupportPoints::SupportPoints
SupportPoints()
Definition: Transition.h:45
armarx::statechartmodel::Transition::transitionUserCode
bool transitionUserCode
Definition: Transition.h:90
armarx::statechartmodel::Transition::labelCenterPosition
QPointPtr labelCenterPosition
Definition: Transition.h:87
armarx::statechartmodel::Transition::lastActivationTimestamp
IceUtil::Time lastActivationTimestamp
Definition: Transition.h:89
armarx::SupportPoints::controlPoints
QPointList controlPoints
Definition: Transition.h:59
armarx::statechartmodel::TransitionCPtr
std::shared_ptr< const Transition > TransitionCPtr
Definition: Transition.h:94
armarx::statechartmodel::ParameterMappingList
QList< ParameterMappingPtr > ParameterMappingList
Definition: XmlWriter.h:49
armarx::statechartmodel::Transition::mappingToNextStatesInput
ParameterMappingList mappingToNextStatesInput
Definition: Transition.h:83
armarx::statechartmodel::ParameterMappingPtr
std::shared_ptr< ParameterMapping > ParameterMappingPtr
Definition: XmlWriter.h:48
armarx::statechartmodel::Transition::labelFontPointSize
FloatPtr labelFontPointSize
Definition: Transition.h:88
armarx::statechartmodel::Transition::mappingToParentStatesLocal
ParameterMappingList mappingToParentStatesLocal
Definition: Transition.h:84
armarx::SupportPoints
Definition: Transition.h:43
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::statechartmodel::Transition::mappingToParentStatesOutput
ParameterMappingList mappingToParentStatesOutput
Definition: Transition.h:85
armarx::SupportPoints::toPointList
QList< QPointF > toPointList() const
Definition: GraphvizConverter.cpp:345
armarx::statechartmodel::Transition::supportPoints
SupportPoints supportPoints
Definition: Transition.h:86