File indexing completed on 2024-05-12 04:47:03

0001 #pragma once
0002 #include <QObject>
0003 
0004 class OrgKdeStationActionsInterface;
0005 
0006 namespace AppInstance
0007 {
0008 QVector<QPair<QSharedPointer<OrgKdeStationActionsInterface>, QStringList>> appInstances(const QString& preferredService);
0009 
0010 bool attachToExistingInstance(const QList<QUrl>& inputUrls, bool splitView, const QString& preferredService = QString());
0011 
0012 bool registerService();
0013 }
0014 
0015 class Server : public QObject
0016 {
0017     Q_OBJECT
0018     Q_CLASSINFO("D-Bus Interface", "org.kde.station.Actions")
0019 
0020 public:
0021     explicit Server(QObject *parent = nullptr);
0022     void setQmlObject(QObject  *object);
0023 
0024 public Q_SLOTS:
0025     /**
0026            * Tries to raise/activate the Dolphin window.
0027            */
0028     void activateWindow();
0029 
0030     /** Stores all settings and quits Dolphin. */
0031     void quit();
0032 
0033     /**
0034              * Opens a new tab in the background showing the URL \a url.
0035              */
0036     void openTabs(const QStringList &urls, bool splitView = false);
0037     void openNewTab(const QString& url);
0038 
0039 
0040     /**
0041              * Opens a new window showing the URL \a url.
0042              */
0043     void openNewWindow(const QString &url);
0044 
0045 private:
0046     QObject* m_qmlObject = nullptr;
0047 
0048 };
0049