summaryrefslogtreecommitdiffstats
path: root/src/file_chooser_portal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_chooser_portal.h')
-rw-r--r--src/file_chooser_portal.h27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/file_chooser_portal.h b/src/file_chooser_portal.h
index ef7b43a..9732b8d 100644
--- a/src/file_chooser_portal.h
+++ b/src/file_chooser_portal.h
@@ -22,18 +22,12 @@
#ifndef __FILE_CHOOSER_PORTAL_H
#define __FILE_CHOOSER_PORTAL_H
-// TQt
-#include <tqdbusconnection.h>
-#include <tqdbusmessage.h>
-#include <tqdbusvariant.h>
-#include <tqdbuserror.h>
-#include <tqobject.h>
-
// TDE
#include <tdefile.h>
// Portal
#include "interfaces/filechooserInterface.h"
+#include "interface.h"
struct FileDialogOpts
{
@@ -60,44 +54,43 @@ class KFileDialog;
class TDEFileChooserPortal : public TQObject,
public org::freedesktop::impl::portal::FileChooserInterface
{
+ INTERFACE("org.freedesktop.impl.portal.FileChooser")
+
public:
TDEFileChooserPortal(TQT_DBusConnection &connection);
virtual ~TDEFileChooserPortal();
- static const TQString interface() { return "org.freedesktop.impl.portal.FileChooser"; }
-
protected:
virtual bool OpenFile(const TQT_DBusObjectPath& handle,
const TQString& app_id,
const TQString& parent_window,
const TQString& title,
- const TQMap<TQString, TQT_DBusVariant> &options,
+ const TQT_DBusVariantMap &options,
TQ_UINT32& response,
- TQMap<TQString, TQT_DBusVariant> &results,
+ TQT_DBusVariantMap &results,
TQT_DBusError& error);
virtual bool SaveFile(const TQT_DBusObjectPath& handle,
const TQString& app_id,
const TQString& parent_window,
const TQString& title,
- const TQMap<TQString, TQT_DBusVariant> &options,
+ const TQT_DBusVariantMap &options,
TQ_UINT32& response,
- TQMap<TQString, TQT_DBusVariant> &results,
+ TQT_DBusVariantMap &results,
TQT_DBusError& error);
virtual bool SaveFiles(const TQT_DBusObjectPath& handle,
const TQString& app_id,
const TQString& parent_window,
const TQString& title,
- const TQMap<TQString, TQT_DBusVariant> &options,
+ const TQT_DBusVariantMap &options,
TQ_UINT32& response,
- TQMap<TQString, TQT_DBusVariant> &results,
+ TQT_DBusVariantMap &results,
TQT_DBusError& error);
virtual void handleMethodReply(const TQT_DBusMessage& reply);
virtual bool handleSignalSend(const TQT_DBusMessage& reply);
-
private:
TQT_DBusConnection m_connection;
@@ -109,7 +102,7 @@ class TDEFileChooserPortal : public TQObject,
bool execFileDialog(FileDialogOpts options,
const TQT_DBusObjectPath& handle,
TQ_UINT32& response,
- TQMap<TQString, TQT_DBusVariant> &results,
+ TQT_DBusVariantMap &results,
TQT_DBusError& error);
};