QmlDesigner.itemLibrary: disable animation and preview.

This feature is not polished enough.
Also since we use the complete canvas it does not make much sense.
So I disable it until we have time to polish it or decide to remove it
completely.
This commit is contained in:
Thomas Hartmann
2011-05-09 14:36:11 +02:00
parent 908d73f0d0
commit 32b93204d3
2 changed files with 6 additions and 6 deletions

View File

@@ -159,7 +159,7 @@ void CustomDragAndDropIcon::enter()
{ {
connect(&m_timeLine, SIGNAL( frameChanged (int)), this, SLOT(animateDrag(int))); connect(&m_timeLine, SIGNAL( frameChanged (int)), this, SLOT(animateDrag(int)));
m_timeLine.setFrameRange(0, 10); m_timeLine.setFrameRange(0, 10);
m_timeLine.setDuration(150); m_timeLine.setDuration(10);
m_timeLine.setLoopCount(1); m_timeLine.setLoopCount(1);
m_timeLine.setCurveShape(QTimeLine::EaseInCurve); m_timeLine.setCurveShape(QTimeLine::EaseInCurve);
m_timeLine.start(); m_timeLine.start();

View File

@@ -530,13 +530,13 @@ int ItemLibraryModel::getHeight(const ItemLibraryEntry &itemLibraryEntry)
QPixmap ItemLibraryModel::createDragPixmap(int width, int height) QPixmap ItemLibraryModel::createDragPixmap(int width, int height)
{ {
QImage dragImage(width, height, QImage::Format_RGB32); // TODO: draw item drag icon QImage dragImage(10, 10, QImage::Format_ARGB32); // TODO: draw item drag icon
dragImage.fill(0xffffffff); dragImage.fill(0x00ffffff); //### todo for now we disable the preview image
QPainter p(&dragImage); QPainter p(&dragImage);
QPen pen(Qt::gray); QPen pen(Qt::gray);
pen.setWidth(2); // pen.setWidth(2);
p.setPen(pen); // p.setPen(pen);
p.drawRect(1, 1, dragImage.width() - 2, dragImage.height() - 2); // p.drawRect(1, 1, dragImage.width() - 2, dragImage.height() - 2);
return QPixmap::fromImage(dragImage); return QPixmap::fromImage(dragImage);
} }