Ignition Gui

API Reference

5.0.0
KeyPublisher.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef IGNITION_GUI_PLUGINS_KEYPUBLISHER_HH_
19 #define IGNITION_GUI_PLUGINS_KEYPUBLISHER_HH_
20 
21 #include <ignition/gui/qt.h>
22 
23 #include <memory>
24 
25 #include <ignition/gui/Plugin.hh>
26 #include <ignition/transport/Node.hh>
27 
28 namespace ignition
29 {
30 namespace gui
31 {
32  class KeyPublisherPrivate;
33 
39  {
40  Q_OBJECT
41 
43  public: KeyPublisher();
44 
46  public: virtual ~KeyPublisher();
47 
48  // Documentation inherited
49  public: virtual void LoadConfig(const tinyxml2::XMLElement *) override;
50 
54  protected: bool eventFilter(QObject *_obj, QEvent *_event) override;
55 
58  private: std::unique_ptr<KeyPublisherPrivate> dataPtr;
59  };
60 }
61 }
62 
63 #endif
Base class for Ignition GUI plugins.
Definition: Plugin.hh:54
virtual void LoadConfig(const tinyxml2::XMLElement *) override
Load the plugin with a configuration file. Override this on custom plugins to handle custom configura...
bool eventFilter(QObject *_obj, QEvent *_event) override
Filter events in Qt.
Publish keyboard stokes to "keyboard/keypress" topic.
Definition: KeyPublisher.hh:38
Definition: Application.hh:40
virtual ~KeyPublisher()
Destructor.