[Digikam-devel] [Bug 145227] change ratings via short-cuts in the light-table
Gilles Caulier
caulier.gilles at gmail.com
Thu May 10 13:34:50 BST 2007
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=145227
------- Additional Comments From caulier.gilles gmail com 2007-05-10 14:34 -------
SVN commit 663179 by cgilles:
digikam from trunk : Light Table : to be able to select and ensure visible the thumbbar icon associed with the Left or Right panel when user click with left mouse button on preview.
CCBUGS: 145227
M +6 -0 lighttablebar.cpp
M +2 -0 lighttablebar.h
M +6 -0 lighttableview.cpp
M +3 -0 lighttableview.h
M +16 -0 lighttablewindow.cpp
M +3 -0 lighttablewindow.h
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablebar.cpp #663178:663179
@ -242,6 +242,12 @
return list;
}
+void LightTableBar::setSelected(LightTableBarItem* ltItem)
+{
+ ThumbBarItem *item = static_cast<ThumbBarItem*>(ltItem);
+ if (item) ThumbBarView::setSelected(item);
+}
+
LightTableBarItem* LightTableBar::findItemByInfo(const ImageInfo* info) const
{
if (info)
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablebar.h #663178:663179
@ -59,6 +59,8 @
ImageInfo* currentItemImageInfo() const;
ImageInfoList itemsImageInfoList();
+ void setSelected(LightTableBarItem* ltItem);
+
LightTableBarItem* findItemByInfo(const ImageInfo* info) const;
LightTableBarItem* findItemByPos(const QPoint& pos) const;
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttableview.cpp #663178:663179
@ -127,6 +127,12 @
connect(d->rightPreview, SIGNAL(signalPreviewLoaded(bool)),
this, SLOT(slotRightPreviewLoaded(bool)));
+
+ connect(d->leftPreview, SIGNAL(signalLeftButtonClicked()),
+ this, SIGNAL(signalLeftPanelLeftButtonClicked()));
+
+ connect(d->rightPreview, SIGNAL(signalLeftButtonClicked()),
+ this, SIGNAL(signalRightPanelLeftButtonClicked()));
}
LightTableView::~LightTableView()
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttableview.h #663178:663179
@ -91,6 +91,9 @
void signalLeftDroppedItems(const ImageInfoList&);
void signalRightDroppedItems(const ImageInfoList&);
+ void signalLeftPanelLeftButtonClicked();
+ void signalRightPanelLeftButtonClicked();
+
void signalSlideShow();
void signalDeleteItem(ImageInfo*);
void signalEditItem(ImageInfo*);
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindow.cpp #663178:663179
@ -346,6 +346,12 @
connect(d->previewView, SIGNAL(signalRightPreviewLoaded(bool)),
this, SLOT(slotRightPreviewLoaded(bool)));
+ connect(d->previewView, SIGNAL(signalLeftPanelLeftButtonClicked()),
+ this, SLOT(slotLeftPanelLeftButtonClicked()));
+
+ connect(d->previewView, SIGNAL(signalRightPanelLeftButtonClicked()),
+ this, SLOT(slotRightPanelLeftButtonClicked()));
+
ImageAttributesWatch *watch = ImageAttributesWatch::instance();
connect(watch, SIGNAL(signalFileMetadataChanged(const KURL &)),
@ -523,6 +529,16 @
}
}
+void LightTableWindow::slotLeftPanelLeftButtonClicked()
+{
+ d->barView->setSelected(d->barView->findItemByInfo(d->previewView->leftImageInfo()));
+}
+
+void LightTableWindow::slotRightPanelLeftButtonClicked()
+{
+ d->barView->setSelected(d->barView->findItemByInfo(d->previewView->rightImageInfo()));
+}
+
void LightTableWindow::slotLeftPreviewLoaded(bool b)
{
d->leftZoomBar->setEnabled(b);
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindow.h #663178:663179
@ -92,6 +92,9 @
void slotLeftDroppedItems(const ImageInfoList&);
void slotRightDroppedItems(const ImageInfoList&);
+ void slotLeftPanelLeftButtonClicked();
+ void slotRightPanelLeftButtonClicked();
+
void slotLeftPreviewLoaded(bool);
void slotRightPreviewLoaded(bool);
More information about the Digikam-devel
mailing list