2016-07-19 09:46:08 +08:00
|
|
|
#ifndef DISKMOUNTPLUGIN_H
|
|
|
|
#define DISKMOUNTPLUGIN_H
|
|
|
|
|
2016-08-30 15:46:08 +08:00
|
|
|
#include <QLabel>
|
|
|
|
|
2016-07-19 09:46:08 +08:00
|
|
|
#include "pluginsiteminterface.h"
|
2016-07-19 11:21:29 +08:00
|
|
|
#include "diskcontrolwidget.h"
|
|
|
|
#include "diskpluginitem.h"
|
2016-07-19 09:46:08 +08:00
|
|
|
|
|
|
|
class DiskMountPlugin : public QObject, PluginsItemInterface
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(PluginsItemInterface)
|
|
|
|
Q_PLUGIN_METADATA(IID "com.deepin.dock.PluginsItemInterface" FILE "disk-mount.json")
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit DiskMountPlugin(QObject *parent = 0);
|
|
|
|
|
|
|
|
const QString pluginName() const;
|
|
|
|
void init(PluginProxyInterface *proxyInter);
|
|
|
|
|
|
|
|
QWidget *itemWidget(const QString &itemKey);
|
2016-08-30 15:46:08 +08:00
|
|
|
QWidget *itemTipsWidget(const QString &itemKey);
|
2016-07-19 11:21:29 +08:00
|
|
|
QWidget *itemPopupApplet(const QString &itemKey);
|
2016-07-19 10:30:02 +08:00
|
|
|
|
2016-09-22 14:31:38 +08:00
|
|
|
const QString itemContextMenu(const QString &itemKey);
|
|
|
|
void invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked);
|
|
|
|
|
2016-07-19 10:30:02 +08:00
|
|
|
private:
|
2016-07-19 11:21:29 +08:00
|
|
|
void initCompoments();
|
|
|
|
|
|
|
|
void displayModeChanged(const Dock::DisplayMode mode);
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void diskCountChanged(const int count);
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool m_pluginAdded;
|
|
|
|
|
2016-08-30 15:46:08 +08:00
|
|
|
QLabel *m_tipsLabel;
|
2016-07-19 11:21:29 +08:00
|
|
|
DiskPluginItem *m_diskPluginItem;
|
|
|
|
DiskControlWidget *m_diskControlApplet;
|
2016-07-19 09:46:08 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DISKMOUNTPLUGIN_H
|