Show shortcuts in tooltips of ImageViewer

Change-Id: I90fa2e3bddc99cff721c30499046a11a3dd93486
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Konstantin Tokarev
2012-06-25 20:39:09 +04:00
committed by Daniel Teske
parent 108f7d804f
commit 7d089b35a3
6 changed files with 192 additions and 18 deletions

View File

@@ -86,6 +86,14 @@ ImageViewer::ImageViewer(QWidget *parent)
// (photograph has outline - piece of paper)
updateButtonIconByTheme(d->ui_toolbar.toolButtonOutline, "emblem-photos");
d->ui_toolbar.toolButtonZoomIn->setCommandId(Constants::ACTION_ZOOM_IN);
d->ui_toolbar.toolButtonZoomOut->setCommandId(Constants::ACTION_ZOOM_OUT);
d->ui_toolbar.toolButtonOriginalSize->setCommandId(Constants::ACTION_ORIGINAL_SIZE);
d->ui_toolbar.toolButtonFitToScreen->setCommandId(Constants::ACTION_FIT_TO_SCREEN);
d->ui_toolbar.toolButtonBackground->setCommandId(Constants::ACTION_BACKGROUND);
d->ui_toolbar.toolButtonOutline->setCommandId(Constants::ACTION_OUTLINE);
d->ui_toolbar.toolButtonPlayPause->setCommandId(Constants::ACTION_TOGGLE_ANIMATION);
// connections
connect(d->file, SIGNAL(changed()), this, SIGNAL(changed()));
@@ -272,10 +280,10 @@ void ImageViewer::setPaused(bool paused)
{
d->imageView->setPaused(paused);
if (paused) {
d->ui_toolbar.toolButtonPlayPause->setToolTip(tr("Play Animation"));
d->ui_toolbar.toolButtonPlayPause->setToolTipBase(tr("Play Animation"));
d->ui_toolbar.toolButtonPlayPause->setIcon(QPixmap(QLatin1String(":/imageviewer/images/play-small.png")));
} else {
d->ui_toolbar.toolButtonPlayPause->setToolTip(tr("Pause Animation"));
d->ui_toolbar.toolButtonPlayPause->setToolTipBase(tr("Pause Animation"));
d->ui_toolbar.toolButtonPlayPause->setIcon(QPixmap(QLatin1String(":/imageviewer/images/pause-small.png")));
}
}