MessageDisplayComponentPlugin.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package ArmarXGui::ArmarXObjects::ArmarXGuiComponentPlugins
17 * @author Raphael Grimm ( raphael dot grimm at kit dot edu )
18 * @date 2019
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25#include <functional>
26#include <map>
27#include <mutex>
28
30
31#include <ArmarXGui/interface/MessageDisplayInterface.h>
32
33namespace armarx::plugins
34{
35 /**
36 * @class MessageDisplayComponentPlugin
37 * @ingroup Library-ArmarXGuiComponentPlugins
38 * @brief Brief description of class MessageDisplayComponentPlugin.
39 *
40 * Detailed description of class MessageDisplayComponentPlugin.
41 */
43 {
44 public:
45 using ComponentPlugin::ComponentPlugin;
46
47 void setDisplayMessage(const std::string& caption, const std::string& subCaption) const;
48 void setDisplayMessageCaption(const std::string& text) const;
49 void setDisplayMessageSubCaption(const std::string& text) const;
50
51 const MessageDisplayInterfacePrx& getMessageDisplay() const;
52
53 protected:
54 void preOnInitComponent() override;
55 void preOnConnectComponent() override;
56
58
59 //data
60 private:
61 static constexpr auto _propertyName = "MessageDisplayTopic";
62 MessageDisplayInterfacePrx _display;
63 };
64} // namespace armarx::plugins
65
67
68namespace armarx
69{
71 {
72 public:
74
75 private:
76 MessageDisplayComponentPlugin* _messageDisplayComponentPlugin{nullptr};
77
78 public:
80
81 void setDisplayMessage(const std::string& caption, const std::string& subCaption) const;
82 void setDisplayMessageCaption(const std::string& text) const;
83 void setDisplayMessageSubCaption(const std::string& text) const;
84
85 const MessageDisplayInterfacePrx& getMessageDisplay() const;
86 };
87} // namespace armarx
ManagedIceObject(ManagedIceObject const &other)
void setDisplayMessageSubCaption(const std::string &text) const
armarx::plugins::MessageDisplayComponentPlugin MessageDisplayComponentPlugin
void setDisplayMessageCaption(const std::string &text) const
void setDisplayMessage(const std::string &caption, const std::string &subCaption) const
const MessageDisplayInterfacePrx & getMessageDisplay() const
Brief description of class MessageDisplayComponentPlugin.
void setDisplayMessageSubCaption(const std::string &text) const
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
void setDisplayMessage(const std::string &caption, const std::string &subCaption) const
const MessageDisplayInterfacePrx & getMessageDisplay() const
This file is part of ArmarX.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.