|
|
@ -115,6 +115,8 @@ void UBBoardThumbnailsView::removeThumbnail(int i) |
|
|
|
|
|
|
|
|
|
|
|
UBDraggableThumbnailView* UBBoardThumbnailsView::createThumbnail(UBDocumentContainer* source, int i) |
|
|
|
UBDraggableThumbnailView* UBBoardThumbnailsView::createThumbnail(UBDocumentContainer* source, int i) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
UBApplication::showMessage(tr("Loading document scene (%1/%2)").arg(i+1).arg(source->selectedDocument()->pageCount())); |
|
|
|
|
|
|
|
|
|
|
|
UBGraphicsScene* pageScene = UBPersistenceManager::persistenceManager()->loadDocumentScene(source->selectedDocument(), i); |
|
|
|
UBGraphicsScene* pageScene = UBPersistenceManager::persistenceManager()->loadDocumentScene(source->selectedDocument(), i); |
|
|
|
UBThumbnailView* pageView = new UBThumbnailView(pageScene); |
|
|
|
UBThumbnailView* pageView = new UBThumbnailView(pageScene); |
|
|
|
|
|
|
|
|
|
|
@ -199,6 +201,10 @@ void UBBoardThumbnailsView::resizeEvent(QResizeEvent *event) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBBoardThumbnailsView::mousePressEvent(QMouseEvent *event) |
|
|
|
void UBBoardThumbnailsView::mousePressEvent(QMouseEvent *event) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
QGraphicsView::mousePressEvent(event); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!event->isAccepted()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
mLongPressTimer.start(); |
|
|
|
mLongPressTimer.start(); |
|
|
|
mLastPressedMousePos = event->pos(); |
|
|
|
mLastPressedMousePos = event->pos(); |
|
|
@ -212,8 +218,7 @@ void UBBoardThumbnailsView::mousePressEvent(QMouseEvent *event) |
|
|
|
UBApplication::boardController->setActiveDocumentScene(item->sceneIndex()); |
|
|
|
UBApplication::boardController->setActiveDocumentScene(item->sceneIndex()); |
|
|
|
UBApplication::boardController->centerOn(UBApplication::boardController->activeScene()->lastCenter()); |
|
|
|
UBApplication::boardController->centerOn(UBApplication::boardController->activeScene()->lastCenter()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
QGraphicsView::mousePressEvent(event); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBBoardThumbnailsView::mouseMoveEvent(QMouseEvent *event) |
|
|
|
void UBBoardThumbnailsView::mouseMoveEvent(QMouseEvent *event) |
|
|
|