void DJGraphicsPixmapItem::init()
{
	m_alignment	= 0;
	m_selected	= false;
	m_externalScale	= 1;
	m_internalScale	= 1;
	m_angleOfRotation	= 0;
	setTransformationMode( Qt::SmoothTransformation );
}
UBGraphicsPixmapItem::UBGraphicsPixmapItem(QGraphicsItem* parent)
    : QGraphicsPixmapItem(parent)
{
    mDelegate = new UBGraphicsItemDelegate(this, 0, true, true);
    mDelegate->init();
    setData(UBGraphicsItemData::ItemLayerType, UBItemLayerType::Object);
    setTransformationMode(Qt::SmoothTransformation);

    setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
}
ScreeniePixmapItem::ScreeniePixmapItem(ScreenieModelInterface &screenieModel, ScreenieControl &screenieControl, Reflection &reflection)
    : QGraphicsPixmapItem(),
      d(new ScreeniePixmapItemPrivate(screenieModel, screenieControl, reflection))
{
    setFlag(QGraphicsItem::ItemIsMovable, true);
    setFlag(QGraphicsItem::ItemIsSelectable, true);
    setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
    setTransformationMode(Qt::SmoothTransformation);
    // we also want to be able to change the reflection also in the fully translucent areas
    // of the reflection
    setShapeMode(QGraphicsPixmapItem::BoundingRectShape);
    updatePixmap(d->screenieModel.readImage());
    setAcceptDrops(true);
    frenchConnection();
}
UBGraphicsPixmapItem::UBGraphicsPixmapItem(QGraphicsItem* parent)
    : QGraphicsPixmapItem(parent)
{
    setDelegate(new UBGraphicsItemDelegate(this, 0, true, false, true, true));
    Delegate()->init();
    Delegate()->setFlippable(true);
    Delegate()->setRotatable(true);

    setData(UBGraphicsItemData::ItemLayerType, UBItemLayerType::Object);
    setTransformationMode(Qt::SmoothTransformation);

    setData(UBGraphicsItemData::itemLayerType, QVariant(itemLayerType::ObjectItem)); //Necessary to set if we want z value to be assigned correctly
    setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);

    setUuid(QUuid::createUuid()); //more logical solution is in creating uuid for element in element's constructor
}
Example #5
0
TupPixmapItem::TupPixmapItem(QGraphicsItem * parent, QGraphicsScene * scene)
    : QGraphicsPixmapItem(parent, scene)
{
    setTransformationMode(Qt::SmoothTransformation);
}
Example #6
0
KWQPixmapItem::KWQPixmapItem(const QPixmap &pixmap, QGraphicsItem *parentItem) : QGraphicsPixmapItem(pixmap, parentItem)
{
    setCacheMode(NoCache);
    setTransformationMode(Qt::SmoothTransformation);
}