summaryrefslogtreecommitdiffstats
path: root/src/PortalService.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/PortalService.h')
-rw-r--r--src/PortalService.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/PortalService.h b/src/PortalService.h
index fb744bb..1c7500e 100644
--- a/src/PortalService.h
+++ b/src/PortalService.h
@@ -27,6 +27,7 @@
#include <tqdbusobject.h>
#include <tqmap.h>
+#include <tqdialog.h>
#include <printInterface.h>
#include <settingsInterface.h>
@@ -47,6 +48,28 @@
#include <dbusbaseNode.h>
#include <sessionNode.h>
+// FileChooser
+#include <tdefile.h>
+struct FileDialogOpts
+{
+ TQString caption;
+ TQString okButtonText;
+ TQString startDir;
+ TQString startName;
+ TQString filters;
+ bool multiple = false;
+ bool directory = false;
+ bool savingMode = false;
+ bool modal = true;
+ WId windowId = 0;
+
+ inline KFile::Mode mode()
+ {
+ if (directory) return KFile::Directory;
+ return multiple ? KFile::Files : KFile::File;
+ }
+};
+
class PropertiesService: public org::freedesktop::DBus::PropertiesInterface
{
public:
@@ -223,6 +246,19 @@ protected:
protected:
// implement sending replies
virtual void handleMethodReply(const TQT_DBusMessage& reply);
+
+private:
+ WId parseWindowId(const TQString data);
+ TQString parseFilter(const TQT_DBusData data);
+ TQString parseFilterList(const TQT_DBusVariant filterData,
+ const TQT_DBusVariant currentFilterData);
+
+ bool execFileDialog(FileDialogOpts options,
+ const TQT_DBusObjectPath& handle,
+ TQ_UINT32& response,
+ TQMap<TQString, TQT_DBusVariant> &results,
+ TQT_DBusError& error);
+
private:
TQT_DBusConnection *m_connection;
};