on xenial help sign in
Some documentation
commitfab816068f333cab949d2a3af5d57cb1e74ded30 authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 23 Apr 2015, 17:17 (11 years ago) parent6f9be79
1 file changed+15
plugins/SessionScreenshoter/sessionscreenshoter.h+15
plugins/SessionScreenshoter/sessionscreenshoter.h+15
@@ -25,12 +25,22 @@
2525class QQuickItem;
2626class QQuickItemGrabResult;
2727
28+/**
29+ * SessionScreenshoter saves to disk screenshots of the given item.
30+ * Images are saved into $HOME/.cache/app_shots/appId.png
31+ * It also handles giving back the screenshot path if it already exists (e.g. because a reboot)
32+ */
2833class SessionScreenshoter : public QObject
2934{
3035 Q_OBJECT
3136
37+ /// appId is the key of the screenshot name.
3238 Q_PROPERTY(QString appId READ appId WRITE setAppdId NOTIFY appdIdChanged)
39+
40+ /// path where the screenshot is saved, can be empty if no screenshot has been taken yet.
3341 Q_PROPERTY(QString path READ path NOTIFY pathChanged)
42+
43+ /// target item for the screenshot taking.
3444 Q_PROPERTY(QQuickItem *target READ target WRITE setTarget NOTIFY targetChanged)
3545
3646public:
@@ -44,13 +54,18 @@ public:
4454
4555 QString path() const;
4656
57+ /// Starts taking a screenshot. Emits screenshotTaken when ready.
4758 Q_INVOKABLE void take();
59+
60+ /// Removes the existing screenshot
4861 Q_INVOKABLE void removeScreenshot();
4962
5063Q_SIGNALS:
5164 void appdIdChanged();
5265 void targetChanged();
5366 void pathChanged();
67+
68+ /// Signals screenshot taking has finished.
5469 void screenshotTaken();
5570
5671private Q_SLOTS: