mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
support plugins update icon
Change-Id: I30d7e8f600a963a6fa4b898a9e5000579ab499f8
This commit is contained in:
parent
2b04611438
commit
b078a0f7a5
Notes:
Deepin Code Review
2017-03-20 16:51:41 +08:00
Verified+1: Anonymous Coward #1000004 Verified+1: <zhaofangfang@linuxdeepin.com> Code-Review+2: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Mon, 20 Mar 2017 16:51:41 +0800 Reviewed-on: https://cr.deepin.io/21546 Project: dde/dde-dock Branch: refs/heads/master
@ -80,8 +80,7 @@ void PluginsItem::setInContainer(const bool container)
|
||||
|
||||
void PluginsItem::refershIcon()
|
||||
{
|
||||
// TODO: update theme icon
|
||||
update();
|
||||
m_pluginInter->refershIcon(m_itemKey);
|
||||
}
|
||||
|
||||
void PluginsItem::mousePressEvent(QMouseEvent *e)
|
||||
|
@ -157,6 +157,14 @@ public:
|
||||
///
|
||||
virtual void positionChanged(const Dock::Position position) {Q_UNUSED(position);}
|
||||
|
||||
///
|
||||
/// \brief refershIcon
|
||||
/// refersh item icon, its triggered when system icon theme changed.
|
||||
/// \param itemKey
|
||||
/// item key
|
||||
///
|
||||
virtual void refershIcon(const QString &itemKey) { Q_UNUSED(itemKey); }
|
||||
|
||||
|
||||
protected:
|
||||
///
|
||||
|
@ -67,6 +67,13 @@ const QString TrashPlugin::itemContextMenu(const QString &itemKey)
|
||||
return m_trashWidget->contextMenu();
|
||||
}
|
||||
|
||||
void TrashPlugin::refershIcon(const QString &itemKey)
|
||||
{
|
||||
Q_UNUSED(itemKey);
|
||||
|
||||
m_trashWidget->updateIcon();
|
||||
}
|
||||
|
||||
void TrashPlugin::invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked)
|
||||
{
|
||||
Q_UNUSED(itemKey);
|
||||
|
@ -23,6 +23,7 @@ public:
|
||||
QWidget *itemPopupApplet(const QString &itemKey);
|
||||
const QString itemCommand(const QString &itemKey);
|
||||
const QString itemContextMenu(const QString &itemKey);
|
||||
void refershIcon(const QString &itemKey);
|
||||
void invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked);
|
||||
|
||||
int itemSortKey(const QString &itemKey);
|
||||
|
@ -21,6 +21,7 @@ public:
|
||||
const QString contextMenu() const;
|
||||
int trashItemCount() const;
|
||||
void invokeMenuItem(const QString &menuId, const bool checked);
|
||||
void updateIcon();
|
||||
|
||||
signals:
|
||||
void requestContextMenu() const;
|
||||
@ -33,7 +34,6 @@ protected:
|
||||
void mousePressEvent(QMouseEvent *e);
|
||||
|
||||
private slots:
|
||||
void updateIcon();
|
||||
void removeApp(const QString &appKey);
|
||||
void moveToTrash(const QUrl &url);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user