File indexing completed on 2024-05-12 04:45:56
0001 #pragma once 0002 #include <QObject> 0003 0004 #if (defined Q_OS_LINUX || defined Q_OS_FREEBSD) && !defined Q_OS_ANDROID 0005 class OrgKdeBuhoActionsInterface; 0006 0007 namespace AppInstance 0008 { 0009 QVector<QPair<QSharedPointer<OrgKdeBuhoActionsInterface>, QStringList>> appInstances(const QString& preferredService); 0010 0011 bool attachToExistingInstance(bool newNote = false, const QString &content = ""); 0012 0013 bool registerService(); 0014 } 0015 #endif 0016 0017 class Server : public QObject 0018 { 0019 Q_OBJECT 0020 Q_CLASSINFO("D-Bus Interface", "org.kde.buho.Actions") 0021 0022 public: 0023 explicit Server(QObject *parent = nullptr); 0024 void setQmlObject(QObject *object); 0025 0026 public Q_SLOTS: 0027 /** 0028 * Tries to raise/activate the Dolphin window. 0029 */ 0030 void activateWindow(); 0031 0032 /** Stores all settings and quits Dolphin. */ 0033 void quit(); 0034 0035 void newNote(const QString &content = ""); 0036 0037 0038 private: 0039 QObject* m_qmlObject = nullptr; 0040 0041 }; 0042