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