rviz.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011, Dorian Scholz, TU Darmstadt
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * * Redistributions in binary form must reproduce the above
12  * copyright notice, this list of conditions and the following
13  * disclaimer in the documentation and/or other materials provided
14  * with the distribution.
15  * * Neither the name of the TU Darmstadt nor the names of its
16  * contributors may be used to endorse or promote products derived
17  * from this software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23  * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 #ifndef rqt_rviz__RViz_H
34 #define rqt_rviz__RViz_H
35 
36 #include <rqt_gui_cpp/plugin.h>
38 #include <OGRE/OgreLog.h>
39 
40 #include <QDockWidget>
41 #include <QMenuBar>
42 
43 namespace rqt_rviz {
44 
45 class RViz
46  : public rqt_gui_cpp::Plugin
47 {
48 
49  Q_OBJECT
50 
51 public:
52 
53  RViz();
54 
55  ~RViz();
56 
57  virtual void initPlugin(qt_gui_cpp::PluginContext& context);
58 
59  virtual void saveSettings(qt_gui_cpp::Settings& plugin_settings, qt_gui_cpp::Settings& instance_settings) const;
60 
61  virtual void restoreSettings(const qt_gui_cpp::Settings& plugin_settings, const qt_gui_cpp::Settings& instance_settings);
62 
63  bool hasConfiguration() const;
64 
65  void triggerConfiguration();
66 
67  virtual bool eventFilter(QObject* watched, QEvent* event);
68 
69 protected Q_SLOTS:
70  void onDisplayConfigChanged(const QString& fullpath);
71 
72 protected:
73  void parseArguments();
74 
76 
78 
79  Ogre::Log* log_;
80 
81  bool hide_menu_;
82  std::string display_config_;
83  bool ogre_log_;
84 
86  QMenuBar* menu_bar_;
87 
88  enum CmdLineFlags {
89  OGRE_LOG = 1,
90  HIDE_MENU = 2,
92  };
93  uint8_t set_from_cmdline_ = 0u;
94 };
95 
96 }
97 
98 #endif // rqt_rviz__RViz_H
rqt_rviz::RViz::triggerConfiguration
void triggerConfiguration()
Definition: rviz.cpp:199
rqt_rviz::RViz::initPlugin
virtual void initPlugin(qt_gui_cpp::PluginContext &context)
Definition: rviz.cpp:67
rqt_rviz::RViz::saveSettings
virtual void saveSettings(qt_gui_cpp::Settings &plugin_settings, qt_gui_cpp::Settings &instance_settings) const
Definition: rviz.cpp:169
qt_gui_cpp::PluginContext
rqt_rviz::RViz::set_from_cmdline_
uint8_t set_from_cmdline_
Definition: rviz.h:93
rqt_rviz::RViz::parseArguments
void parseArguments()
Definition: rviz.cpp:112
rqt_rviz::RViz::widget_
rviz::VisualizationFrame * widget_
Definition: rviz.h:77
rqt_rviz
Definition: config_dialog.h:40
rqt_rviz::RViz::HIDE_MENU
@ HIDE_MENU
Definition: rviz.h:90
qt_gui_cpp::Settings
rqt_rviz::RViz::display_config_
std::string display_config_
Definition: rviz.h:82
rqt_rviz::RViz::hasConfiguration
bool hasConfiguration() const
Definition: rviz.cpp:194
rqt_rviz::RViz::DISPLAY_CONFIG
@ DISPLAY_CONFIG
Definition: rviz.h:91
rqt_gui_cpp::Plugin
rqt_rviz::RViz::hide_menu_
bool hide_menu_
Definition: rviz.h:81
rqt_rviz::RViz::ogre_log_
bool ogre_log_
Definition: rviz.h:83
visualization_frame.h
rqt_rviz::RViz::~RViz
~RViz()
Definition: rviz.cpp:58
rqt_rviz::RViz::menu_bar_
QMenuBar * menu_bar_
Pointer to menu bar.
Definition: rviz.h:86
rqt_rviz::RViz::RViz
RViz()
Definition: rviz.cpp:47
rqt_rviz::RViz::context_
qt_gui_cpp::PluginContext * context_
Definition: rviz.h:75
plugin.h
rqt_rviz::RViz
Definition: rviz.h:45
rviz::VisualizationFrame
rqt_rviz::RViz::CmdLineFlags
CmdLineFlags
Definition: rviz.h:88
rqt_rviz::RViz::OGRE_LOG
@ OGRE_LOG
Definition: rviz.h:89
rqt_rviz::RViz::log_
Ogre::Log * log_
Definition: rviz.h:79
rqt_rviz::RViz::onDisplayConfigChanged
void onDisplayConfigChanged(const QString &fullpath)
Definition: rviz.cpp:105
rqt_rviz::RViz::eventFilter
virtual bool eventFilter(QObject *watched, QEvent *event)
Definition: rviz.cpp:218
rqt_rviz::RViz::restoreSettings
virtual void restoreSettings(const qt_gui_cpp::Settings &plugin_settings, const qt_gui_cpp::Settings &instance_settings)
Definition: rviz.cpp:176


rqt_rviz
Author(s): Dorian Scholz
autogenerated on Wed Mar 2 2022 00:59:27