StateDialog.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#include <QErrorMessage>
29
33
35
36class QFileDialog;
37
38namespace armarx
39{
42} // namespace armarx
43
44namespace armarx::Ui
45{
46 class StateDialog;
47}
48
49namespace armarx
50{
51 class StateDialog : public QDialog
52 {
53 Q_OBJECT
54
55 public:
57 Ice::CommunicatorPtr communicator,
58 VariantInfoPtr variantInfo,
59 StatechartProfilePtr currentProfile,
60 bool locked,
61 bool readOnly,
62 QPointer<TipDialog> tipDialog,
63 QWidget* parent = 0);
64 ~StateDialog() override;
65
69 QString getStateInstanceName() const;
70 QString getStateName() const;
71 QString getProxyName() const;
72 QString getDescription() const;
74
75 private slots:
76 void eventNameComboboxChanged(const QString& eventName);
77 void eventButtonAdd();
78 void eventButtonDelete();
79 void eventDescriptionChanged();
80 void loadLibrary();
81 void setBlackLists();
82 void setLockStatus(bool unlock);
83 void updateLinkHint(int, QString);
84
85
86 private:
88 getUpdatedParameters(const statechartmodel::StateParameterMap& source,
89 const armarx::StatechartEditorParameterEditor& parameterEditor) const;
90 // statechartmodel::StateParameterMap getParameters(const armarx::StatechartEditorParameterEditor &parameterEditor) const;
91
92 Ui::StateDialog* ui;
94 QMap<QString, QString> eventDescriptionMap;
95 QFileDialog* fileDialog;
96 static QMap<QString, DynamicLibraryPtr> Libraries;
97 Ice::CommunicatorPtr communicator;
98 VariantInfoPtr variantInfo;
99 StatechartProfilePtr currentProfile;
100 QPointer<TipDialog> tipDialog;
101 bool readOnly;
102
103 // QWidget interface
104 protected:
105 void showEvent(QShowEvent*) override;
106 };
107
108
109} // namespace armarx
QString getProxyName() const
statechartmodel::StateParameterMap getLocalParams() const
QString getStateInstanceName() const
QString getStateName() const
statechartmodel::StateParameterMap getOutputParams() const
StateDialog(statechartmodel::StateInstancePtr stateInstance, Ice::CommunicatorPtr communicator, VariantInfoPtr variantInfo, StatechartProfilePtr currentProfile, bool locked, bool readOnly, QPointer< TipDialog > tipDialog, QWidget *parent=0)
void showEvent(QShowEvent *) override
QString getDescription() const
statechartmodel::EventList getOutgoingEvents() const
statechartmodel::StateParameterMap getInputParams() const
::IceInternal::Handle<::Ice::Communicator > CommunicatorPtr
Definition IceManager.h:49
QMap< QString, StateParameterPtr > StateParameterMap
std::shared_ptr< StateInstance > StateInstancePtr
QList< EventPtr > EventList
Definition XmlWriter.h:47
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< VariantInfo > VariantInfoPtr
Definition VariantInfo.h:39
std::shared_ptr< class StatechartProfile > StatechartProfilePtr