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 successfully.
Constructor & Destructor Documentation
◆ Screenshot()
| Screenshot | ( | ) | 
Constructor.
◆ ~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
| 
 | signal | 
Notify that the directory path has changed.
◆ LoadConfig()
| 
 | override | 
◆ OnScreenshot
| 
 | slot | 
Callback when screenshot is requested from the GUI.
◆ 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
| 
 | 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] _dirUrl The 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] _filename The filename (including path) of the screenshot 
Property Documentation
◆ directory
| 
 | readwrite | 
Directory to save screenshots.
◆ savedScreenshotPath
| 
 | readwrite | 
Saved screenshot filepath.
The documentation for this class was generated from the following file: