Changeset View
Changeset View
Standalone View
Standalone View
src/global.h
Show All 18 Lines | |||||
19 | 19 | | |||
20 | #ifndef GLOBAL_H | 20 | #ifndef GLOBAL_H | ||
21 | #define GLOBAL_H | 21 | #define GLOBAL_H | ||
22 | 22 | | |||
23 | #include <QList> | 23 | #include <QList> | ||
24 | #include <QUrl> | 24 | #include <QUrl> | ||
25 | #include <QWidget> | 25 | #include <QWidget> | ||
26 | 26 | | |||
27 | class OrgKdeDolphinMainWindowInterface; | ||||
28 | | ||||
27 | namespace Dolphin { | 29 | namespace Dolphin { | ||
28 | QList<QUrl> validateUris(const QStringList& uriList); | 30 | QList<QUrl> validateUris(const QStringList& uriList); | ||
29 | 31 | | |||
30 | /** | 32 | /** | ||
31 | * Returns the home url which is defined in General Settings | 33 | * Returns the home url which is defined in General Settings | ||
32 | */ | 34 | */ | ||
33 | QUrl homeUrl(); | 35 | QUrl homeUrl(); | ||
34 | 36 | | |||
Show All 12 Lines | |||||
47 | * Attaches URLs to an existing Dolphin instance if possible. | 49 | * Attaches URLs to an existing Dolphin instance if possible. | ||
48 | * If @p preferredService is a valid dbus service, it will be tried first. | 50 | * 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. | 51 | * @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. | 52 | * Returns true if the URLs were successfully attached. | ||
51 | */ | 53 | */ | ||
52 | bool attachToExistingInstance(const QList<QUrl>& inputUrls, bool openFiles, bool splitView, const QString& preferredService = QString()); | 54 | bool attachToExistingInstance(const QList<QUrl>& inputUrls, bool openFiles, bool splitView, const QString& preferredService = QString()); | ||
53 | 55 | | |||
54 | /** | 56 | /** | ||
57 | * Returns a QVector with all GUI-capable Dolphin instances | ||||
feverfew: `full data` is ambiguous here. What this function does is just return all GUI capable instances… | |||||
58 | */ | ||||
59 | QVector<QPair<QSharedPointer<OrgKdeDolphinMainWindowInterface>, QStringList>> dolphinGuiInstances(const QString& preferredService); | ||||
elvisangelaccio: I'd call this function `dolphinGuiInstances`. | |||||
60 | | ||||
61 | /** | ||||
55 | * TODO: Move this somewhere global to all KDE apps, not just Dolphin | 62 | * TODO: Move this somewhere global to all KDE apps, not just Dolphin | ||
56 | */ | 63 | */ | ||
57 | const int VERTICAL_SPACER_HEIGHT = 18; | 64 | const int VERTICAL_SPACER_HEIGHT = 18; | ||
58 | const int LAYOUT_SPACING_SMALL = 2; | 65 | const int LAYOUT_SPACING_SMALL = 2; | ||
59 | } | 66 | } | ||
60 | 67 | | |||
61 | #endif //GLOBAL_H | 68 | #endif //GLOBAL_H |
full data is ambiguous here. What this function does is just return all GUI capable instances, and leaves the QStringList empty, (which is space to hold all the URL's an instance currently has open, but isn't filled by this function).