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
32
33class QComboBox;
34
35namespace armarx::Ui
36{
37 class TransitionDialog;
38}
39
40namespace 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
TransitionDialog(statechartmodel::TransitionCPtr transition, statechartmodel::StatePtr parentState, QStringList profileNames, Ice::CommunicatorPtr ic=NULL, VariantInfoPtr variantInfo=VariantInfoPtr(), QWidget *parent=0)
statechartmodel::ParameterMappingList getMappingToParentStateLocal() const
statechartmodel::ParameterMappingList getMappingToNextStateInput() const
statechartmodel::ParameterMappingList getMappingToParentStateOutput() const
static size_t LevenshteinEditDistance(const std::string &s1, const std::string &s2)
::IceInternal::Handle<::Ice::Communicator > CommunicatorPtr
Definition IceManager.h:49
std::shared_ptr< State > StatePtr
Definition State.h:48
QMap< QString, StateParameterPtr > StateParameterMap
QList< ParameterMappingPtr > ParameterMappingList
Definition XmlWriter.h:49
std::shared_ptr< const Transition > TransitionCPtr
Definition Transition.h:91
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< VariantInfo > VariantInfoPtr
Definition VariantInfo.h:39