summaryrefslogtreecommitdiff
path: root/src/plugins/imageviewer/imageviewer.cpp
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2012-06-25 20:39:09 +0400
committerDaniel Teske <daniel.teske@nokia.com>2012-06-25 18:50:22 +0200
commit7d089b35a30bfc04313e90559645164b429abcd2 (patch)
tree7da53a6c4f435efc82a67b73cffc7ac68f57d483 /src/plugins/imageviewer/imageviewer.cpp
parent108f7d804fca518e153c0ee18f31fe6817b3112b (diff)
downloadqt-creator-7d089b35a30bfc04313e90559645164b429abcd2.tar.gz
Show shortcuts in tooltips of ImageViewer
Change-Id: I90fa2e3bddc99cff721c30499046a11a3dd93486 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Diffstat (limited to 'src/plugins/imageviewer/imageviewer.cpp')
-rw-r--r--src/plugins/imageviewer/imageviewer.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/plugins/imageviewer/imageviewer.cpp b/src/plugins/imageviewer/imageviewer.cpp
index 48d61dafc6..92ae3e32d9 100644
--- a/src/plugins/imageviewer/imageviewer.cpp
+++ b/src/plugins/imageviewer/imageviewer.cpp
@@ -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")));
}
}