Merge branch 'Sankore-1.40' of github.com:Sankore/Sankore-3.1 into Sankore-1.40

preferencesAboutTextFull
Claudio Valerio 13 years ago
commit dc7567a4f4
  1. 2
      src/adaptors/UBCFFSubsetAdaptor.cpp
  2. 4
      src/board/UBBoardController.cpp
  3. 2
      src/board/UBBoardPaletteManager.cpp
  4. 4
      src/board/UBLibraryController.cpp
  5. 2
      src/core/UBDocumentManager.cpp
  6. 4
      src/domain/UBGraphicsScene.cpp
  7. 6
      src/domain/UBGraphicsScene.h

@ -738,7 +738,7 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgImage(const QDomElement &ele
} }
} }
UBGraphicsPixmapItem *pixItem = mCurrentScene->addPixmap(pix); UBGraphicsPixmapItem *pixItem = mCurrentScene->addPixmap(pix, NULL);
QTransform transform; QTransform transform;
QString textTransform = element.attribute(aTransform); QString textTransform = element.attribute(aTransform);

@ -816,7 +816,7 @@ void UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QString
img.loadFromData(pData); img.loadFromData(pData);
QPixmap pix = QPixmap::fromImage(img); QPixmap pix = QPixmap::fromImage(img);
UBGraphicsPixmapItem* pixItem = mActiveScene->addPixmap(pix, pPos, 1.); UBGraphicsPixmapItem* pixItem = mActiveScene->addPixmap(pix, NULL, pPos, 1.);
pixItem->setSourceUrl(sourceUrl); pixItem->setSourceUrl(sourceUrl);
if (isBackground) if (isBackground)
@ -1986,7 +1986,7 @@ void UBBoardController::processMimeData(const QMimeData* pMimeData, const QPoint
// validate that the image is really an image, webkit does not fill properly the image mime data // validate that the image is really an image, webkit does not fill properly the image mime data
if (pix.width() != 0 && pix.height() != 0) if (pix.width() != 0 && pix.height() != 0)
{ {
mActiveScene->addPixmap(pix, pPos, 1.); mActiveScene->addPixmap(pix, NULL, pPos, 1.);
return; return;
} }
} }

@ -793,7 +793,7 @@ void UBBoardPaletteManager::addItemToCurrentPage()
UBApplication::boardController->downloadURL(mItemUrl); UBApplication::boardController->downloadURL(mItemUrl);
else else
{ {
UBGraphicsPixmapItem* item = UBApplication::boardController->activeScene()->addPixmap(mPixmap, mPos, mScaleFactor); UBGraphicsPixmapItem* item = UBApplication::boardController->activeScene()->addPixmap(mPixmap, NULL, mPos, mScaleFactor);
item->setSourceUrl(mItemUrl); item->setSourceUrl(mItemUrl);
item->setSelected(true); item->setSelected(true);

@ -505,7 +505,7 @@ void UBLibraryController::setItemAsBackground(UBLibElement* image)
} }
else{ else{
QPixmap pix(image->path().toLocalFile()); QPixmap pix(image->path().toLocalFile());
UBGraphicsPixmapItem* boardItem = activeScene()->addPixmap(pix, QPointF(0, 0)); UBGraphicsPixmapItem* boardItem = activeScene()->addPixmap(pix, activeScene()->backgroundObject(), QPointF(0, 0));
activeScene()->setAsBackgroundObject(boardItem, true); activeScene()->setAsBackgroundObject(boardItem, true);
} }
} }
@ -679,7 +679,7 @@ void UBLibraryController::addImagesToCurrentPage(const QList<QUrl>& images)
itemInScene = activeScene()->addSvg(url, pos); itemInScene = activeScene()->addSvg(url, pos);
} else { } else {
itemInScene = activeScene()->addPixmap(QPixmap( itemInScene = activeScene()->addPixmap(QPixmap(
url.toLocalFile()), pos); url.toLocalFile()), NULL, pos);
} }
} }

@ -263,7 +263,7 @@ int UBDocumentManager::addImageAsPageToDocument(const QStringList& filenames, UB
} }
else else
{ {
gi = scene->addPixmap(pix, QPointF(0, 0)); gi = scene->addPixmap(pix, NULL, QPointF(0, 0));
} }
} }

@ -1044,7 +1044,7 @@ void UBGraphicsScene::clearAnnotations()
} }
UBGraphicsPixmapItem* UBGraphicsScene::addPixmap(const QPixmap& pPixmap, const QPointF& pPos, qreal pScaleFactor, bool pUseAnimation) UBGraphicsPixmapItem* UBGraphicsScene::addPixmap(const QPixmap& pPixmap, QGraphicsItem* replaceFor, const QPointF& pPos, qreal pScaleFactor, bool pUseAnimation)
{ {
UBGraphicsPixmapItem* pixmapItem = new UBGraphicsPixmapItem(); UBGraphicsPixmapItem* pixmapItem = new UBGraphicsPixmapItem();
@ -1061,7 +1061,7 @@ UBGraphicsPixmapItem* UBGraphicsScene::addPixmap(const QPixmap& pPixmap, const Q
addItem(pixmapItem); addItem(pixmapItem);
if (enableUndoRedoStack) { //should be deleted after scene own undo stack implemented if (enableUndoRedoStack) { //should be deleted after scene own undo stack implemented
UBGraphicsItemUndoCommand* uc = new UBGraphicsItemUndoCommand(this, 0, pixmapItem); UBGraphicsItemUndoCommand* uc = new UBGraphicsItemUndoCommand(this, replaceFor, pixmapItem);
UBApplication::undoStack->push(uc); UBApplication::undoStack->push(uc);
} }

@ -279,7 +279,11 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
void deselectAllItems(); void deselectAllItems();
UBGraphicsPixmapItem* addPixmap(const QPixmap& pPixmap, const QPointF& pPos = QPointF(0,0), qreal scaleFactor = 1.0, bool pUseAnimation = false); UBGraphicsPixmapItem* addPixmap(const QPixmap& pPixmap,
QGraphicsItem* replaceFor,
const QPointF& pPos = QPointF(0,0),
qreal scaleFactor = 1.0,
bool pUseAnimation = false);
void textUndoCommandAdded(UBGraphicsTextItem *textItem); void textUndoCommandAdded(UBGraphicsTextItem *textItem);

Loading…
Cancel
Save