TransitionDialog.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 
27 #include <QDialog>
28 
30 
31 #include "../../../StatechartViewerPlugin/model/State.h"
32 
33 class QComboBox;
34 
35 namespace armarx::Ui
36 {
37  class TransitionDialog;
38 }
39 
40 namespace armarx
41 {
42  class TransitionDialog : public QDialog
43  {
44  Q_OBJECT
45 
46  public:
48  statechartmodel::StatePtr parentState,
49  QStringList profileNames,
50  Ice::CommunicatorPtr ic = NULL,
51  VariantInfoPtr variantInfo = VariantInfoPtr(),
52  QWidget* parent = 0);
53  ~TransitionDialog() override;
54 
58 
59  static size_t LevenshteinEditDistance(const std::string& s1, const std::string& s2);
60 
61  private slots:
62  void on_btnAutoMap_clicked();
63 
64  private:
65  void setup();
66  Ui::TransitionDialog* ui;
68  statechartmodel::StatePtr parentState;
70  VariantInfoPtr variantInfo;
71  QStringList profileNames;
72  QComboBox* getFilteredOutputItems(QString key, statechartmodel::TransitionCPtr transition);
73  QStringList getFilteredParams(const statechartmodel::StateParameterMap& source,
74  const statechartmodel::StateParameter& argumentToMatch) const;
75  };
76 
77 } // namespace armarx
armarx::TransitionDialog::getMappingToParentStateLocal
statechartmodel::ParameterMappingList getMappingToParentStateLocal() const
Definition: TransitionDialog.cpp:68
armarx::Ui
Definition: GuiUseCaseSelector.h:33
armarx::TransitionDialog::~TransitionDialog
~TransitionDialog() override
Definition: TransitionDialog.cpp:56
armarx::TransitionDialog::TransitionDialog
TransitionDialog(statechartmodel::TransitionCPtr transition, statechartmodel::StatePtr parentState, QStringList profileNames, Ice::CommunicatorPtr ic=NULL, VariantInfoPtr variantInfo=VariantInfoPtr(), QWidget *parent=0)
Definition: TransitionDialog.cpp:38
IceInternal::Handle<::Ice::Communicator >
armarx::statechartmodel::StateParameter
Definition: StateParameter.h:50
armarx::TransitionDialog
Definition: TransitionDialog.h:42
armarx::statechartmodel::StateParameterMap
QMap< QString, StateParameterPtr > StateParameterMap
Definition: StateParameter.h:46
boost::source
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Definition: point_cloud_graph.h:661
armarx::TransitionDialog::LevenshteinEditDistance
static size_t LevenshteinEditDistance(const std::string &s1, const std::string &s2)
Definition: TransitionDialog.cpp:80
armarx::TransitionDialog::getMappingToNextStateInput
statechartmodel::ParameterMappingList getMappingToNextStateInput() const
Definition: TransitionDialog.cpp:62
armarx::TransitionDialog::getMappingToParentStateOutput
statechartmodel::ParameterMappingList getMappingToParentStateOutput() const
Definition: TransitionDialog.cpp:74
armarx::VariantInfoPtr
std::shared_ptr< VariantInfo > VariantInfoPtr
Definition: VariantInfo.h:39
armarx::statechartmodel::TransitionCPtr
std::shared_ptr< const Transition > TransitionCPtr
Definition: Transition.h:91
armarx::statechartmodel::ParameterMappingList
QList< ParameterMappingPtr > ParameterMappingList
Definition: XmlWriter.h:49
armarx::statechartmodel::StatePtr
std::shared_ptr< State > StatePtr
Definition: State.h:48
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
VariantInfo.h