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 |
Load the plugin with a configuration file. Override this on custom plugins to handle custom configurations. More... | |
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... | |
![]() | |
Plugin () | |
Constructor. More... | |
virtual | ~Plugin () |
Destructor. More... | |
QQuickItem * | CardItem () const |
Get the card item which contains this plugin. The item is generated the first time this function is run. More... | |
virtual std::string | ConfigStr () |
Get the configuration XML as a string. More... | |
QQmlContext * | Context () const |
Get the QML context where the plugin was created. More... | |
bool | DeleteLaterRequested () const |
Get the value of the the delete_later element from the configuration file, which defaults to false. More... | |
void | Load (const tinyxml2::XMLElement *_pluginElem) |
Load the plugin with a configuration file. This loads the default parameters and then calls LoadConfig(), which should be overridden to load custom parameters. More... | |
QQuickItem * | PluginItem () const |
Get the plugin item. More... | |
void | PostParentChanges () |
Apply changes which should come after the plugin already has a parent. More... | |
virtual std::string | Title () const |
Get title. More... | |
![]() | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Properties | |
QString | directory |
Directory to save screenshots. More... | |
QString | savedScreenshotPath |
Saved screenshot filepath. More... | |
![]() | |
objectName | |
Additional Inherited Members | |
![]() | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
![]() | |
void | DeleteLater () |
Wait until the plugin has a parent, then close and delete the parent. More... | |
![]() | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
![]() | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
![]() | |
std::string | configStr |
XML configuration. More... | |
std::string | title = "" |
Title to be displayed on top of plugin. 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()
|
overridevirtual |
🔗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: