Пример #1
0
UBItem* UBGraphicsRuler::deepCopy() const
{
    UBGraphicsRuler* copy = new UBGraphicsRuler();

    copyItemParameters(copy);

    // TODO UB 4.7 ... complete all members ?

    return copy;
}
Пример #2
0
UBItem* UBGraphicsCache::deepCopy() const
{
    UBGraphicsCache* copy = new UBGraphicsCache(mScene);

    copyItemParameters(copy);

    // TODO UB 4.7 ... complete all members ?

    return copy;
}
Пример #3
0
UBItem* UBGraphicsTriangle::deepCopy(void) const
{
    UBGraphicsTriangle* copy = new UBGraphicsTriangle();

    copyItemParameters(copy);

    // TODO UB 4.7 ... complete all members ?

    return copy;

}
Пример #4
0
UBItem* UBGraphicsMediaItem::deepCopy() const
{
    QUrl url = this->mediaFileUrl();
    UBGraphicsMediaItem *copy = new UBGraphicsMediaItem(url, parentItem());

    copy->setUuid(QUuid::createUuid()); // this is OK for now as long as Widgets are imutable

    copyItemParameters(copy);

    return copy;
}
Пример #5
0
UBItem* UBGraphicsPixmapItem::deepCopy() const
{
   UBGraphicsPixmapItem* copy = new UBGraphicsPixmapItem();

   copy->setUuid(this->uuid()); // this is OK for now as long as Widgets are imutable

   copyItemParameters(copy);

   // TODO UB 4.7 ... complete all members ?

   return copy;
}
UBGraphicsGroupContainerItem *UBGraphicsGroupContainerItem::deepCopy() const
{

    UBGraphicsGroupContainerItem *copy = new UBGraphicsGroupContainerItem(parentItem());

    copy->setUuid(this->uuid()); // this is OK for now as long as Widgets are imutable

    copyItemParameters(copy);

//    copy->resize(this->size());

    return copy;
}