Changeset View
Changeset View
Standalone View
Standalone View
src/screenchooserdialog.h
- This file was copied from src/desktopportal.cpp.
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | * Copyright © 2016 Red Hat, Inc | 2 | * Copyright © 2018 Red Hat, Inc | ||
3 | * | 3 | * | ||
4 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU Lesser General Public | 5 | * modify it under the terms of the GNU Lesser General Public | ||
6 | * License as published by the Free Software Foundation; either | 6 | * License as published by the Free Software Foundation; either | ||
7 | * version 2 of the License, or (at your option) any later version. | 7 | * version 2 of the License, or (at your option) any later version. | ||
8 | * | 8 | * | ||
9 | * This library is distributed in the hope that it will be useful, | 9 | * This library is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | * Lesser General Public License for more details. | 12 | * Lesser General Public License for more details. | ||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU Lesser General Public | 14 | * You should have received a copy of the GNU Lesser General Public | ||
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 "desktopportal.h" | 21 | #ifndef XDG_DESKTOP_PORTAL_KDE_SCREENCHOOSER_DIALOG_H | ||
22 | #define XDG_DESKTOP_PORTAL_KDE_SCREENCHOOSER_DIALOG_H | ||||
22 | 23 | | |||
24 | #include <QAbstractListModel> | ||||
23 | #include <QDialog> | 25 | #include <QDialog> | ||
24 | #include <QDBusArgument> | 26 | | ||
25 | #include <QDBusMessage> | 27 | namespace Ui | ||
26 | #include <QDBusConnection> | | |||
27 | #include <QLoggingCategory> | | |||
28 | | ||||
29 | Q_LOGGING_CATEGORY(XdgDesktopPortalKdeDesktopPortal, "xdg-desktop-portal-kde-desktop-portal") | | |||
30 | | ||||
31 | DesktopPortal::DesktopPortal(QObject *parent) | | |||
32 | : QObject(parent) | | |||
33 | , m_access(new AccessPortal(this)) | | |||
34 | , m_appChooser(new AppChooserPortal(this)) | | |||
35 | , m_email(new EmailPortal(this)) | | |||
36 | , m_fileChooser(new FileChooserPortal(this)) | | |||
37 | , m_inhibit(new InhibitPortal(this)) | | |||
38 | , m_notification(new NotificationPortal(this)) | | |||
39 | , m_print(new PrintPortal(this)) | | |||
40 | { | 28 | { | ||
29 | class ScreenChooserDialog; | ||||
41 | } | 30 | } | ||
42 | 31 | | |||
43 | DesktopPortal::~DesktopPortal() | 32 | class ScreenCastPortalOutput; | ||
33 | | ||||
34 | class ScreenChooserDialog : public QDialog | ||||
44 | { | 35 | { | ||
45 | } | 36 | Q_OBJECT | ||
37 | public: | ||||
38 | ScreenChooserDialog(const QMap<quint32, ScreenCastPortalOutput> &screens, bool multiple = false, QDialog *parent = nullptr, Qt::WindowFlags flags = 0); | ||||
39 | ~ScreenChooserDialog(); | ||||
40 | | ||||
41 | QList<quint32> selectedScreens() const; | ||||
42 | | ||||
43 | private: | ||||
44 | Ui::ScreenChooserDialog * m_dialog; | ||||
45 | }; | ||||
46 | | ||||
47 | #endif // XDG_DESKTOP_PORTAL_KDE_SCREENCHOOSER_DIALOG_H |