18 #ifndef GZ_GUI_PLUGINS_SCREENSHOT_HH_
19 #define GZ_GUI_PLUGINS_SCREENSHOT_HH_
21 #include <gz/msgs/boolean.pb.h>
22 #include <gz/msgs/stringmsg.pb.h>
29 namespace gz::gui::plugins
31 class ScreenshotPrivate;
48 NOTIFY DirectoryChanged
54 READ SavedScreenshotPath
55 WRITE SetSavedScreenshotPath
56 NOTIFY SavedScreenshotPathChanged
66 public:
void LoadConfig(const
tinyxml2::XMLElement *_pluginElem) override;
69 public slots:
void OnScreenshot();
74 private:
bool eventFilter(
QObject *_obj,
QEvent *_event) override;
81 private:
bool ScreenshotService(const msgs::StringMsg &_msg,
86 private:
void FindUserCamera();
89 private:
void SaveScreenshot();
93 public: Q_INVOKABLE
QString Directory() const;
98 public: Q_INVOKABLE
void SetDirectory(const
QString &_dirUrl);
101 signals:
void DirectoryChanged();
106 public: Q_INVOKABLE
QString SavedScreenshotPath() const;
111 public: Q_INVOKABLE
void SetSavedScreenshotPath(const
QString &_filename);
114 signals:
void SavedScreenshotPathChanged();
117 signals:
void savedScreenshot();
121 private:
std::unique_ptr<ScreenshotPrivate> dataPtr;
125 #endif // GZ_GUI_PLUGINS_SCREENSHOT_HH_