mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
Merge branch 'dde-dock' of gitcafe.com:Hualet/dde-workspace-2015 into dde-dock
This commit is contained in:
commit
046ea770c3
39
dde-dock/abstractdockitem.h
Normal file
39
dde-dock/abstractdockitem.h
Normal file
@ -0,0 +1,39 @@
|
||||
#ifndef ABSTRACTDOCKITEM_H
|
||||
#define ABSTRACTDOCKITEM_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QFrame>
|
||||
#include <QMouseEvent>
|
||||
#include <QRectF>
|
||||
|
||||
class AbstractDockItem : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AbstractDockItem(QWidget *parent = 0);
|
||||
virtual ~AbstractDockItem() = 0;
|
||||
|
||||
virtual QWidget * getContents() = 0;
|
||||
|
||||
virtual void setTitle(const QString &title) = 0;
|
||||
virtual void setIcon(const QString &iconPath, int size = 42) = 0;
|
||||
virtual void setMoveable(bool value) = 0;
|
||||
virtual bool moveable() = 0;
|
||||
virtual void setActived(bool value) = 0;
|
||||
virtual bool actived() = 0;
|
||||
virtual void setIndex(int value) = 0;
|
||||
virtual int index() = 0;
|
||||
|
||||
protected:
|
||||
QPixmap * m_appIcon = NULL;
|
||||
|
||||
bool m_itemMoveable = true;
|
||||
bool m_itemActived = false;
|
||||
|
||||
QString m_itemTitle = "";
|
||||
QString m_itemIconPath = "";
|
||||
int m_itemIndex = 0;
|
||||
|
||||
};
|
||||
|
||||
#endif // ABSTRACTDOCKITEM_H
|
@ -39,7 +39,9 @@ HEADERS += mainwidget.h \
|
||||
Widgets/docklayout.h \
|
||||
Widgets/windowpreview.h \
|
||||
Widgets/dockitem.h \
|
||||
Widgets/screenmask.h
|
||||
Widgets/screenmask.h \
|
||||
dockplugininterface.h \
|
||||
abstractdockitem.h
|
||||
|
||||
RESOURCES += \
|
||||
images.qrc
|
||||
|
23
dde-dock/dockplugininterface.h
Normal file
23
dde-dock/dockplugininterface.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef DOCKPLUGININTERFACE_H
|
||||
#define DOCKPLUGININTERFACE_H
|
||||
|
||||
#include <QObject>
|
||||
#include "abstractdockitem.h"
|
||||
|
||||
class DockPluginInterface : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
virtual ~DockPluginInterface() {}
|
||||
virtual QList<AbstractDockItem*> items();
|
||||
};
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#define DockPluginInterface_iid "org.deepin.Dock.PluginInterface"
|
||||
|
||||
Q_DECLARE_INTERFACE(DockPluginInterface, DockPluginInterface_iid)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // DOCKPLUGININTERFACE_H
|
Loading…
x
Reference in New Issue
Block a user