2 * SPDX-FileCopyrightText: 2015 Ashish Bansal <bansal.ashish096@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0-or-later
14 class OrgKdeDolphinMainWindowInterface
;
17 QList
<QUrl
> validateUris(const QStringList
& uriList
);
20 * Returns the home url which is defined in General Settings
24 enum class OpenNewWindowFlag
{
28 Q_DECLARE_FLAGS(OpenNewWindowFlags
, OpenNewWindowFlag
)
31 * Opens a new Dolphin window
33 void openNewWindow(const QList
<QUrl
> &urls
= {}, QWidget
*window
= nullptr, const OpenNewWindowFlags
&flags
= OpenNewWindowFlag::None
);
36 * Attaches URLs to an existing Dolphin instance if possible.
37 * If @p preferredService is a valid dbus service, it will be tried first.
38 * @p preferredService needs to support the org.kde.dolphin.MainWindow dbus interface with the /dolphin/Dolphin_1 path.
39 * Returns true if the URLs were successfully attached.
41 bool attachToExistingInstance(const QList
<QUrl
>& inputUrls
, bool openFiles
, bool splitView
, const QString
& preferredService
= QString());
44 * Returns a QVector with all GUI-capable Dolphin instances
46 QVector
<QPair
<QSharedPointer
<OrgKdeDolphinMainWindowInterface
>, QStringList
>> dolphinGuiInstances(const QString
& preferredService
);
49 * TODO: Move this somewhere global to all KDE apps, not just Dolphin
51 const int VERTICAL_SPACER_HEIGHT
= 12;
52 const int LAYOUT_SPACING_SMALL
= 2;