[Digikam-devel] [Bug 129450] cannot exit preview mode within empty album
Gilles Caulier
caulier.gilles at free.fr
Tue Jun 20 11:00:27 BST 2006
------- 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=129450
------- Additional Comments From caulier.gilles free fr 2006-06-20 12:00 -------
SVN commit 553174 by cgilles:
digikam from trunk : fix image preview mode rules with empty album (2)
CCBUGS: 129450
M +23 -5 albumwidgetstack.cpp
M +3 -1 albumwidgetstack.h
M +3 -3 imagepreviewwidget.cpp
M +4 -1 imagepreviewwidget.h
--- trunk/extragear/graphics/digikam/digikam/albumwidgetstack.cpp #553173:553174
@ -104,8 +104,14 @
connect(ThemeEngine::instance(), SIGNAL(signalThemeChanged()),
this, SLOT(slotThemeChanged()));
- connect(d->previewItemWidget, SIGNAL( previewUnderProgress(bool) ),
- this, SLOT( slotToogleButtons(bool) ) );
+ connect(d->previewItemWidget, SIGNAL( previewStarted() ),
+ this, SLOT( slotPreviewStarted() ) );
+
+ connect(d->previewItemWidget, SIGNAL( previewComplete() ),
+ this, SLOT( slotPreviewComplete() ) );
+
+ connect(d->previewItemWidget, SIGNAL( previewFailed() ),
+ this, SLOT( slotPreviewFailed() ) );
}
AlbumWidgetStack::~AlbumWidgetStack()
@ -148,12 +154,24 @
visibleWidget()->setFocus();
}
-void AlbumWidgetStack::slotToogleButtons(bool t)
+void AlbumWidgetStack::slotPreviewStarted()
{
- d->backButton->setEnabled(!t);
- d->editButton->setEnabled(!t);
+ d->backButton->setEnabled(false);
+ d->editButton->setEnabled(false);
}
+void AlbumWidgetStack::slotPreviewComplete()
+{
+ d->backButton->setEnabled(true);
+ d->editButton->setEnabled(true);
+}
+
+void AlbumWidgetStack::slotPreviewFailed()
+{
+ d->backButton->setEnabled(true);
+ d->editButton->setEnabled(false);
+}
+
} // namespace Digikam
#include "albumwidgetstack.moc"
--- trunk/extragear/graphics/digikam/digikam/albumwidgetstack.h #553173:553174
@ -70,7 +70,9 @
private slots:
void slotThemeChanged();
- void slotToogleButtons(bool);
+ void slotPreviewStarted();
+ void slotPreviewComplete();
+ void slotPreviewFailed();
private:
--- trunk/extragear/graphics/digikam/digikam/imagepreviewwidget.cpp #553173:553174
@ -115,7 +115,7 @
connect(d->previewJob, SIGNAL(signalFailed(const KURL&)),
this, SLOT(slotFailedImagePreview(const KURL&)));
- emit previewUnderProgress(true);
+ emit previewStarted();
}
void ImagePreviewWidget::slotPreviewBlinkTimerDone()
@ -134,7 +134,7 @
d->pixmap = QPixmap(contentsRect().size());
updatePixmap();
repaint(false);
- emit previewUnderProgress(false);
+ emit previewComplete();
}
void ImagePreviewWidget::slotFailedImagePreview(const KURL&)
@ -145,7 +145,7 @
d->pixmap = QPixmap(contentsRect().size());
updatePixmap();
repaint(false);
- emit previewUnderProgress(false);
+ emit previewFailed();
}
void ImagePreviewWidget::updatePixmap( void )
--- trunk/extragear/graphics/digikam/digikam/imagepreviewwidget.h #553173:553174
@ -57,7 +57,10 @
void lastItem();
void firstItem();
void escapeSignal();
- void previewUnderProgress(bool);
+
+ void previewStarted();
+ void previewComplete();
+ void previewFailed();
public slots:
More information about the Digikam-devel
mailing list