dde-dock/plugins/network/item/wirelessitem.h
石博文 5dad2f11d0 disable mouse right button
Change-Id: Ibefe78367ec01054c20e36123cba8f518e7eb77e
2016-08-15 09:26:45 +08:00

42 lines
852 B
C++

#ifndef WIRELESSITEM_H
#define WIRELESSITEM_H
#include "constants.h"
#include "deviceitem.h"
#include "applet/wirelessapplet.h"
#include <QHash>
class WirelessItem : public DeviceItem
{
Q_OBJECT
public:
explicit WirelessItem(const QUuid &uuid);
NetworkDevice::NetworkType type() const;
NetworkDevice::NetworkState state() const;
QWidget *itemApplet();
protected:
void paintEvent(QPaintEvent *e);
void resizeEvent(QResizeEvent *e);
void mousePressEvent(QMouseEvent *e);
private:
const QPixmap iconPix(const Dock::DisplayMode displayMode, const int size);
const QPixmap backgroundPix(const int size);
const QPixmap cachedPix(const QString &key, const int size);
private slots:
void init();
private:
QHash<QString, QPixmap> m_icons;
WirelessApplet *m_applet;
};
#endif // WIRELESSITEM_H