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()
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: