allow setting the mouse offset for better drop positioning

svn path=/trunk/KDE/kdelibs/; revision=1099726
This commit is contained in:
Aaron J. Seigo 2010-03-06 01:41:46 +00:00
parent 9554b17ce8
commit f261f87e6f
2 changed files with 15 additions and 0 deletions

View File

@ -51,6 +51,16 @@ void ExtenderItemMimeData::setExtenderItem(ExtenderItem *item)
m_extenderItem = item;
}
void ExtenderItemMimeData::setPointerOffset(const QPoint &p)
{
m_offset = p;
}
QPoint ExtenderItemMimeData::pointerOffset() const
{
return m_offset;
}
ExtenderItem *ExtenderItemMimeData::extenderItem() const
{
return m_extenderItem;

View File

@ -21,6 +21,7 @@
#define EXTENDERITEMMIMEDATA_H
#include <QMimeData>
#include <QPoint>
namespace Plasma
{
@ -45,8 +46,12 @@ class ExtenderItemMimeData : public QMimeData
static QString mimeType();
void setPointerOffset(const QPoint &p);
QPoint pointerOffset() const;
private:
ExtenderItem *m_extenderItem;
QPoint m_offset;
};
} // namespace Plasma