SVN commit 662289 by cgilles:
digikam from trunk : Light Table : update contents of thumbbar and preview panels if an image has changed form album gui (for ex to use JpegLossLess kipi-plugin) CCMAIL: [hidden email] M +3 -0 digikam/albumiconview.cpp M +10 -0 utilities/lighttable/lighttableview.cpp M +3 -0 utilities/lighttable/lighttableview.h M +31 -41 utilities/lighttable/lighttablewindow.cpp M +4 -1 utilities/lighttable/lighttablewindow.h --- trunk/extragear/graphics/digikam/digikam/albumiconview.cpp #662288:662289 @@ -1074,6 +1074,9 @@ connect(ltview, SIGNAL(signalFileDeleted(const KURL&)), this, SLOT(slotFilesModified())); + connect(this, SIGNAL(signalItemsUpdated(const KURL::List&)), + ltview, SLOT(slotItemsUpdated(const KURL::List&))); + ltview->loadImageInfos(list, current); if (ltview->isHidden()) --- trunk/extragear/graphics/digikam/utilities/lighttable/lighttableview.cpp #662288:662289 @@ -236,5 +236,15 @@ d->rightPreview->setZoomFactor(z); } +void LightTableView::leftReload() +{ + d->leftPreview->reload(); +} + +void LightTableView::rightReload() +{ + d->rightPreview->reload(); +} + } // namespace Digikam --- trunk/extragear/graphics/digikam/utilities/lighttable/lighttableview.h #662288:662289 @@ -71,6 +71,9 @@ bool rightMaxZoom(); bool rightMinZoom(); + void leftReload(); + void rightReload(); + void fitToWindow(); signals: --- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindow.cpp #662288:662289 @@ -95,12 +95,6 @@ fileDeletePermanentlyDirectlyAction = 0; fileTrashDirectlyAction = 0; donateMoneyAction = 0; - star0 = 0; - star1 = 0; - star2 = 0; - star3 = 0; - star4 = 0; - star5 = 0; zoomFitToWindowAction = 0; zoomPlusAction = 0; zoomMinusAction = 0; @@ -126,12 +120,6 @@ KAction *fileDeletePermanentlyAction; KAction *fileDeletePermanentlyDirectlyAction; KAction *fileTrashDirectlyAction; - KAction *star0; - KAction *star1; - KAction *star2; - KAction *star3; - KAction *star4; - KAction *star5; KAction *zoomPlusAction; KAction *zoomMinusAction; KAction *zoomTo100percents; @@ -411,27 +399,6 @@ // Provides a menu entry that allows showing/hiding the statusbar createStandardStatusBarAction(); - // -- Rating actions --------------------------------------------------------------- - - d->star0 = new KAction(i18n("Assign Rating \"No Star\""), CTRL+Key_0, - d->rightSidebar, SLOT(slotAssignRatingNoStar()), - actionCollection(), "lighttable_ratenostar"); - d->star1 = new KAction(i18n("Assign Rating \"One Star\""), CTRL+Key_1, - d->rightSidebar, SLOT(slotAssignRatingOneStar()), - actionCollection(), "lighttable_rateonestar"); - d->star2 = new KAction(i18n("Assign Rating \"Two Stars\""), CTRL+Key_2, - d->rightSidebar, SLOT(slotAssignRatingTwoStar()), - actionCollection(), "lighttable_ratetwostar"); - d->star3 = new KAction(i18n("Assign Rating \"Three Stars\""), CTRL+Key_3, - d->rightSidebar, SLOT(slotAssignRatingThreeStar()), - actionCollection(), "lighttable_ratethreestar"); - d->star4 = new KAction(i18n("Assign Rating \"Four Stars\""), CTRL+Key_4, - d->rightSidebar, SLOT(slotAssignRatingFourStar()), - actionCollection(), "lighttable_ratefourstar"); - d->star5 = new KAction(i18n("Assign Rating \"Five Stars\""), CTRL+Key_5, - d->rightSidebar, SLOT(slotAssignRatingFiveStar()), - actionCollection(), "lighttable_ratefivestar"); - // --------------------------------------------------------------------------------- createGUI("lighttablewindowui.rc", false); @@ -486,6 +453,37 @@ .arg(d->barView->countItems())); } +void LightTableWindow::slotItemsUpdated(const KURL::List& urls) +{ + d->barView->refreshThumbs(urls); + + for (KURL::List::const_iterator it = urls.begin() ; it != urls.end() ; ++it) + { + if (d->previewView->leftImageInfo()) + { + if (d->previewView->leftImageInfo()->kurl() == *it) + { + d->previewView->leftReload(); + d->leftSidebar->itemChanged(d->previewView->leftImageInfo()); + } + } + + if (d->previewView->rightImageInfo()) + { + if (d->previewView->rightImageInfo()->kurl() == *it) + { + d->previewView->rightReload(); + d->rightSidebar->itemChanged(d->previewView->rightImageInfo()); + } + } + } +} + +void LightTableWindow::slotFileMetadataChanged(const KURL &/*url*/) +{ + // TODO ??? +} + void LightTableWindow::slotItemSelected(ImageInfo* info) { if (info) @@ -933,14 +931,6 @@ // TODO: Apply Settings here if necessary } -void LightTableWindow::slotFileMetadataChanged(const KURL &url) -{ - if (url == d->barView->currentItemImageInfo()->kurl()) - { - // TODO - } -} - void LightTableWindow::slotLeftZoomFactorChanged(double zoom) { double h = (double)ThumbnailSize::Huge; --- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindow.h #662288:662289 @@ -38,7 +38,6 @@ #include "imageinfo.h" class KAction; -class KURL; namespace Digikam { @@ -64,6 +63,10 @@ void signalFileDeleted(const KURL&); +public slots: + + void slotItemsUpdated(const KURL::List&); + private: void closeEvent(QCloseEvent* e); _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |