/* * Copyright (C) 2022 ~ 2023 Deepin Technology Co., Ltd. * * Author: weizhixiang * * Maintainer: weizhixiang * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef DBUSADAPTORENTRY_H #define DBUSADAPTORENTRY_H #include "entry.h" #include #include #include #include #include #include #include #include #include #include #include Q_DECLARE_METATYPE(ExportWindowInfo) QDBusArgument &operator <<(QDBusArgument &argument, const ExportWindowInfo &info); const QDBusArgument &operator >>(const QDBusArgument &argument, ExportWindowInfo &info); QDebug operator<<(QDebug deg, const ExportWindowInfo &info); /* * Adaptor class for interface org.deepin.dde.daemon.Dock1.Entry */ class DBusAdaptorEntry: public QDBusAbstractAdaptor { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.daemon.Dock1.Entry") Q_CLASSINFO("D-Bus Introspection", "" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "") public: DBusAdaptorEntry(QObject *parent); virtual ~DBusAdaptorEntry(); public: // PROPERTIES Q_PROPERTY(uint CurrentWindow READ currentWindow NOTIFY CurrentWindowChanged) uint currentWindow() const; Q_PROPERTY(QString DesktopFile READ desktopFile NOTIFY DesktopFileChanged) QString desktopFile() const; Q_PROPERTY(QString Icon READ icon NOTIFY IconChanged) QString icon() const; Q_PROPERTY(QString Id READ id) QString id() const; Q_PROPERTY(bool IsActive READ isActive NOTIFY IsActiveChanged) bool isActive() const; Q_PROPERTY(bool IsDocked READ isDocked NOTIFY IsDockedChanged) bool isDocked() const; Q_PROPERTY(QString Menu READ menu NOTIFY MenuChanged) QString menu() const; Q_PROPERTY(QString Name READ name NOTIFY NameChanged) QString name() const; //Q_PROPERTY(QString WindowInfos READ windowInfos) //QList windowInfos(); Entry *parent() const; public Q_SLOTS: // METHODS void Activate(uint timestamp); void Check(); void ForceQuit(); QList GetAllowedCloseWindows(); void HandleDragDrop(uint timestamp, const QStringList &files); void HandleMenuItem(uint timestamp, const QString &id); void NewInstance(uint timestamp); void PresentWindows(); void RequestDock(); void RequestUndock(); Q_SIGNALS: // SIGNALS void IsActiveChanged(bool value); void IsDockedChanged(bool value); void MenuChanged(QString value); void IconChanged(QString value); void NameChanged(QString value); void DesktopFileChanged(QString value); void CurrentWindowChanged(uint32_t value); }; #endif