Changeset View
Changeset View
Standalone View
Standalone View
src/global.h
Show All 14 Lines | |||||
15 | * along with this program; if not, write to the | 15 | * along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef GLOBAL_H | 20 | #ifndef GLOBAL_H | ||
21 | #define GLOBAL_H | 21 | #define GLOBAL_H | ||
22 | 22 | | |||
23 | #include "dolphinmainwindowinterface.h" | ||||
24 | | ||||
23 | #include <QList> | 25 | #include <QList> | ||
24 | #include <QUrl> | 26 | #include <QUrl> | ||
25 | #include <QWidget> | 27 | #include <QWidget> | ||
26 | 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 | /** | ||
Show All 16 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>> dolphinInstanceData(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).