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 <mutex>
26 #include <map>
27 #include <functional>
28 
30 
31 #include <ArmarXGui/interface/MessageDisplayInterface.h>
32 
33 
34 namespace armarx::plugins
35 {
36  /**
37  * @class MessageDisplayComponentPlugin
38  * @ingroup Library-ArmarXGuiComponentPlugins
39  * @brief Brief description of class MessageDisplayComponentPlugin.
40  *
41  * Detailed description of class MessageDisplayComponentPlugin.
42  */
44  {
45  public:
46  using ComponentPlugin::ComponentPlugin;
47 
48  void setDisplayMessage(const std::string& caption, const std::string& subCaption) const;
49  void setDisplayMessageCaption(const std::string& text) const;
50  void setDisplayMessageSubCaption(const std::string& text) const;
51 
52  const MessageDisplayInterfacePrx& getMessageDisplay() const;
53  protected:
54  void preOnInitComponent() override;
55  void preOnConnectComponent() override;
56 
57  void postCreatePropertyDefinitions(PropertyDefinitionsPtr& properties) override;
58 
59  //data
60  private:
61  static constexpr auto _propertyName = "MessageDisplayTopic";
62  MessageDisplayInterfacePrx _display;
63  };
64 }
65 
66 
68 
69 namespace armarx
70 {
72  {
73  public:
75  private:
76  MessageDisplayComponentPlugin* _messageDisplayComponentPlugin{nullptr};
77  public:
79 
80  void setDisplayMessage(const std::string& caption, const std::string& subCaption) const;
81  void setDisplayMessageCaption(const std::string& text) const;
82  void setDisplayMessageSubCaption(const std::string& text) const;
83 
84  const MessageDisplayInterfacePrx& getMessageDisplay() const;
85  };
86 }
armarx::plugins::MessageDisplayComponentPlugin
Brief description of class MessageDisplayComponentPlugin.
Definition: MessageDisplayComponentPlugin.h:43
armarx::MessageDisplayComponentPluginUser::setDisplayMessage
void setDisplayMessage(const std::string &caption, const std::string &subCaption) const
Definition: MessageDisplayComponentPlugin.cpp:86
armarx::plugins::MessageDisplayComponentPlugin::setDisplayMessageCaption
void setDisplayMessageCaption(const std::string &text) const
Definition: MessageDisplayComponentPlugin.cpp:35
armarx::MessageDisplayComponentPluginUser
Definition: MessageDisplayComponentPlugin.h:71
armarx::plugins::MessageDisplayComponentPlugin::setDisplayMessageSubCaption
void setDisplayMessageSubCaption(const std::string &text) const
Definition: MessageDisplayComponentPlugin.cpp:40
armarx::MessageDisplayComponentPluginUser::getMessageDisplay
const MessageDisplayInterfacePrx & getMessageDisplay() const
Definition: MessageDisplayComponentPlugin.cpp:99
armarx::plugins::MessageDisplayComponentPlugin::preOnConnectComponent
void preOnConnectComponent() override
Definition: MessageDisplayComponentPlugin.cpp:59
armarx::MessageDisplayComponentPluginUser::setDisplayMessageSubCaption
void setDisplayMessageSubCaption(const std::string &text) const
Definition: MessageDisplayComponentPlugin.cpp:94
ManagedIceObject.h
armarx::plugins::MessageDisplayComponentPlugin::postCreatePropertyDefinitions
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
Definition: MessageDisplayComponentPlugin.cpp:67
armarx::plugins
This file is part of ArmarX.
Definition: DebugObserverComponentPlugin.cpp:28
armarx::ComponentPlugin
Definition: ComponentPlugin.h:38
armarx::ManagedIceObject
The ManagedIceObject is the base class for all ArmarX objects.
Definition: ManagedIceObject.h:163
armarx::plugins::MessageDisplayComponentPlugin::preOnInitComponent
void preOnInitComponent() override
Definition: MessageDisplayComponentPlugin.cpp:51
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::plugins::MessageDisplayComponentPlugin::setDisplayMessage
void setDisplayMessage(const std::string &caption, const std::string &subCaption) const
Definition: MessageDisplayComponentPlugin.cpp:30
armarx::MessageDisplayComponentPluginUser::MessageDisplayComponentPluginUser
MessageDisplayComponentPluginUser()
Definition: MessageDisplayComponentPlugin.cpp:81
ComponentPlugin.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::plugins::MessageDisplayComponentPlugin::getMessageDisplay
const MessageDisplayInterfacePrx & getMessageDisplay() const
Definition: MessageDisplayComponentPlugin.cpp:46
armarx::MessageDisplayComponentPluginUser::setDisplayMessageCaption
void setDisplayMessageCaption(const std::string &text) const
Definition: MessageDisplayComponentPlugin.cpp:90