Changeset View
Changeset View
Standalone View
Standalone View
src/filechooser.h
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | * Copyright © 2016 Red Hat, Inc | 2 | * Copyright © 2016-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 | #ifndef XDG_DESKTOP_PORTAL_KDE_FILECHOOSER_H | 21 | #ifndef XDG_DESKTOP_PORTAL_KDE_FILECHOOSER_H | ||
22 | #define XDG_DESKTOP_PORTAL_KDE_FILECHOOSER_H | 22 | #define XDG_DESKTOP_PORTAL_KDE_FILECHOOSER_H | ||
23 | 23 | | |||
24 | #include <QDBusObjectPath> | 24 | #include <QDBusObjectPath> | ||
25 | #include <QMetaType> | 25 | #include <QMetaType> | ||
26 | #include <QDBusAbstractAdaptor> | 26 | #include <QDBusAbstractAdaptor> | ||
27 | #include <QDialog> | ||||
28 | | ||||
29 | class KFileWidget; | ||||
30 | class QDialogButtonBox; | ||||
31 | | ||||
32 | class FileDialog : public QDialog | ||||
33 | { | ||||
34 | Q_OBJECT | ||||
35 | public: | ||||
36 | friend class FileChooserPortal; | ||||
37 | | ||||
38 | FileDialog(QDialog *parent = nullptr, Qt::WindowFlags flags = {}); | ||||
39 | ~FileDialog(); | ||||
40 | | ||||
41 | private: | ||||
42 | QDialogButtonBox *m_buttons; | ||||
43 | protected: | ||||
44 | KFileWidget *m_fileWidget; | ||||
45 | }; | ||||
27 | 46 | | |||
28 | class FileChooserPortal : public QDBusAbstractAdaptor | 47 | class FileChooserPortal : public QDBusAbstractAdaptor | ||
29 | { | 48 | { | ||
30 | Q_OBJECT | 49 | Q_OBJECT | ||
31 | Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.FileChooser") | 50 | Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.FileChooser") | ||
32 | public: | 51 | public: | ||
33 | // Keep in sync with qflatpakfiledialog from flatpak-platform-plugin | 52 | // Keep in sync with qflatpakfiledialog from flatpak-platform-plugin | ||
34 | typedef struct { | 53 | typedef struct { | ||
Show All 31 Lines |