Go to the documentation of this file.
32 #include <QApplication>
34 #include <QDockWidget>
36 #include <QMetaObject>
39 #include <OgreSceneManager.h>
40 #include <OgreSceneNode.h>
51 #include <boost/filesystem.hpp>
57 , scene_node_(nullptr)
60 , visibility_bits_(0xFFFFFFFF)
61 , associated_widget_(nullptr)
62 , associated_widget_panel_(nullptr)
63 , suppress_hiding_associated_widget_panel_(false)
66 qRegisterMetaType<ros::Time>();
111 case Qt::ForegroundRole:
125 return QColor(40, 120, 197);
130 return QApplication::palette().color(QPalette::Text);
144 case Qt::DecorationRole:
178 QMetaObject::invokeMethod(
this,
"setStatusInternal", Qt::QueuedConnection, Q_ARG(
int, level),
179 Q_ARG(QString, name), Q_ARG(QString, text));
201 QMetaObject::invokeMethod(
this,
"deleteStatusInternal", Qt::QueuedConnection, Q_ARG(QString, name));
214 QMetaObject::invokeMethod(
this,
"clearStatusesInternal", Qt::QueuedConnection);
237 if (
config.mapGetString(
"Name", &name))
243 if (
config.mapGetBool(
"Enabled", &enabled))
297 QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
335 QApplication::restoreOverrideCursor();
virtual bool getBool() const
bool isEnabled() const
Return true if this Display is enabled, false if not.
virtual ros::CallbackQueueInterface * getUpdateQueue()=0
Return the CallbackQueue using the main GUI thread.
void deleteStatusInternal(const QString &name)
virtual void queueRender()=0
Queues a render. Multiple calls before a render happens will only cause a single render.
void emitTimeSignal(ros::Time time)
Emit a time signal that other Displays can synchronize to.
bool suppress_hiding_associated_widget_panel_
void setFixedFrame(const QString &fixed_frame)
Set the fixed frame in this display.
virtual void setName(const QString &name)
Set the name.
void initialize(DisplayContext *context)
Main initialization, called after constructor, before load() or setEnabled().
virtual void deleteStatus(const QString &name)
Delete the status entry with the given name. This is thread-safe.
void queueRender()
Convenience function which calls context_->queueRender().
virtual QString getClassId() const
Return the class identifier which was used to create this instance. This version just returns whateve...
void applyVisibilityBits(uint32_t bits, Ogre::SceneNode *node)
virtual QVariant getViewData(int column, int role) const
Return data appropriate for the given column (0 or 1) and role for this Property.
virtual void clearStatuses()
Delete all status children. This is thread-safe.
void associatedPanelVisibilityChange(bool visible)
virtual void onDisable()
Derived classes override this to do the actual work of disabling themselves.
virtual void addChild(Property *child, int index=-1)
Add a child property.
void save(Config config) const override
Write this display to the given Config node.
virtual ros::CallbackQueueInterface * getThreadedQueue()=0
Return a CallbackQueue using a different thread than the main GUI one.
void setDisableChildrenIfFalse(bool disable)
QString fixed_frame_
A convenience variable equal to context_->getFixedFrame().
virtual QIcon getIcon() const
PanelDockWidget * associated_widget_panel_
void setVisibilityBits(uint32_t bits)
virtual Ogre::SceneManager * getSceneManager() const =0
Returns the Ogre::SceneManager used for the main RenderPanel.
QMetaObject::Connection connect(const QObject *receiver, const char *slot, Qt::ConnectionType type=Qt::AutoConnection)
Connect changed() signal to given slot of receiver.
static QColor statusColor(Level level)
Return the color appropriate for the given status level.
void emitDataChanged(Property *property, bool emit_config_changed=true)
virtual void setStatus(StatusProperty::Level level, const QString &name, const QString &text)
Show status level and text. This is thread-safe.
QWidget * associated_widget_
void setIcon(const QIcon &icon) override
Set the Display's icon.
virtual bool setValue(const QVariant &new_value)
Set the new value for this property. Returns true if the new value is different from the old value,...
void setEnabled(bool enabled)
Enable or disable this Display.
Ogre::SceneNode * scene_node_
The Ogre::SceneNode to hold all 3D scene elements shown by this Display.
virtual Level getLevel() const
virtual void fixedFrameChanged()
Called by setFixedFrame(). Override to respond to changes to fixed_frame_.
void timeSignal(ros::Time time, QPrivateSignal)
void setStatus(Level level, const QString &name, const QString &text)
virtual void onInitialize()
Override this function to do subclass-specific initialization.
PropertyTreeModel * model_
Pointer to the PropertyTreeModel managing this property tree.
Ogre::SceneManager * scene_manager_
A convenience variable equal to context_->getSceneManager().
QVariant getViewData(int column, int role) const override
Return data appropriate for the given column (0 or 1) and role for this Display.
virtual QString getFixedFrame() const =0
Return the fixed frame name.
void load(const Config &config) override
Load the settings for this display from the given Config node, which must be a map.
Pure-virtual base class for objects which give Display subclasses context in which to work.
void unsetVisibilityBits(uint32_t bits)
void setCallbackQueue(CallbackQueueInterface *queue)
void setName(const QString &name) override
Overridden from Property to set associated widget title to the new name.
void deleteStatus(const QString &name)
virtual Qt::ItemFlags getViewFlags(int column) const
Return item flags appropriate for the given column (0 or 1) for this Property.
virtual void onEnableChanged()
virtual WindowManagerInterface * getWindowManager() const =0
Return the window manager, if any.
Qt::ItemFlags getViewFlags(int column) const override
Return item flags appropriate for the given column (0 or 1) for this Display.
virtual QString getName() const
Return the name of this Property as a QString.
DisplayContext * context_
This DisplayContext pointer is the main connection a Display has into the rest of rviz....
virtual PanelDockWidget * addPane(const QString &name, QWidget *pane, Qt::DockWidgetArea area=Qt::LeftDockWidgetArea, bool floating=false)=0
void clearStatusesInternal()
virtual void reset()
Called to tell the display to clear its state.
void changed()
Emitted by setValue() just after the value has changed.
virtual void onEnable()
Derived classes override this to do the actual work of enabling themselves.
virtual void save(Config config) const
Write the value of this property and/or its children into the given Config reference.
ros::NodeHandle threaded_nh_
A NodeHandle whose CallbackQueue is run from a different thread than the GUI.
void setAssociatedWidget(QWidget *widget)
Associate the given widget with this Display.
void setStatusInternal(int level, const QString &name, const QString &text)
uint32_t visibility_bits_
virtual void load(const Config &config)
Load the value of this property and/or its children from the given Config reference.
QIcon statusIcon(Level level) const
Configuration data storage class.
ros::NodeHandle update_nh_
A NodeHandle whose CallbackQueue is run from the main GUI thread (the "update" thread).
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Aug 2 2024 08:43:09