RemoteGuiBase.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::RemoteGui
17  * @author Fabian Reister ( fabian dot reister at kit dot edu )
18  * @date 2021
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
26 
27 #include <ArmarXGui/interface/RemoteGuiInterface.h>
29 
30 namespace armarx::RemoteGui
31 {
33  {
34  public:
35  RemoteGuiBase(const RemoteGuiInterfacePrx& remoteGui);
36 
37  void shutdown();
38 
39  protected:
40  virtual void handleEvents(armarx::RemoteGui::TabProxy& tab) = 0;
41  virtual const std::string& tabName() const = 0;
42 
44  const armarx::RemoteGui::TabProxy& getTab() const;
45 
46  RemoteGuiInterfacePrx& getRemoteGui();
47  const RemoteGuiInterfacePrx& getRemoteGui() const;
48 
49  void createTab(const WidgetPtr& widget);
50 
51  private:
52  // thread function
53  void run();
54 
55  RemoteGuiInterfacePrx remoteGui;
56  TabProxy tab;
57 
59 
60  };
61 
62 } // namespace armarx::RemoteGui
armarx::RemoteGui::RemoteGuiBase::createTab
void createTab(const WidgetPtr &widget)
Definition: RemoteGuiBase.cpp:32
armarx::RemoteGui
Definition: LightweightRemoteGuiComponentPlugin.h:30
RunningTask.h
armarx::RemoteGui::RemoteGuiBase::tabName
virtual const std::string & tabName() const =0
armarx::RemoteGui::TabProxy
Definition: WidgetProxy.h:17
armarx::RemoteGui::RemoteGuiBase::shutdown
void shutdown()
Definition: RemoteGuiBase.cpp:43
armarx::RemoteGui::RemoteGuiBase::getTab
armarx::RemoteGui::TabProxy & getTab()
Definition: RemoteGuiBase.cpp:54
WidgetProxy.h
armarx::WidgetDescription::WidgetPtr
::IceInternal::Handle<::armarx::WidgetDescription::Widget > WidgetPtr
Definition: NJointControllerBase.h:66
IceUtil::Handle
Definition: forward_declarations.h:29
armarx::RemoteGui::RemoteGuiBase::handleEvents
virtual void handleEvents(armarx::RemoteGui::TabProxy &tab)=0
armarx::RemoteGui::RemoteGuiBase::getRemoteGui
RemoteGuiInterfacePrx & getRemoteGui()
Definition: RemoteGuiBase.cpp:64
armarx::RemoteGui::RemoteGuiBase::RemoteGuiBase
RemoteGuiBase(const RemoteGuiInterfacePrx &remoteGui)
Definition: RemoteGuiBase.cpp:10
armarx::RemoteGui::RemoteGuiBase
Definition: RemoteGuiBase.h:32