]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/global.h
GIT_SILENT Upgrade release service version to 20.04.1.
[dolphin.git] / src / global.h
index 3b6af43e9732cc9cd0ece4f5a7d69995ecb4c682..7ee564581c6b7b1ff14e71610489ec7e0d8817db 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <QList>
 #include <QUrl>
+#include <QWidget>
 
 namespace Dolphin {
     QList<QUrl> validateUris(const QStringList& uriList);
@@ -41,6 +42,20 @@ namespace Dolphin {
      * Opens a new Dolphin window
      */
     void openNewWindow(const QList<QUrl> &urls = {}, QWidget *window = nullptr, const OpenNewWindowFlags &flags = OpenNewWindowFlag::None);
+
+    /**
+     * Attaches URLs to an existing Dolphin instance if possible.
+     * If @p preferredService is a valid dbus service, it will be tried first.
+     * @p preferredService needs to support the org.kde.dolphin.MainWindow dbus interface with the /dolphin/Dolphin_1 path.
+     * Returns true if the URLs were successfully attached.
+     */
+    bool attachToExistingInstance(const QList<QUrl>& inputUrls, bool openFiles, bool splitView, const QString& preferredService = QString());
+
+    /**
+     * TODO: Move this somewhere global to all KDE apps, not just Dolphin
+     */
+    const int VERTICAL_SPACER_HEIGHT = 18;
+    const int LAYOUT_SPACING_SMALL = 2;
 }
 
 #endif //GLOBAL_H