mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
74 lines
1001 B
C++
Executable File
74 lines
1001 B
C++
Executable File
#include <QHBoxLayout>
|
|
|
|
#include "docktrayitem.h"
|
|
|
|
static DockTrayItem * fromWinId(WId winId, QWidget *parent)
|
|
{
|
|
DockTrayItem *item = new DockTrayItem(parent);
|
|
|
|
QWindow *win = QWindow::fromWinId(winId);
|
|
QWidget *child = QWidget::createWindowContainer(win, item);
|
|
|
|
QHBoxLayout *layout = new QHBoxLayout(item);
|
|
layout->addWidget(child);
|
|
item->setLayout(layout);
|
|
|
|
return item;
|
|
}
|
|
|
|
DockTrayItem::DockTrayItem(QWidget *parent)
|
|
: AbstractDockItem(parent)
|
|
{
|
|
|
|
}
|
|
|
|
DockTrayItem::~DockTrayItem()
|
|
{
|
|
|
|
}
|
|
|
|
void DockTrayItem::setTitle(const QString &)
|
|
{
|
|
|
|
}
|
|
|
|
void DockTrayItem::setIcon(const QString &, int)
|
|
{
|
|
|
|
}
|
|
|
|
void DockTrayItem::setMoveable(bool)
|
|
{
|
|
|
|
}
|
|
|
|
bool DockTrayItem::moveable()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
void DockTrayItem::setActived(bool)
|
|
{
|
|
|
|
}
|
|
|
|
bool DockTrayItem::actived()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
void DockTrayItem::setIndex(int value)
|
|
{
|
|
m_itemIndex = value;
|
|
}
|
|
|
|
int DockTrayItem::index()
|
|
{
|
|
return m_itemIndex;
|
|
}
|
|
|
|
QWidget * DockTrayItem::getContents()
|
|
{
|
|
return NULL;
|
|
}
|