Changeset View
Changeset View
Standalone View
Standalone View
src/screenshot.cpp
Show All 14 Lines | |||||
15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
16 | * | 16 | * | ||
17 | * Authors: | 17 | * Authors: | ||
18 | * Jan Grulich <jgrulich@redhat.com> | 18 | * Jan Grulich <jgrulich@redhat.com> | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #include "screenshot.h" | 21 | #include "screenshot.h" | ||
22 | #include "screenshotdialog.h" | 22 | #include "screenshotdialog.h" | ||
23 | #include "utils.h" | ||||
23 | 24 | | |||
24 | #include <QColorDialog> | 25 | #include <QColorDialog> | ||
25 | #include <QDateTime> | 26 | #include <QDateTime> | ||
26 | #include <QtDBus/QtDBus> | 27 | #include <QtDBus/QtDBus> | ||
27 | #include <QDBusArgument> | 28 | #include <QDBusArgument> | ||
28 | #include <QDBusReply> | 29 | #include <QDBusReply> | ||
29 | #include <QLoggingCategory> | 30 | #include <QLoggingCategory> | ||
30 | #include <QTemporaryFile> | 31 | #include <QTemporaryFile> | ||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | |||||
94 | { | 95 | { | ||
95 | qCDebug(XdgDesktopPortalKdeScreenshot) << "Screenshot called with parameters:"; | 96 | qCDebug(XdgDesktopPortalKdeScreenshot) << "Screenshot called with parameters:"; | ||
96 | qCDebug(XdgDesktopPortalKdeScreenshot) << " handle: " << handle.path(); | 97 | qCDebug(XdgDesktopPortalKdeScreenshot) << " handle: " << handle.path(); | ||
97 | qCDebug(XdgDesktopPortalKdeScreenshot) << " app_id: " << app_id; | 98 | qCDebug(XdgDesktopPortalKdeScreenshot) << " app_id: " << app_id; | ||
98 | qCDebug(XdgDesktopPortalKdeScreenshot) << " parent_window: " << parent_window; | 99 | qCDebug(XdgDesktopPortalKdeScreenshot) << " parent_window: " << parent_window; | ||
99 | qCDebug(XdgDesktopPortalKdeScreenshot) << " options: " << options; | 100 | qCDebug(XdgDesktopPortalKdeScreenshot) << " options: " << options; | ||
100 | 101 | | |||
101 | QPointer<ScreenshotDialog> screenshotDialog = new ScreenshotDialog; | 102 | QPointer<ScreenshotDialog> screenshotDialog = new ScreenshotDialog; | ||
103 | Utils::setParentWindow(screenshotDialog, parent_window); | ||||
102 | 104 | | |||
103 | const bool modal = options.value(QLatin1String("modal"), false).toBool(); | 105 | const bool modal = options.value(QLatin1String("modal"), false).toBool(); | ||
104 | screenshotDialog->setModal(modal); | 106 | screenshotDialog->setModal(modal); | ||
105 | 107 | | |||
106 | const bool interactive = options.value(QLatin1String("interactive"), false).toBool(); | 108 | const bool interactive = options.value(QLatin1String("interactive"), false).toBool(); | ||
107 | if (!interactive) { | 109 | if (!interactive) { | ||
108 | screenshotDialog->takeScreenshot(); | 110 | screenshotDialog->takeScreenshot(); | ||
109 | } | 111 | } | ||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |