Gazebo Gui

API Reference

9.0.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.
 

Signals

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

Public Member Functions

 Screenshot ()
 Constructor.
 
 ~Screenshot () override
 Destructor.
 
Q_INVOKABLE QString Directory () const
 Get the directory path as a string, for example '/home/Pictures'.
 
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'.
 
Q_INVOKABLE void SetDirectory (const QString &_dirUrl)
 Set the directory path from a string, for example '/home/Pictures'.
 
Q_INVOKABLE void SetSavedScreenshotPath (const QString &_filename)
 Set the filepath of the saved screenshot from a string, for example '/home/Pictures/[timestamp].png'.
 

Properties

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

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: