|
|
|
@ -78,7 +78,6 @@ UBBoardThumbnailsView::UBBoardThumbnailsView(QWidget *parent, const char *name) |
|
|
|
|
connect(UBApplication::boardController, SIGNAL(addThumbnailRequired(UBDocumentContainer*, int)), this, SLOT(addThumbnail(UBDocumentContainer*, int)), Qt::UniqueConnection); |
|
|
|
|
connect(UBApplication::boardController, SIGNAL(moveThumbnailRequired(int, int)), this, SLOT(moveThumbnail(int, int)), Qt::UniqueConnection); |
|
|
|
|
connect(this, SIGNAL(moveThumbnailRequired(int, int)), this, SLOT(moveThumbnail(int, int)), Qt::UniqueConnection); |
|
|
|
|
connect(UBApplication::boardController, SIGNAL(reloadThumbnailRequired(UBDocumentContainer*, int)), this, SLOT(reloadThumbnail(UBDocumentContainer*, int)), Qt::UniqueConnection); |
|
|
|
|
connect(UBApplication::boardController, SIGNAL(removeThumbnailRequired(int)), this, SLOT(removeThumbnail(int)), Qt::UniqueConnection); |
|
|
|
|
|
|
|
|
|
connect(&mLongPressTimer, SIGNAL(timeout()), this, SLOT(longPressTimeout()), Qt::UniqueConnection); |
|
|
|
@ -95,13 +94,6 @@ void UBBoardThumbnailsView::moveThumbnail(int from, int to) |
|
|
|
|
updateThumbnailsPos(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UBBoardThumbnailsView::reloadThumbnail(UBDocumentContainer* source, int index) |
|
|
|
|
{ |
|
|
|
|
removeThumbnail(index); |
|
|
|
|
|
|
|
|
|
addThumbnail(source, index); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UBBoardThumbnailsView::removeThumbnail(int i) |
|
|
|
|
{ |
|
|
|
|
UBDraggableThumbnailView* item = mThumbnails.at(i); |
|
|
|
@ -135,12 +127,7 @@ void UBBoardThumbnailsView::addThumbnail(UBDocumentContainer* source, int i) |
|
|
|
|
|
|
|
|
|
void UBBoardThumbnailsView::clearThumbnails() |
|
|
|
|
{ |
|
|
|
|
for(int i = 0; i < mThumbnails.size(); i++) |
|
|
|
|
{ |
|
|
|
|
scene()->removeItem(mThumbnails.at(i)->pageNumber()); |
|
|
|
|
scene()->removeItem(mThumbnails.at(i)); |
|
|
|
|
mThumbnails.at(i)->deleteLater(); |
|
|
|
|
} |
|
|
|
|
qDeleteAll(mThumbnails); |
|
|
|
|
mThumbnails.clear(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|