Changeset View
Changeset View
Standalone View
Standalone View
src/global.h
Show All 39 Lines | 27 | namespace Dolphin { | |||
---|---|---|---|---|---|
40 | 40 | | |||
41 | /** | 41 | /** | ||
42 | * Opens a new Dolphin window | 42 | * Opens a new Dolphin window | ||
43 | */ | 43 | */ | ||
44 | void openNewWindow(const QList<QUrl> &urls = {}, QWidget *window = nullptr, const OpenNewWindowFlags &flags = OpenNewWindowFlag::None); | 44 | void openNewWindow(const QList<QUrl> &urls = {}, QWidget *window = nullptr, const OpenNewWindowFlags &flags = OpenNewWindowFlag::None); | ||
45 | 45 | | |||
46 | /** | 46 | /** | ||
47 | * Attaches URLs to an existing Dolphin instance if possible. | 47 | * Attaches URLs to an existing Dolphin instance if possible. | ||
48 | * Returns true if URLs were successfully attached | 48 | * If @p preferredService is a valid dbus service, it will be tried first. | ||
49 | * @p preferredService needs to support the org.kde.dolphin.MainWindow dbus interface with the /dolphin/Dolphin_1 path. | ||||
50 | * Returns true if the URLs were successfully attached. | ||||
49 | */ | 51 | */ | ||
50 | bool attachToExistingInstance(const QList<QUrl>& inputUrls, bool openFiles, bool splitView, const QString& preferredService = QString()); | 52 | bool attachToExistingInstance(const QList<QUrl>& inputUrls, bool openFiles, bool splitView, const QString& preferredService = QString()); | ||
51 | 53 | | |||
52 | /** | 54 | /** | ||
53 | * TODO: Move this somewhere global to all KDE apps, not just Dolphin | 55 | * TODO: Move this somewhere global to all KDE apps, not just Dolphin | ||
54 | */ | 56 | */ | ||
55 | const int VERTICAL_SPACER_HEIGHT = 18; | 57 | const int VERTICAL_SPACER_HEIGHT = 18; | ||
56 | const int LAYOUT_SPACING_SMALL = 2; | 58 | const int LAYOUT_SPACING_SMALL = 2; | ||
57 | } | 59 | } | ||
58 | 60 | | |||
59 | #endif //GLOBAL_H | 61 | #endif //GLOBAL_H |