TransitionMappingTable.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 <QTableWidget>
28
30
32
33
34class QComboBox;
35
36namespace armarx
37{
38
39 class TransitionMappingTable : public QTableWidget
40 {
41 Q_OBJECT
42 public:
43 enum
44 {
50 };
51
52 explicit TransitionMappingTable(QWidget* parent = 0);
53 void setup(const statechartmodel::StateParameterMap& targetDict,
54 const statechartmodel::ParameterMappingList& sourceMapping,
57 QStringList profileNames,
58 Ice::CommunicatorPtr ic = NULL,
59 VariantInfoPtr variantInfo = VariantInfoPtr());
61 QList<std::pair<QString, QString>>
62 mapByCriteria(std::function<std::pair<bool, float>(QString, QString)> compare);
63 signals:
64
65 public slots:
66 protected slots:
67 void
68 setSourceSpecificMappingParameters(int index, int tablerow = -1, QString initialValue = "");
69
70 private:
71 QComboBox* getFilteredOutputItems(QString key, statechartmodel::TransitionCPtr transition);
72 QList<QPair<QString, QString>>
73 getFilteredParams(const statechartmodel::StateParameterMap& source,
74 const statechartmodel::StateParameter& argumentToMatch) const;
75 QString getInputTypeString(int row);
77 statechartmodel::StatePtr parentState;
80 QStringList profileNames;
82
83 VariantInfoPtr variantInfo;
84 };
85
86} // namespace armarx
uint8_t index
statechartmodel::ParameterMappingList getMapping() const
void setSourceSpecificMappingParameters(int index, int tablerow=-1, QString initialValue="")
void setup(const statechartmodel::StateParameterMap &targetDict, const statechartmodel::ParameterMappingList &sourceMapping, statechartmodel::TransitionCPtr transition, statechartmodel::StatePtr state, QStringList profileNames, Ice::CommunicatorPtr ic=NULL, VariantInfoPtr variantInfo=VariantInfoPtr())
QList< std::pair< QString, QString > > mapByCriteria(std::function< std::pair< bool, float >(QString, QString)> compare)
::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