dde-dock/plugins/trash/trashplugin.h
listenerri 61197b9d3d fix: build warning
Change-Id: I57b1e5a68f699fface1ed542813791013020691e
2018-12-05 11:55:26 +08:00

69 lines
2.3 KiB
C++

/*
* Copyright (C) 2011 ~ 2018 Deepin Technology Co., Ltd.
* 2016 ~ 2018 dragondjf
*
* Author: sbw <sbw@sbw.so>
* dragondjf<dingjiangfeng@deepin.com>
* zccrs<zhangjide@deepin.com>
* Tangtong<tangtong@deepin.com>
*
* Maintainer: dragondjf<dingjiangfeng@deepin.com>
* zccrs<zhangjide@deepin.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef TRASHPLUGIN_H
#define TRASHPLUGIN_H
#include "pluginsiteminterface.h"
#include "trashwidget.h"
#include <QLabel>
#include <QSettings>
class TrashPlugin : public QObject, PluginsItemInterface
{
Q_OBJECT
Q_INTERFACES(PluginsItemInterface)
Q_PLUGIN_METADATA(IID "com.deepin.dock.PluginsItemInterface" FILE "trash.json")
public:
explicit TrashPlugin(QObject *parent = 0);
const QString pluginName() const Q_DECL_OVERRIDE;
void init(PluginProxyInterface *proxyInter) Q_DECL_OVERRIDE;
QWidget *itemWidget(const QString &itemKey) Q_DECL_OVERRIDE;
QWidget *itemTipsWidget(const QString &itemKey) Q_DECL_OVERRIDE;
QWidget *itemPopupApplet(const QString &itemKey) Q_DECL_OVERRIDE;
const QString itemCommand(const QString &itemKey) Q_DECL_OVERRIDE;
const QString itemContextMenu(const QString &itemKey) Q_DECL_OVERRIDE;
void refreshIcon(const QString &itemKey) Q_DECL_OVERRIDE;
void invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked) Q_DECL_OVERRIDE;
int itemSortKey(const QString &itemKey) Q_DECL_OVERRIDE;
void setSortKey(const QString &itemKey, const int order) Q_DECL_OVERRIDE;
void displayModeChanged(const Dock::DisplayMode displayMode) Q_DECL_OVERRIDE;
private:
void showContextMenu();
private:
TrashWidget *m_trashWidget;
QLabel *m_tipsLabel;
};
#endif // TRASHPLUGIN_H