Gazebo Gui

API Reference

8.3.0

Provides a button and a transport service for taking a screenshot of current 3D scene. More...

#include <Screenshot.hh>

Public Slots

void OnScreenshot ()
 Callback when screenshot is requested from the GUI. More...
 

Signals

void DirectoryChanged ()
 Notify that the directory path has changed. More...
 
void savedScreenshot ()
 Notify that the screenshot has been saved (opens popup) More...
 
void SavedScreenshotPathChanged ()
 Notify that the screenshot filename has changed. More...
 

Public Member Functions

 Screenshot ()
 Constructor. More...
 
 ~Screenshot () override
 Destructor. More...
 
Q_INVOKABLE QString Directory () const
 Get the directory path as a string, for example '/home/Pictures'. More...
 
void LoadConfig (const tinyxml2::XMLElement *_pluginElem) override
 
Q_INVOKABLE QString SavedScreenshotPath () const
 Get the filepath of the saved screenshot as a string, for example '/home/Pictures/[timestamp].png'. More...
 
Q_INVOKABLE void SetDirectory (const QString &_dirUrl)
 Set the directory path from a string, for example '/home/Pictures'. More...
 
Q_INVOKABLE void SetSavedScreenshotPath (const QString &_filename)
 Set the filepath of the saved screenshot from a string, for example '/home/Pictures/[timestamp].png'. More...
 

Properties

QString directory
 Directory to save screenshots. More...
 
QString savedScreenshotPath
 Saved screenshot filepath. More...
 

Detailed Description

Provides a button and a transport service for taking a screenshot of current 3D scene.

/gui/screenshot service: Data: Path to save to, leave empty to save to latest path. Response: True if screenshot has been queued succesfully.

Constructor & Destructor Documentation

◆ Screenshot()

Constructor.

◆ ~Screenshot()

~Screenshot ( )
override

Destructor.

Member Function Documentation

◆ Directory()

Q_INVOKABLE QString Directory ( ) const

Get the directory path as a string, for example '/home/Pictures'.

Returns
Directory

◆ DirectoryChanged

void DirectoryChanged ( )
signal

Notify that the directory path has changed.

◆ LoadConfig()

void LoadConfig ( const tinyxml2::XMLElement *  _pluginElem)
override

◆ OnScreenshot

void OnScreenshot ( )
slot

Callback when screenshot is requested from the GUI.

◆ savedScreenshot

void savedScreenshot ( )
signal

Notify that the screenshot has been saved (opens popup)

◆ SavedScreenshotPath()

Q_INVOKABLE QString SavedScreenshotPath ( ) const

Get the filepath of the saved screenshot as a string, for example '/home/Pictures/[timestamp].png'.

Returns
Saved screenshot filename

◆ SavedScreenshotPathChanged

void SavedScreenshotPathChanged ( )
signal

Notify that the screenshot filename has changed.

◆ SetDirectory()

Q_INVOKABLE void SetDirectory ( const QString _dirUrl)

Set the directory path from a string, for example '/home/Pictures'.

Parameters
[in]_dirUrlThe new directory path

◆ SetSavedScreenshotPath()

Q_INVOKABLE void SetSavedScreenshotPath ( const QString _filename)

Set the filepath of the saved screenshot from a string, for example '/home/Pictures/[timestamp].png'.

Parameters
[in]_filenameThe filename (including path) of the screenshot

Property Documentation

◆ directory

QString directory
readwrite

Directory to save screenshots.

◆ savedScreenshotPath

QString savedScreenshotPath
readwrite

Saved screenshot filepath.


The documentation for this class was generated from the following file: