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
Ogre::Log * log_
Definition: rviz.h:79
void onDisplayConfigChanged(const QString &fullpath)
Definition: rviz.cpp:105
virtual void saveSettings(qt_gui_cpp::Settings &plugin_settings, qt_gui_cpp::Settings &instance_settings) const
Definition: rviz.cpp:169
virtual void initPlugin(qt_gui_cpp::PluginContext &context)
Definition: rviz.cpp:67
uint8_t set_from_cmdline_
Definition: rviz.h:93
virtual void restoreSettings(const qt_gui_cpp::Settings &plugin_settings, const qt_gui_cpp::Settings &instance_settings)
Definition: rviz.cpp:176
void parseArguments()
Definition: rviz.cpp:112
rviz::VisualizationFrame * widget_
Definition: rviz.h:77
bool hide_menu_
Definition: rviz.h:81
bool ogre_log_
Definition: rviz.h:83
bool hasConfiguration() const
Definition: rviz.cpp:194
std::string display_config_
Definition: rviz.h:82
QMenuBar * menu_bar_
Pointer to menu bar.
Definition: rviz.h:86
qt_gui_cpp::PluginContext * context_
Definition: rviz.h:75
void triggerConfiguration()
Definition: rviz.cpp:199
virtual bool eventFilter(QObject *watched, QEvent *event)
Definition: rviz.cpp:218


rqt_rviz
Author(s): Dorian Scholz
autogenerated on Mon Feb 28 2022 23:40:05