├── .git-blame-ignore-revs
├── Messages.sh
├── data
├── org.freedesktop.impl.portal.desktop.kde.cmake.in
├── plasma-xdg-desktop-portal-kde.service.in
├── org.kde.KIOFuse.VFS.xml
├── org.freedesktop.portal.Documents.xml
├── CMakeLists.txt
├── kde.portal
├── org.freedesktop.Application.xml
├── org.freedesktop.impl.portal.desktop.kde.desktop.in
└── org.freedesktop.Accounts.User.xml
├── src
├── region-select
│ ├── FloatingBackground.qml
│ ├── FloatingTextBox.qml
│ └── SelectionEditor.h
├── kirigami-filepicker
│ ├── declarative
│ │ ├── filepicker.qrc
│ │ ├── fileplacesmodel.h
│ │ ├── dirmodelutils.h
│ │ ├── CreateDirectorySheet.qml
│ │ ├── fileplacesmodel.cpp
│ │ ├── dirmodelutils.cpp
│ │ ├── PlacesGlobalDrawer.qml
│ │ ├── FilePickerWindow.qml
│ │ ├── dirmodel.h
│ │ ├── filechooserqmlcallback.h
│ │ └── filechooserqmlcallback.cpp
│ ├── CMakeLists.txt
│ └── api
│ │ └── mobilefiledialog.h
├── ScreenChooserDialogTemplate.qml
├── xdgshortcut.h
├── inputcapturebarrier.h
├── inputcapturedialog.h
├── inputcapturedialog.cpp
├── portalicon.h
├── restoredata.h
├── portalicon.cpp
├── notificationinhibition.h
├── utils.h
├── org.kde.KWin.TabletModeManager.xml
├── dynamiclauncherdialog.h
├── quickdialog.h
├── InputCaptureDialog.qml
├── userinfodialog.h
├── dynamiclauncherdialog.cpp
├── email.h
├── notification.h
├── accessdialog.h
├── account.h
├── org.kde.KWin.VirtualKeyboard.xml
├── screenshotdialog.h
├── usb.h
├── access.h
├── wallpaper.h
├── screenchooserdialog.h
├── RemoteDesktopDialog.qml
├── remotedesktopdialog.h
├── restoredata.cpp
├── dynamiclauncher.h
├── screenshot.h
├── dbushelpers.cpp
├── request.h
├── desktopportal.h
├── clipboard.h
├── appchooser.h
├── settings.h
├── session.cpp
├── quickdialog.cpp
├── desktopportal.cpp
├── background.h
├── WallpaperDialog.qml
├── session.h
├── accessdialog.cpp
├── org.freedesktop.impl.portal.Session.xml
├── inhibit.h
├── screencasting.h
├── UserInfoDialog.qml
├── account.cpp
├── utils.cpp
├── request.cpp
├── email.cpp
├── inputcapturebarrier.cpp
├── AccessDialog.qml
├── xdg-desktop-portal-kde.cpp
├── print.h
├── notificationinhibition.cpp
├── ScreenshotDialog.qml
├── PipeWireLayout.qml
├── dbushelpers.h
├── xdgshortcut.cpp
├── waylandintegration.h
├── outputsmodel.h
├── ScreenChooserDialog.qml
├── access.cpp
├── filechooser.h
├── userinfodialog.cpp
├── waylandintegration_p.h
├── remotedesktopdialog.cpp
├── DynamicLauncherDialog.qml
├── globalshortcuts.h
├── UsbDialog.qml
├── usb.cpp
├── PipeWireDelegate.qml
├── wallpaper.cpp
├── screencast.h
├── remotedesktop.h
└── inputcapture.h
├── .gitlab-ci.yml
├── .gitignore
├── README.md
├── autotests
├── CMakeLists.txt
├── xdgshortcuttest.cpp
└── colorschemetest.py
├── LICENSES
├── LicenseRef-KDE-Accepted-LGPL.txt
├── MIT.txt
└── BSD-2-Clause.txt
├── cmake
└── FindKIOFuse.cmake
├── TODO
├── .kde-ci.yml
└── CMakeLists.txt
/.git-blame-ignore-revs:
--------------------------------------------------------------------------------
1 | # clang-format
2 | 79184c06c27a417e269dbe4ab82add8edf24a5d8
3 | 9fec0c4b5f0b1b36ceab211a3b2d27fd4a2114f9
4 | 369328311ec82f9c4cca5a6ca67cee2ecc5cdca8
5 |
--------------------------------------------------------------------------------
/Messages.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 | $EXTRACTRC `find . -name "*.ui" -o -name "*.rc"` >> rc.cpp
3 | $XGETTEXT `find . -name "*.cpp" -o -name "*.qml"` -o $podir/xdg-desktop-portal-kde.pot
4 | rm -f rc.cpp
5 |
--------------------------------------------------------------------------------
/data/org.freedesktop.impl.portal.desktop.kde.cmake.in:
--------------------------------------------------------------------------------
1 | [D-BUS Service]
2 | Name=org.freedesktop.impl.portal.desktop.kde
3 | Exec=@CMAKE_INSTALL_FULL_LIBEXECDIR@/xdg-desktop-portal-kde
4 | SystemdService=plasma-xdg-desktop-portal-kde.service
5 |
--------------------------------------------------------------------------------
/src/region-select/FloatingBackground.qml:
--------------------------------------------------------------------------------
1 | import QtQuick
2 | import org.kde.kirigami as Kirigami
3 |
4 | Kirigami.ShadowedRectangle {
5 | radius: Kirigami.Units.mediumSpacing / 2
6 | shadow.color: Qt.rgba(0,0,0,0.2)
7 | shadow.size: 9
8 | shadow.yOffset: 2
9 | }
10 |
--------------------------------------------------------------------------------
/src/kirigami-filepicker/declarative/filepicker.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | PlacesGlobalDrawer.qml
4 | FilePickerWindow.qml
5 | FilePicker.qml
6 | CreateDirectorySheet.qml
7 |
8 |
9 |
--------------------------------------------------------------------------------
/data/plasma-xdg-desktop-portal-kde.service.in:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Xdg Desktop Portal For KDE
3 | PartOf=graphical-session.target
4 | After=plasma-core.target
5 |
6 | [Service]
7 | ExecStart=@CMAKE_INSTALL_FULL_LIBEXECDIR@/xdg-desktop-portal-kde
8 | BusName=org.freedesktop.impl.portal.desktop.kde
9 | Slice=session.slice
10 | # Auto restart is off as we are DBus activated
11 | Restart=no
12 |
--------------------------------------------------------------------------------
/src/ScreenChooserDialogTemplate.qml:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: LGPL-2.0-or-later
2 | // SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez
3 | // SPDX-FileCopyrightText: 2025 Harald Sitter
4 |
5 | pragma ComponentBehavior: Bound
6 |
7 | import QtQuick
8 |
9 | PortalDialog {
10 | property bool multiple: false
11 |
12 | signal clearSelection()
13 | }
14 |
--------------------------------------------------------------------------------
/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | # SPDX-FileCopyrightText: None
2 | # SPDX-License-Identifier: CC0-1.0
3 |
4 | include:
5 | - project: sysadmin/ci-utilities
6 | file:
7 | - /gitlab-templates/xml-lint.yml
8 | - /gitlab-templates/yaml-lint.yml
9 | - /gitlab-templates/qml-lint.yml
10 | - /gitlab-templates/linux-qt6.yml
11 | - /gitlab-templates/freebsd-qt6.yml
12 | - /gitlab-templates/linux-qt6-next.yml
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore the following files
2 | *~
3 | *.[oa]
4 | *.diff
5 | *.kate-swp
6 | *.kdev4
7 | .kdev_include_paths
8 | *.kdevelop.pcs
9 | *.moc
10 | *.moc.cpp
11 | *.orig
12 | *.user
13 | .*.swp
14 | .swp.*
15 | Doxyfile
16 | Makefile
17 | avail
18 | random_seed
19 | /build*/
20 | CMakeLists.txt.user*
21 | *.unc-backup*
22 | .clang-format
23 | /build*/
24 | /compile_commands.json
25 | .clangd
26 | .idea
27 | /cmake-build*
28 | .cache
29 |
--------------------------------------------------------------------------------
/src/kirigami-filepicker/declarative/fileplacesmodel.h:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2020 Linus Jahn
2 | //
3 | // SPDX-License-Identifier: LGPL-2.0-or-later
4 |
5 | #pragma once
6 |
7 | #include
8 |
9 | class FilePlacesModel : public KFilePlacesModel
10 | {
11 | Q_OBJECT
12 |
13 | public:
14 | FilePlacesModel(QObject *parent = nullptr);
15 |
16 | QHash roleNames() const override;
17 | };
18 |
--------------------------------------------------------------------------------
/src/xdgshortcut.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2022 Aleix Pol i Gonzalez
3 | *
4 | * SPDX-License-Identifier: LGPL-2.0-or-later
5 | */
6 |
7 | #pragma once
8 |
9 | #include
10 | #include
11 | #include
12 |
13 | /**
14 | * Specifies a shortcut as defined in the xdg-specs:
15 | *
16 | * https://gitlab.freedesktop.org/xdg/xdg-specs/-/tree/master/shortcuts
17 | */
18 |
19 | namespace XdgShortcut
20 | {
21 | std::optional parse(const QString &shortcutString);
22 | }
23 |
--------------------------------------------------------------------------------
/src/inputcapturebarrier.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
3 | SPDX-FileCopyrightText: 2024 David Redondo
4 | */
5 |
6 | #pragma once
7 |
8 | #include
9 | #include
10 | #include
11 |
12 | #include
13 |
14 | enum class BarrierFailureReason {
15 | Diagonal,
16 | NotOnEdge,
17 | BetweenScreensOrDoesNotFill,
18 | };
19 |
20 | std::variant> checkAndMakeBarrier(int x1, int y1, int x2, int y2, const QList &screenGeometries);
21 |
--------------------------------------------------------------------------------
/src/inputcapturedialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
3 | SPDX-FileCopyrightText: 2024 David Redondo
4 | */
5 |
6 | #ifndef XDG_DESKTOP_PORTAL_KDE_INPUTCAPTURE_DIALOG_H
7 | #define XDG_DESKTOP_PORTAL_KDE_INPUTCAPTURE_DIALOG_H
8 |
9 | #include "inputcapture.h"
10 | #include "quickdialog.h"
11 |
12 | class InputCaptureDialog : public QuickDialog
13 | {
14 | Q_OBJECT
15 | public:
16 | InputCaptureDialog(const QString &appId, InputCapturePortal::Capabilities capabilties, QObject *parent = nullptr);
17 | };
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/inputcapturedialog.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
3 | SPDX-FileCopyrightText: 2024 David Redondo
4 | */
5 |
6 | #include "inputcapturedialog.h"
7 |
8 | #include "utils.h"
9 |
10 | using namespace Qt::StringLiterals;
11 |
12 | InputCaptureDialog::InputCaptureDialog(const QString &appId, InputCapturePortal::Capabilities capabilties, QObject *parent)
13 | : QuickDialog(parent)
14 | {
15 | create(u"InputCaptureDialog"_s, {{u"app"_s, Utils::applicationName(appId)}});
16 | }
17 |
18 | #include "moc_inputcapturedialog.cpp"
19 |
--------------------------------------------------------------------------------
/data/org.kde.KIOFuse.VFS.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/region-select/FloatingTextBox.qml:
--------------------------------------------------------------------------------
1 | import QtQuick
2 | import org.kde.kirigami as Kirigami
3 |
4 | Kirigami.Padding {
5 | // Reusable/shared object
6 | required property FontMetrics fontMetrics
7 |
8 | padding: Kirigami.Units.mediumSpacing * 2
9 | verticalPadding: padding - fontMetrics.descent
10 |
11 | FloatingBackground {
12 | anchors.fill: parent
13 | z: -1
14 |
15 | radius: Kirigami.Units.mediumSpacing / 2 + border.width
16 |
17 | color: Qt.alpha(Kirigami.Theme.backgroundColor, 0.85)
18 | border.color: Qt.alpha(Kirigami.Theme.textColor, 0.2)
19 | border.width: 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # xdg-desktop-portal-kde
2 |
3 | A backend implementation for [xdg-desktop-portal](http://github.com/flatpak/xdg-desktop-portal)
4 | that is using Qt/KF5.
5 |
6 | ## Building xdg-desktop-portal-kde
7 |
8 | ### Dependencies:
9 | - xdg-desktop-portal (runtime dependency)
10 | - Qt 5 (build dependency)
11 | - KDE Frameworks - KCoreAddons, KI18n, KNotifications(build dependency)
12 |
13 | ### Build instructions:
14 | ```
15 | $ mkdir build && cd build
16 | $ cmake .. [your_options]
17 | $ make -j5
18 | $ make install
19 | ```
20 |
21 | ## Testing xdg-desktop-portal-kde
22 |
23 | The repository [xdg-portal-test-kde](https://invent.kde.org/libraries/xdg-portal-test-kde) contains a simple test application.
24 |
--------------------------------------------------------------------------------
/autotests/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | ecm_add_tests(
2 | xdgshortcuttest.cpp
3 |
4 | LINK_LIBRARIES Qt::Test Qt::Gui
5 | )
6 | target_sources(xdgshortcuttest PRIVATE ${CMAKE_SOURCE_DIR}/src/xdgshortcut.cpp ${CMAKE_SOURCE_DIR}/src/xdgshortcut.h)
7 | target_link_libraries(xdgshortcuttest Qt::GuiPrivate)
8 |
9 | add_test(
10 | NAME colorschemetest
11 | COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/colorschemetest.py
12 | )
13 | set_tests_properties(colorschemetest PROPERTIES ENVIRONMENT "CMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
14 |
15 | ecm_add_test(inputcapturebarriertest.cpp ${CMAKE_SOURCE_DIR}/src/inputcapturebarrier.cpp TEST_NAME inputcapturebarriertest LINK_LIBRARIES Qt::Test Qt::Gui)
16 |
--------------------------------------------------------------------------------
/data/org.freedesktop.portal.Documents.xml:
--------------------------------------------------------------------------------
1 |
4 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/portalicon.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2016 Red Hat Inc
3 | *
4 | * SPDX-License-Identifier: LGPL-2.0-or-later
5 | *
6 | * SPDX-FileCopyrightText: 2016 Jan Grulich
7 | */
8 |
9 | #pragma once
10 |
11 | #include
12 | #include
13 |
14 | struct PortalIcon {
15 | QString str;
16 | QDBusVariant data;
17 |
18 | static auto registerDBusType()
19 | {
20 | return qDBusRegisterMetaType();
21 | }
22 | };
23 |
24 | QDBusArgument &operator<<(QDBusArgument &argument, const PortalIcon &icon);
25 | const QDBusArgument &operator>>(const QDBusArgument &argument, PortalIcon &icon);
26 |
27 | Q_DECLARE_METATYPE(PortalIcon)
28 |
--------------------------------------------------------------------------------
/src/restoredata.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: LGPL-2.0-or-later
3 | *
4 | * SPDX-FileCopyrightText: 2022 Aleix Pol
5 | */
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | struct RestoreData {
12 | static uint currentRestoreDataVersion()
13 | {
14 | return 1;
15 | }
16 |
17 | QString session;
18 | quint32 version = 0;
19 | QVariantMap payload;
20 | };
21 |
22 | const QDBusArgument &operator<<(QDBusArgument &arg, const RestoreData &data);
23 | const QDBusArgument &operator>>(const QDBusArgument &arg, RestoreData &data);
24 | QDebug operator<<(QDebug dbg, const RestoreData &c);
25 |
26 | Q_DECLARE_METATYPE(RestoreData)
27 |
--------------------------------------------------------------------------------
/src/portalicon.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2016 Red Hat Inc
3 | *
4 | * SPDX-License-Identifier: LGPL-2.0-or-later
5 | *
6 | * SPDX-FileCopyrightText: 2016 Jan Grulich
7 | */
8 |
9 | #include "portalicon.h"
10 |
11 | QDBusArgument &operator<<(QDBusArgument &argument, const PortalIcon &icon)
12 | {
13 | argument.beginStructure();
14 | argument << icon.str << icon.data;
15 | argument.endStructure();
16 | return argument;
17 | }
18 |
19 | const QDBusArgument &operator>>(const QDBusArgument &argument, PortalIcon &icon)
20 | {
21 | argument.beginStructure();
22 | argument >> icon.str >> icon.data;
23 | argument.endStructure();
24 | return argument;
25 | }
26 |
--------------------------------------------------------------------------------
/src/notificationinhibition.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2020 Kai Uwe Broulik
3 | *
4 | * SPDX-License-Identifier: LGPL-2.0-or-later
5 | */
6 |
7 | #ifndef XDG_DESKTOP_PORTAL_KDE_NOTIFICATIONINHIBITION_H
8 | #define XDG_DESKTOP_PORTAL_KDE_NOTIFICATIONINHIBITION_H
9 |
10 | #include
11 |
12 | class NotificationInhibition : public QObject
13 | {
14 | Q_OBJECT
15 | public:
16 | explicit NotificationInhibition(const QString &appId, const QString &reason, QObject *parent = nullptr);
17 | ~NotificationInhibition() override;
18 |
19 | private:
20 | static void uninhibit(uint cookie);
21 | uint m_cookie = 0;
22 | };
23 |
24 | #endif // XDG_DESKTOP_PORTAL_KDE_NOTIFICATIONINHIBITION_H
25 |
--------------------------------------------------------------------------------
/src/utils.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2018 Alexander Volkov
3 | *
4 | * SPDX-License-Identifier: LGPL-2.0-or-later
5 | */
6 |
7 | #ifndef XDG_DESKTOP_PORTAL_KDE_UTILS_H
8 | #define XDG_DESKTOP_PORTAL_KDE_UTILS_H
9 |
10 | class QString;
11 | class QWidget;
12 | class QWindow;
13 |
14 | enum class DialogResult : unsigned {
15 | Accepted = 0,
16 | Rejected = 1
17 | };
18 |
19 | class Utils
20 | {
21 | public:
22 | static void setParentWindow(QWidget *w, const QString &parent_window);
23 | static void setParentWindow(QWindow *w, const QString &parent_window);
24 |
25 | static QString applicationName(const QString &appId);
26 | };
27 |
28 | #endif // XDG_DESKTOP_PORTAL_KDE_UTILS_H
29 |
--------------------------------------------------------------------------------
/LICENSES/LicenseRef-KDE-Accepted-LGPL.txt:
--------------------------------------------------------------------------------
1 | This library is free software; you can redistribute it and/or
2 | modify it under the terms of the GNU Lesser General Public
3 | License as published by the Free Software Foundation; either
4 | version 3 of the license or (at your option) any later version
5 | that is accepted by the membership of KDE e.V. (or its successor
6 | approved by the membership of KDE e.V.), which shall act as a
7 | proxy as defined in Section 6 of version 3 of the license.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
--------------------------------------------------------------------------------
/src/org.kde.KWin.TabletModeManager.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/data/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | configure_file(org.freedesktop.impl.portal.desktop.kde.desktop.in org.freedesktop.impl.portal.desktop.kde.desktop @ONLY)
2 | configure_file(org.freedesktop.impl.portal.desktop.kde.cmake.in org.freedesktop.impl.portal.desktop.kde.service @ONLY)
3 |
4 | install(FILES kde.portal DESTINATION ${KDE_INSTALL_DATADIR}/xdg-desktop-portal/portals)
5 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.impl.portal.desktop.kde.service DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR})
6 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.impl.portal.desktop.kde.desktop DESTINATION ${KDE_INSTALL_APPDIR})
7 |
8 | ecm_install_configured_files(INPUT plasma-xdg-desktop-portal-kde.service.in @ONLY
9 | DESTINATION ${KDE_INSTALL_SYSTEMDUSERUNITDIR})
10 |
--------------------------------------------------------------------------------
/src/kirigami-filepicker/declarative/dirmodelutils.h:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2019 Linus Jahn
2 | //
3 | // SPDX-License-Identifier: LGPL-2.0-or-later
4 |
5 | #pragma once
6 |
7 | #include
8 |
9 | class DirModelUtils : public QObject
10 | {
11 | Q_OBJECT
12 |
13 | public:
14 | explicit DirModelUtils(QObject *parent = nullptr);
15 |
16 | Q_INVOKABLE QStringList getUrlParts(const QUrl &url) const;
17 | Q_INVOKABLE QUrl partialUrlForIndex(QUrl url, int index) const;
18 | Q_INVOKABLE QUrl directoryOfUrl(const QString &path) const;
19 | Q_INVOKABLE QString fileNameOfUrl(const QString &path) const;
20 |
21 | Q_INVOKABLE void mkdir(const QUrl path) const;
22 |
23 | Q_SIGNALS:
24 | void homePathChanged();
25 | };
26 |
--------------------------------------------------------------------------------
/src/dynamiclauncherdialog.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
2 | // SPDX-FileCopyrightText: 2022 Harald Sitter
3 |
4 | #pragma once
5 |
6 | #include
7 |
8 | #include "quickdialog.h"
9 |
10 | class DynamicLauncherDialog : public QuickDialog
11 | {
12 | Q_OBJECT
13 | public:
14 | explicit DynamicLauncherDialog(const QString &title, const QIcon &icon, const QString &name, const QUrl &launcherURL, QObject *parent = nullptr);
15 |
16 | Q_PROPERTY(QString name MEMBER m_name NOTIFY nameChanged)
17 | Q_SIGNAL void nameChanged();
18 | QString m_name;
19 |
20 | Q_PROPERTY(QVariant icon MEMBER m_icon NOTIFY iconChanged)
21 | Q_SIGNAL void iconChanged();
22 | QVariant m_icon;
23 | };
24 |
--------------------------------------------------------------------------------
/data/kde.portal:
--------------------------------------------------------------------------------
1 | [portal]
2 | DBusName=org.freedesktop.impl.portal.desktop.kde
3 | Interfaces=org.freedesktop.impl.portal.Access;org.freedesktop.impl.portal.Account;org.freedesktop.impl.portal.AppChooser;org.freedesktop.impl.portal.Background;org.freedesktop.impl.portal.Email;org.freedesktop.impl.portal.FileChooser;org.freedesktop.impl.portal.Inhibit;org.freedesktop.impl.portal.Notification;org.freedesktop.impl.portal.Print;org.freedesktop.impl.portal.ScreenCast;org.freedesktop.impl.portal.Screenshot;org.freedesktop.impl.portal.RemoteDesktop;org.freedesktop.impl.portal.Settings;org.freedesktop.impl.portal.DynamicLauncher;org.freedesktop.impl.portal.GlobalShortcuts;org.freedesktop.impl.portal.InputCapture;org.freedesktop.impl.portal.Clipboard;org.freedesktop.impl.portal.Wallpaper;org.freedesktop.impl.portal.Usb
4 | UseIn=KDE
5 |
--------------------------------------------------------------------------------
/cmake/FindKIOFuse.cmake:
--------------------------------------------------------------------------------
1 | # SPDX-License-Identifier: BSD-2-Clause
2 | # SPDX-FileCopyrightText: 2022 Harald Sitter
3 |
4 | execute_process(
5 | COMMAND dbus-send --session --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListActivatableNames
6 | OUTPUT_VARIABLE _kiofuseOut)
7 |
8 | set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE)
9 | if("${_kiofuseOut}" MATCHES "\"org.kde.KIOFuse\"")
10 | set(${CMAKE_FIND_PACKAGE_NAME}_FOUND TRUE)
11 | endif()
12 |
13 | include(FindPackageHandleStandardArgs)
14 | find_package_handle_standard_args(${CMAKE_FIND_PACKAGE_NAME}
15 | FOUND_VAR ${CMAKE_FIND_PACKAGE_NAME}_FOUND
16 | REQUIRED_VARS ${CMAKE_FIND_PACKAGE_NAME}_FOUND
17 | REASON_FAILURE_MESSAGE "Could not find DBus service org.kde.KIOFuse in org.freedesktop.DBus.ListActivatableNames"
18 | )
19 |
--------------------------------------------------------------------------------
/data/org.freedesktop.Application.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/kirigami-filepicker/declarative/CreateDirectorySheet.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2020 Jonah Brüchert
2 | //
3 | // SPDX-License-Identifier: LGPL-2.0-or-later
4 |
5 | import QtQuick
6 | import QtQuick.Layouts
7 | import QtQuick.Controls as QQC2
8 |
9 | import org.kde.kirigami as Kirigami
10 | import org.kde.kirigamifilepicker
11 |
12 | Kirigami.PromptDialog {
13 | id: sheet
14 |
15 | property string parentPath
16 |
17 | title: i18n("Create New Folder")
18 |
19 | standardButtons: QQC2.Dialog.Ok | QQC2.Dialog.Cancel
20 |
21 | onAccepted: {
22 | DirModelUtils.mkdir(parentPath + "/" + nameField.text);
23 | sheet.close();
24 | }
25 | onRejected: {
26 | nameField.clear();
27 | sheet.close();
28 | }
29 |
30 | QQC2.TextField {
31 | id: nameField
32 | placeholderText: i18n("Folder name")
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/quickdialog.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez
3 |
4 | SPDX-License-Identifier: LGPL-2.0-or-later
5 | */
6 |
7 | #pragma once
8 |
9 | #include "utils.h"
10 |
11 | #include
12 | #include
13 |
14 | class QWindow;
15 |
16 | class QuickDialog : public QObject
17 | {
18 | Q_OBJECT
19 | public:
20 | QuickDialog(QObject *parent = nullptr);
21 | ~QuickDialog() override;
22 |
23 | QWindow *windowHandle() const
24 | {
25 | return m_theDialog;
26 | }
27 |
28 | void create(const QString &componentName, const QVariantMap &props);
29 |
30 | public Q_SLOTS:
31 | void reject();
32 | virtual void accept();
33 |
34 | Q_SIGNALS:
35 | void finished(DialogResult result);
36 | void accepted();
37 | void rejected();
38 |
39 | protected:
40 | QWindow *m_theDialog = nullptr;
41 | };
42 |
--------------------------------------------------------------------------------
/src/InputCaptureDialog.qml:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
3 | SPDX-FileCopyrightText: 2024 David Redondo
4 | */
5 |
6 |
7 | import QtQuick
8 | import QtQuick.Controls as QQC2
9 |
10 | PortalDialog {
11 |
12 | readonly property string app: ""
13 |
14 | iconName: "dialog-input-devices"
15 | title: i18nc("@title:window", "Input Capture Requested")
16 | subtitle: app === "" ? i18nc("The application is unknown", "An application requested to capture input events") : i18nc("%1 is the name of the application", "%1 requested to capture input events", app)
17 |
18 | width: contentWidth
19 | height: contentHeight
20 |
21 | standardButtons: QQC2.DialogButtonBox.Ok | QQC2.DialogButtonBox.Cancel
22 |
23 | Component.onCompleted: dialogButtonBox.standardButton(QQC2.DialogButtonBox.Ok).text = i18nc("@action:button", "Allow")
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/src/userinfodialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2020 Red Hat Inc
3 | *
4 | * SPDX-License-Identifier: LGPL-2.0-or-later
5 | *
6 | * SPDX-FileCopyrightText: 2020 Jan Grulich
7 | */
8 |
9 | #ifndef XDG_DESKTOP_PORTAL_KDE_USERINFO_DIALOG_H
10 | #define XDG_DESKTOP_PORTAL_KDE_USERINFO_DIALOG_H
11 |
12 | #include "quickdialog.h"
13 |
14 | class OrgFreedesktopAccountsUserInterface;
15 | struct UserDetails;
16 |
17 | class UserInfoDialog : public QuickDialog
18 | {
19 | Q_OBJECT
20 | public:
21 | explicit UserInfoDialog(const QString &reason, const QString &app_id, QObject *parent = nullptr);
22 | ~UserInfoDialog() override;
23 | Q_DISABLE_COPY_MOVE(UserInfoDialog)
24 |
25 | [[nodiscard]] QString id() const;
26 | [[nodiscard]] QString name() const;
27 | [[nodiscard]] QString image() const;
28 |
29 | private:
30 | std::unique_ptr m_userDetails;
31 | };
32 |
33 | #endif // XDG_DESKTOP_PORTAL_KDE_USERINFO_DIALOG_H
34 |
--------------------------------------------------------------------------------
/src/dynamiclauncherdialog.cpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
2 | // SPDX-FileCopyrightText: 2022 Harald Sitter
3 |
4 | #include "dynamiclauncherdialog.h"
5 |
6 | #include
7 |
8 | #include "dynamiclauncherdialog_debug.h"
9 |
10 | DynamicLauncherDialog::DynamicLauncherDialog(const QString &title, const QIcon &icon, const QString &name, const QUrl &launcherURL, QObject *parent)
11 | : QuickDialog(parent)
12 | , m_name(name)
13 | , m_icon(icon)
14 | {
15 | create(QStringLiteral("DynamicLauncherDialog"),
16 | {
17 | {QStringLiteral("title"), title},
18 | {QStringLiteral("launcherName"), name},
19 | {QStringLiteral("launcherIcon"), icon},
20 | {QStringLiteral("launcherURL"), launcherURL},
21 | {QStringLiteral("dialog"), QVariant::fromValue(this)},
22 | });
23 | }
24 |
25 | #include "moc_dynamiclauncherdialog.cpp"
26 |
--------------------------------------------------------------------------------
/src/email.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2017 Red Hat Inc
3 | *
4 | * SPDX-License-Identifier: LGPL-2.0-or-later
5 | *
6 | * SPDX-FileCopyrightText: 2017 Jan Grulich
7 | */
8 |
9 | #ifndef XDG_DESKTOP_PORTAL_KDE_EMAIL_H
10 | #define XDG_DESKTOP_PORTAL_KDE_EMAIL_H
11 |
12 | #include
13 | #include
14 |
15 | class QDBusMessage;
16 |
17 | class EmailPortal : public QDBusAbstractAdaptor
18 | {
19 | Q_OBJECT
20 | Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.Email")
21 | public:
22 | explicit EmailPortal(QObject *parent);
23 |
24 | public Q_SLOTS:
25 | void ComposeEmail(const QDBusObjectPath &handle,
26 | const QString &app_id,
27 | const QString &window,
28 | const QVariantMap &options,
29 | const QDBusMessage &message,
30 | uint &replyResponse,
31 | QVariantMap &replyResults);
32 | };
33 |
34 | #endif // XDG_DESKTOP_PORTAL_KDE_EMAIL_H
35 |
--------------------------------------------------------------------------------
/src/notification.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2016 Red Hat Inc
3 | *
4 | * SPDX-License-Identifier: LGPL-2.0-or-later
5 | *
6 | * SPDX-FileCopyrightText: 2016 Jan Grulich
7 | */
8 |
9 | #ifndef XDG_DESKTOP_PORTAL_KDE_NOTIFICATION_H
10 | #define XDG_DESKTOP_PORTAL_KDE_NOTIFICATION_H
11 |
12 | #include
13 | #include
14 |
15 | #include
16 |
17 | class NotificationPortal : public QDBusAbstractAdaptor
18 | {
19 | Q_OBJECT
20 | Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.Notification")
21 | public:
22 | explicit NotificationPortal(QObject *parent);
23 |
24 | public Q_SLOTS:
25 | void AddNotification(const QString &app_id, const QString &id, const QVariantMap ¬ification);
26 | void RemoveNotification(const QString &app_id, const QString &id);
27 | private Q_SLOTS:
28 | void notificationClosed();
29 |
30 | private:
31 | QHash> m_notifications;
32 | };
33 |
34 | #endif // XDG_DESKTOP_PORTAL_KDE_NOTIFICATION_H
35 |
--------------------------------------------------------------------------------
/src/accessdialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2017 Red Hat Inc
3 | *
4 | * SPDX-License-Identifier: LGPL-2.0-or-later
5 | *
6 | * SPDX-FileCopyrightText: 2017 Jan Grulich
7 | */
8 |
9 | #ifndef XDG_DESKTOP_PORTAL_KDE_ACCESS_DIALOG_H
10 | #define XDG_DESKTOP_PORTAL_KDE_ACCESS_DIALOG_H
11 |
12 | #include "dbushelpers.h"
13 | #include "quickdialog.h"
14 | #include
15 |
16 | class AccessDialog : public QuickDialog
17 | {
18 | Q_OBJECT
19 | public:
20 | explicit AccessDialog(QObject *parent = nullptr);
21 |
22 | void setAcceptLabel(const QString &label);
23 | void setBody(const QString &body);
24 | void setIcon(const QString &icon);
25 | void setRejectLabel(const QString &label);
26 | void setTitle(const QString &title);
27 | void setSubtitle(const QString &subtitle);
28 | void setChoices(const OptionList &choices);
29 |
30 | Choices selectedChoices() const;
31 |
32 | void createDialog();
33 |
34 | private:
35 | QVariantMap m_props;
36 | };
37 |
38 | #endif // XDG_DESKTOP_PORTAL_KDE_ACCESS_DIALOG_H
39 |
--------------------------------------------------------------------------------
/src/kirigami-filepicker/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(filepicker_lib_SRCS
2 | api/mobilefiledialog.cpp
3 | api/mobilefiledialog.h
4 | declarative/dirmodel.cpp
5 | declarative/dirmodel.h
6 | declarative/dirmodelutils.cpp
7 | declarative/dirmodelutils.h
8 | declarative/filechooserqmlcallback.cpp
9 | declarative/filechooserqmlcallback.h
10 | declarative/fileplacesmodel.cpp
11 | declarative/fileplacesmodel.h
12 | declarative/filepicker.qrc
13 | )
14 |
15 | ecm_qt_declare_logging_category(filepicker_lib_SRCS
16 | IDENTIFIER "KirigamiFilepicker"
17 | CATEGORY_NAME "xdp-kde-file-chooser"
18 | HEADER mobilefiledialog_debug.h)
19 |
20 | add_library(KirigamiFilepicker STATIC ${filepicker_lib_SRCS})
21 | set_property(TARGET KirigamiFilepicker PROPERTY POSITION_INDEPENDENT_CODE ON)
22 | target_include_directories(KirigamiFilepicker PRIVATE declarative)
23 | target_link_libraries(KirigamiFilepicker
24 | Qt::Quick
25 | Qt::Qml
26 | KF6::I18n
27 | KF6::KIOCore
28 | KF6::KIOFileWidgets
29 | )
30 | target_include_directories(KirigamiFilepicker PUBLIC api)
31 |
--------------------------------------------------------------------------------
/LICENSES/MIT.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/src/account.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2020 Red Hat Inc
3 | *
4 | * SPDX-License-Identifier: LGPL-2.0-or-later
5 | *
6 | * SPDX-FileCopyrightText: 2020 Jan Grulich
7 | */
8 |
9 | #ifndef XDG_DESKTOP_PORTAL_KDE_ACCOUNT_H
10 | #define XDG_DESKTOP_PORTAL_KDE_ACCOUNT_H
11 |
12 | #include
13 | #include
14 | #include
15 |
16 | class AccountPortal : public QDBusAbstractAdaptor
17 | {
18 | Q_OBJECT
19 | Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.Account")
20 | public:
21 | explicit AccountPortal(QObject *parent);
22 |
23 | public Q_SLOTS:
24 | void GetUserInformation(const QDBusObjectPath &handle, //
25 | const QString &app_id,
26 | const QString &parent_window,
27 | const QVariantMap &options,
28 | const QDBusMessage &message,
29 | uint &replyResponse,
30 | QVariantMap &replyResults);
31 | };
32 |
33 | #endif // XDG_DESKTOP_PORTAL_KDE_ACCOUNT_H
34 |
--------------------------------------------------------------------------------
/src/org.kde.KWin.VirtualKeyboard.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/kirigami-filepicker/declarative/fileplacesmodel.cpp:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2020 Linus Jahn
2 | //
3 | // SPDX-License-Identifier: LGPL-2.0-or-later
4 |
5 | #include "fileplacesmodel.h"
6 |
7 | FilePlacesModel::FilePlacesModel(QObject *parent)
8 | : KFilePlacesModel(parent)
9 | {
10 | }
11 |
12 | QHash FilePlacesModel::roleNames() const
13 | {
14 | return {
15 | {Qt::DisplayRole, QByteArrayLiteral("displayRole")},
16 | {KFilePlacesModel::UrlRole, QByteArrayLiteral("url")},
17 | {KFilePlacesModel::HiddenRole, QByteArrayLiteral("hidden")},
18 | {KFilePlacesModel::SetupNeededRole, QByteArrayLiteral("setupNeeded")},
19 | {KFilePlacesModel::FixedDeviceRole, QByteArrayLiteral("fixedDevice")},
20 | {KFilePlacesModel::CapacityBarRecommendedRole, QByteArrayLiteral("capacityBarRecommended")},
21 | {KFilePlacesModel::GroupRole, QByteArrayLiteral("group")},
22 | {KFilePlacesModel::IconNameRole, QByteArrayLiteral("iconName")},
23 | {KFilePlacesModel::GroupHiddenRole, QByteArrayLiteral("groupHidden")},
24 | };
25 | }
26 |
27 | #include "moc_fileplacesmodel.cpp"
28 |
--------------------------------------------------------------------------------
/src/screenshotdialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2018 Red Hat Inc
3 | *
4 | * SPDX-License-Identifier: LGPL-2.0-or-later
5 | *
6 | * SPDX-FileCopyrightText: 2018 Jan Grulich
7 | */
8 |
9 | #ifndef XDG_DESKTOP_PORTAL_KDE_SCREENSHOT_DIALOG_H
10 | #define XDG_DESKTOP_PORTAL_KDE_SCREENSHOT_DIALOG_H
11 |
12 | #include "quickdialog.h"
13 | #include
14 | #include
15 |
16 | class ScreenshotDialog : public QuickDialog
17 | {
18 | Q_OBJECT
19 | public:
20 | explicit ScreenshotDialog(QObject *parent = nullptr);
21 |
22 | enum Flags {
23 | Borders = 1,
24 | Cursor = 1 << 1,
25 | };
26 | Q_ENUM(Flags)
27 | enum ScreenshotType {
28 | FullScreen,
29 | CurrentScreen,
30 | ActiveWindow,
31 | };
32 | Q_ENUM(ScreenshotType)
33 |
34 | QImage image() const;
35 | void takeScreenshotNonInteractive();
36 |
37 | public Q_SLOTS:
38 | void takeScreenshotInteractive();
39 |
40 | Q_SIGNALS:
41 | void failed();
42 |
43 | private:
44 | QFuture takeScreenshot();
45 |
46 | QImage m_image;
47 | };
48 |
49 | #endif // XDG_DESKTOP_PORTAL_KDE_SCREENSHOT_DIALOG_H
50 |
--------------------------------------------------------------------------------
/src/usb.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
3 | SPDX-FileCopyrightText: 2025 David Redondo
4 | */
5 |
6 | #pragma once
7 |
8 | #include
9 | #include
10 |
11 | #include
12 |
13 | class QDBusMessage;
14 |
15 | class UsbPortal : public QDBusAbstractAdaptor
16 | {
17 | Q_OBJECT
18 | Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.Usb")
19 | Q_PROPERTY(uint version READ version CONSTANT)
20 | public:
21 | explicit UsbPortal(QObject *parent);
22 |
23 | static constexpr uint version()
24 | {
25 | return 1;
26 | }
27 | public Q_SLOTS:
28 | void AcquireDevices(const QDBusObjectPath &handle,
29 | const QString &parent_window,
30 | const QString &app_id,
31 | const QList> &devices,
32 | const QVariantMap &options,
33 | const QDBusMessage &message,
34 | uint &replyResponse,
35 | QVariantMap &replyResults);
36 | };
37 |
--------------------------------------------------------------------------------
/src/access.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2017 Red Hat Inc
3 | *
4 | * SPDX-License-Identifier: LGPL-2.0-or-later
5 | *
6 | * SPDX-FileCopyrightText: 2017 Jan Grulich
7 | */
8 |
9 | #ifndef XDG_DESKTOP_PORTAL_KDE_ACCESS_H
10 | #define XDG_DESKTOP_PORTAL_KDE_ACCESS_H
11 |
12 | #include
13 | #include
14 |
15 | class QDBusMessage;
16 |
17 | class AccessPortal : public QDBusAbstractAdaptor
18 | {
19 | Q_OBJECT
20 | Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.Access")
21 | public:
22 | explicit AccessPortal(QObject *parent);
23 |
24 | public Q_SLOTS:
25 | void AccessDialog(const QDBusObjectPath &handle,
26 | const QString &app_id,
27 | const QString &parent_window,
28 | const QString &title,
29 | const QString &subtitle,
30 | const QString &body,
31 | const QVariantMap &options,
32 | const QDBusMessage &message,
33 | uint &replyResponse,
34 | QVariantMap &replyResults);
35 | };
36 |
37 | #endif // XDG_DESKTOP_PORTAL_KDE_ACCESS_H
38 |
--------------------------------------------------------------------------------
/src/wallpaper.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
2 | // SPDX-FileCopyrightText: 2025 David Redondo
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | class QDBusMessage;
11 |
12 | namespace WallpaperLocation
13 | {
14 | Q_NAMESPACE
15 | QML_ELEMENT
16 | enum Location {
17 | Desktop,
18 | Lockscreen,
19 | Both
20 | };
21 | Q_ENUM_NS(Location)
22 | }
23 |
24 | class WallpaperPortal : public QDBusAbstractAdaptor
25 | {
26 | Q_OBJECT
27 | Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.Wallpaper")
28 | public:
29 | explicit WallpaperPortal(QObject *parent = nullptr)
30 | : QDBusAbstractAdaptor(parent)
31 | {
32 | }
33 | public Q_SLOTS:
34 | void SetWallpaperURI(const QDBusObjectPath &handle,
35 | const QString &app_id,
36 | const QString &parent_window,
37 | const QString &uri,
38 | const QVariantMap &options,
39 | const QDBusMessage &message,
40 | uint &replyResponse);
41 | };
42 |
--------------------------------------------------------------------------------
/LICENSES/BSD-2-Clause.txt:
--------------------------------------------------------------------------------
1 | Copyright (c)
2 |
3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4 |
5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6 |
7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8 |
9 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 |
--------------------------------------------------------------------------------
/src/screenchooserdialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2018 Red Hat Inc
3 | *
4 | * SPDX-License-Identifier: LGPL-2.0-or-later
5 | *
6 | * SPDX-FileCopyrightText: 2018 Jan Grulich
7 | */
8 |
9 | #ifndef XDG_DESKTOP_PORTAL_KDE_SCREENCHOOSER_DIALOG_H
10 | #define XDG_DESKTOP_PORTAL_KDE_SCREENCHOOSER_DIALOG_H
11 |
12 | #include "outputsmodel.h"
13 | #include "quickdialog.h"
14 | #include "screencast.h"
15 | #include
16 | #include
17 |
18 | namespace KWayland
19 | {
20 | namespace Client
21 | {
22 | class PlasmaWindow;
23 | }
24 | }
25 |
26 | class ScreenChooserDialog : public QuickDialog
27 | {
28 | Q_OBJECT
29 | public:
30 | ScreenChooserDialog(const QString &appName, bool multiple, ScreenCastPortal::SourceTypes types);
31 | ~ScreenChooserDialog() override;
32 |
33 | QList