display_context.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012, Willow Garage, Inc.
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 are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  */
29 #ifndef DISPLAY_CONTEXT_H
30 #define DISPLAY_CONTEXT_H
31 
32 #include <cstdint> // for uint64_t
33 #include <memory>
34 
35 #include <QObject>
36 #include <QString>
37 
38 class QKeyEvent;
39 
40 namespace Ogre
41 {
42 class SceneManager;
43 }
44 
45 namespace ros
46 {
47 class CallbackQueueInterface;
48 }
49 
50 namespace tf
51 {
52 class TransformListener;
53 }
54 
55 namespace tf2_ros
56 {
57 class Buffer;
58 }
59 
60 namespace rviz
61 {
62 class BitAllocator;
63 class DisplayFactory;
64 class DisplayGroup;
65 class FrameManager;
66 class RenderPanel;
67 class SelectionManager;
68 class ToolManager;
69 class ViewController;
70 class ViewportMouseEvent;
71 class ViewManager;
72 class WindowManagerInterface;
73 
81 class DisplayContext : public QObject
82 {
83  Q_OBJECT
84 public:
86  virtual Ogre::SceneManager* getSceneManager() const = 0;
87 
89  virtual WindowManagerInterface* getWindowManager() const = 0;
90 
92  virtual SelectionManager* getSelectionManager() const = 0;
93 
95  virtual FrameManager* getFrameManager() const = 0;
96 
98  [[deprecated("use getTF2BufferPtr() instead")]] virtual tf::TransformListener* getTFClient() const = 0;
99 
101  virtual std::shared_ptr<tf2_ros::Buffer> getTF2BufferPtr() const = 0;
102 
104  virtual QString getFixedFrame() const = 0;
105 
111  virtual uint64_t getFrameCount() const = 0;
112 
114  virtual DisplayFactory* getDisplayFactory() const = 0;
115 
117  virtual ros::CallbackQueueInterface* getUpdateQueue() = 0;
118 
120  virtual ros::CallbackQueueInterface* getThreadedQueue() = 0;
121 
123  virtual void handleChar(QKeyEvent* event, RenderPanel* panel) = 0;
124 
126  virtual void handleMouseEvent(const ViewportMouseEvent& event) = 0;
127 
129  virtual ToolManager* getToolManager() const = 0;
130 
132  virtual ViewManager* getViewManager() const = 0;
133 
134  virtual DisplayGroup* getRootDisplayGroup() const = 0;
135 
136  virtual uint32_t getDefaultVisibilityBit() const = 0;
137 
138  virtual BitAllocator* visibilityBits() = 0;
139 
141  virtual void setStatus(const QString& message) = 0;
142 
143 public Q_SLOTS:
146  virtual void queueRender() = 0;
147 };
148 
149 } // end namespace rviz
150 
151 #endif // DISPLAY_CONTEXT_H
Pure-virtual base class for objects which give Display subclasses context in which to work...
Helper class for transforming data into Ogre&#39;s world frame (the fixed frame).
Definition: frame_manager.h:70
A Display object which stores other Displays as children.
Definition: display_group.h:47
Allocation manager for bit positions within a 32-bit word.
Definition: bit_allocator.h:37


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Sat Aug 6 2022 02:06:51