mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-05-30 22:01:41 +00:00

1. taskmanager used to identify which entry should map to window in x11 environmrnt, listen to xevent in anohter thread, and handle those event when window create, destory, changed. use some way to identify which entry(desktopfile) should mapped to changed window. in wayland, connected plsamawindow signal(window created destoried. 2. use taskmanager instead of dbus in old dock code log: as title
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
|
|
//
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#ifndef APPINFO_H
|
|
#define APPINFO_H
|
|
|
|
#include "desktopinfo.h"
|
|
|
|
#include <QVector>
|
|
|
|
// 应用信息类
|
|
class AppInfo
|
|
{
|
|
public:
|
|
explicit AppInfo(DesktopInfo &info);
|
|
explicit AppInfo(const QString &_fileName);
|
|
|
|
void init(DesktopInfo &info);
|
|
void setIdentifyMethod(QString method) {m_identifyMethod = method;}
|
|
|
|
bool isValidApp() {return m_isValid;}
|
|
bool isInstalled() {return m_installed;}
|
|
|
|
|
|
QString getId() {return m_id;}
|
|
QString getIcon() {return m_icon;}
|
|
QString getName() {return m_name;}
|
|
QString getInnerId() {return m_innerId;}
|
|
QString getFileName() {return m_fileName;}
|
|
QString getIdentifyMethod() {return m_identifyMethod;}
|
|
|
|
QVector<DesktopAction> getActions() {return m_actions;}
|
|
|
|
private:
|
|
QString genInnerIdWithDesktopInfo(DesktopInfo &info);
|
|
|
|
private:
|
|
|
|
bool m_installed;
|
|
bool m_isValid;
|
|
|
|
QString m_id;
|
|
QString m_name;
|
|
QString m_icon;
|
|
QString m_innerId;
|
|
QString m_fileName;
|
|
QString m_identifyMethod;
|
|
QVector<DesktopAction> m_actions;
|
|
|
|
};
|
|
|
|
#endif // APPINFO_H
|