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 "../../../StatechartViewerPlugin/model/State.h"
28 
30 
31 #include <QDialog>
32 #include <QErrorMessage>
33 
35 
37 
38 class QFileDialog;
39 
40 namespace armarx
41 {
42  class StatechartEditorParameterEditor;
43  class StateParameterEditor;
44 }
45 
46 namespace armarx::Ui
47 {
48  class StateDialog;
49 }
50 
51 namespace armarx
52 {
53  class StateDialog : public QDialog
54  {
55  Q_OBJECT
56 
57  public:
58  explicit StateDialog(statechartmodel::StateInstancePtr stateInstance, Ice::CommunicatorPtr communicator, VariantInfoPtr variantInfo, StatechartProfilePtr currentProfile, bool locked, bool readOnly, QPointer<TipDialog> tipDialog, QWidget* parent = 0);
59  ~StateDialog() override;
60 
64  QString getStateInstanceName() const;
65  QString getStateName() const;
66  QString getProxyName() const;
67  QString getDescription() const;
69 
70  private slots:
71  void eventNameComboboxChanged(const QString& eventName);
72  void eventButtonAdd();
73  void eventButtonDelete();
74  void eventDescriptionChanged();
75  void loadLibrary();
76  void setBlackLists();
77  void setLockStatus(bool unlock);
78  void updateLinkHint(int, QString);
79 
80 
81  private:
83  // statechartmodel::StateParameterMap getParameters(const armarx::StatechartEditorParameterEditor &parameterEditor) const;
84 
85  Ui::StateDialog* ui;
87  QMap<QString, QString> eventDescriptionMap;
88  QFileDialog* fileDialog;
89  static QMap<QString, DynamicLibraryPtr> Libraries;
90  Ice::CommunicatorPtr communicator;
91  VariantInfoPtr variantInfo;
92  StatechartProfilePtr currentProfile;
93  QPointer<TipDialog> tipDialog;
94  bool readOnly;
95 
96  // QWidget interface
97  protected:
98  void showEvent(QShowEvent*) override;
99  };
100 
101 
102 }
armarx::Ui
Definition: GuiUseCaseSelector.h:33
armarx::StateDialog::StateDialog
StateDialog(statechartmodel::StateInstancePtr stateInstance, Ice::CommunicatorPtr communicator, VariantInfoPtr variantInfo, StatechartProfilePtr currentProfile, bool locked, bool readOnly, QPointer< TipDialog > tipDialog, QWidget *parent=0)
Definition: StateDialog.cpp:48
armarx::StateDialog::getProxyName
QString getProxyName() const
Definition: StateDialog.cpp:257
DynamicLibrary.h
armarx::StateDialog
Definition: StateDialog.h:53
armarx::statechartmodel::EventList
QList< EventPtr > EventList
Definition: XmlWriter.h:47
armarx::StatechartProfilePtr
std::shared_ptr< class StatechartProfile > StatechartProfilePtr
Definition: StatechartContext.h:52
armarx::statechartmodel::StateInstancePtr
std::shared_ptr< StateInstance > StateInstancePtr
Definition: StateInstance.h:138
IceInternal::Handle< ::Ice::Communicator >
armarx::StateDialog::getInputParams
statechartmodel::StateParameterMap getInputParams() const
Definition: StateDialog.cpp:208
armarx::statechartmodel::StateParameterMap
QMap< QString, StateParameterPtr > StateParameterMap
Definition: StateParameter.h:46
StatechartProfiles.h
armarx::StateDialog::~StateDialog
~StateDialog() override
Definition: StateDialog.cpp:203
boost::source
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Definition: point_cloud_graph.h:681
armarx::StateDialog::showEvent
void showEvent(QShowEvent *) override
Definition: StateDialog.cpp:432
armarx::StateDialog::getStateInstanceName
QString getStateInstanceName() const
Definition: StateDialog.cpp:247
armarx::StateDialog::getDescription
QString getDescription() const
Definition: StateDialog.cpp:262
armarx::StatechartEditorParameterEditor
Definition: StatechartEditorParameterEditor.h:54
armarx::StateDialog::getLocalParams
statechartmodel::StateParameterMap getLocalParams() const
Definition: StateDialog.cpp:221
armarx::VariantInfoPtr
std::shared_ptr< VariantInfo > VariantInfoPtr
Definition: VariantInfo.h:39
armarx::StateDialog::getStateName
QString getStateName() const
Definition: StateDialog.cpp:252
armarx::StateDialog::getOutgoingEvents
statechartmodel::EventList getOutgoingEvents() const
Definition: StateDialog.cpp:267
armarx::StateDialog::getOutputParams
statechartmodel::StateParameterMap getOutputParams() const
Definition: StateDialog.cpp:234
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
VariantInfo.h