Remove QCursor::handle
This used to be the Qt/Embedded's QCursor handle implementation. Change-Id: I31b8ed44ac9325defcb13d887949d9536a262be8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
parent
8d27345327
commit
94492d88a7
@ -108,10 +108,6 @@ public:
|
|||||||
inline static void setPos(const QPoint &p) { setPos(p.x(), p.y()); }
|
inline static void setPos(const QPoint &p) { setPos(p.x(), p.y()); }
|
||||||
inline static void setPos(QScreen *screen, const QPoint &p) { setPos(screen, p.x(), p.y()); }
|
inline static void setPos(QScreen *screen, const QPoint &p) { setPos(screen, p.x(), p.y()); }
|
||||||
|
|
||||||
#ifndef qdoc
|
|
||||||
int handle() const;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QCursorData *d;
|
QCursorData *d;
|
||||||
};
|
};
|
||||||
|
@ -76,7 +76,6 @@ public:
|
|||||||
QBitmap *bm, *bmm;
|
QBitmap *bm, *bmm;
|
||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
short hx, hy;
|
short hx, hy;
|
||||||
int id;
|
|
||||||
static bool initialized;
|
static bool initialized;
|
||||||
void update();
|
void update();
|
||||||
static QCursorData *setBitmap(const QBitmap &bitmap, const QBitmap &mask, int hotX, int hotY);
|
static QCursorData *setBitmap(const QBitmap &bitmap, const QBitmap &mask, int hotX, int hotY);
|
||||||
|
@ -52,14 +52,12 @@ QT_USE_NAMESPACE
|
|||||||
|
|
||||||
#ifndef QT_NO_CURSOR
|
#ifndef QT_NO_CURSOR
|
||||||
|
|
||||||
static int nextCursorId = Qt::BitmapCursor;
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
Internal QCursorData class
|
Internal QCursorData class
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
QCursorData::QCursorData(Qt::CursorShape s)
|
QCursorData::QCursorData(Qt::CursorShape s)
|
||||||
: ref(1), cshape(s), bm(0), bmm(0), hx(0), hy(0), id(s)
|
: ref(1), cshape(s), bm(0), bmm(0), hx(0), hy(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,12 +74,6 @@ QCursorData::~QCursorData()
|
|||||||
|
|
||||||
extern QCursorData *qt_cursorTable[Qt::LastCursor + 1]; // qcursor.cpp
|
extern QCursorData *qt_cursorTable[Qt::LastCursor + 1]; // qcursor.cpp
|
||||||
|
|
||||||
int QCursor::handle() const
|
|
||||||
{
|
|
||||||
return d->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QCursorData *QCursorData::setBitmap(const QBitmap &bitmap, const QBitmap &mask, int hotX, int hotY)
|
QCursorData *QCursorData::setBitmap(const QBitmap &bitmap, const QBitmap &mask, int hotX, int hotY)
|
||||||
{
|
{
|
||||||
if (!QCursorData::initialized)
|
if (!QCursorData::initialized)
|
||||||
@ -96,7 +88,6 @@ QCursorData *QCursorData::setBitmap(const QBitmap &bitmap, const QBitmap &mask,
|
|||||||
d->bm = new QBitmap(bitmap);
|
d->bm = new QBitmap(bitmap);
|
||||||
d->bmm = new QBitmap(mask);
|
d->bmm = new QBitmap(mask);
|
||||||
d->cshape = Qt::BitmapCursor;
|
d->cshape = Qt::BitmapCursor;
|
||||||
d->id = ++nextCursorId;
|
|
||||||
d->hx = hotX >= 0 ? hotX : bitmap.width() / 2;
|
d->hx = hotX >= 0 ? hotX : bitmap.width() / 2;
|
||||||
d->hy = hotY >= 0 ? hotY : bitmap.height() / 2;
|
d->hy = hotY >= 0 ? hotY : bitmap.height() / 2;
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *widget)
|
|||||||
m_bitmapCursorMap.insert(id, createBitmapCursor(cursor));
|
m_bitmapCursorMap.insert(id, createBitmapCursor(cursor));
|
||||||
c = m_bitmapCursorMap.value(id);
|
c = m_bitmapCursorMap.value(id);
|
||||||
} else {
|
} else {
|
||||||
int id = cursor->handle();
|
int id = cursor->shape();
|
||||||
if (!m_shapeCursorMap.contains(id))
|
if (!m_shapeCursorMap.contains(id))
|
||||||
m_shapeCursorMap.insert(id, createFontCursor(cursor->shape()));
|
m_shapeCursorMap.insert(id, createFontCursor(cursor->shape()));
|
||||||
c = m_shapeCursorMap.value(id);
|
c = m_shapeCursorMap.value(id);
|
||||||
|
Loading…
Reference in New Issue
Block a user