2016-06-03 16:06:11 +08:00
|
|
|
#ifndef APPITEM_H
|
|
|
|
#define APPITEM_H
|
|
|
|
|
|
|
|
#include "dockitem.h"
|
|
|
|
#include "dbus/dbusdockentry.h"
|
2016-06-06 14:57:07 +08:00
|
|
|
#include "dbus/dbusclientmanager.h"
|
2016-06-03 16:06:11 +08:00
|
|
|
|
|
|
|
class AppItem : public DockItem
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit AppItem(const QDBusObjectPath &entry, QWidget *parent = nullptr);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void paintEvent(QPaintEvent *e);
|
2016-06-06 14:28:28 +08:00
|
|
|
void mouseReleaseEvent(QMouseEvent *e);
|
|
|
|
|
2016-06-06 14:57:07 +08:00
|
|
|
void initClientManager();
|
2016-06-06 14:28:28 +08:00
|
|
|
void entryDataChanged(const QString &key, const QString &value);
|
2016-06-03 16:06:11 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
DBusDockEntry *m_itemEntry;
|
2016-06-06 14:28:28 +08:00
|
|
|
|
|
|
|
QMap<QString, QString> m_data;
|
2016-06-06 14:57:07 +08:00
|
|
|
QMap<uint, QString> m_windows;
|
|
|
|
|
|
|
|
static DBusClientManager *ClientInter;
|
|
|
|
static uint ActiveWindowId;
|
2016-06-03 16:06:11 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // APPITEM_H
|