summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Gateau <agateau@kde.org>2010-06-01 00:31:48 +0200
committerAurelien Gateau <agateau@kde.org>2010-06-01 17:25:24 +0200
commit7183ce13edc1903173979aa8993d539b87bd3389 (patch)
tree5a3e0103de0862a0a0a0a9dbc75fefcfb6b8d0b8
parentFix error reporting (diff)
downloadrekonq-7183ce13edc1903173979aa8993d539b87bd3389.tar.xz
Use standard zoom actions
-rw-r--r--src/mainwindow.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 59af4d42..5a0b2568 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -328,20 +328,10 @@ void MainWindow::setupActions()
// ============================= Zoom Actions ===================================
- a = new KAction(KIcon("zoom-in"), i18n("&Zoom In"), this);
- a->setShortcut(KShortcut(Qt::CTRL | Qt::Key_Plus));
- actionCollection()->addAction(QL1S("zoom_in"), a);
- connect(a, SIGNAL(triggered(bool)), this, SLOT(zoomIn()));
-
- a = new KAction(KIcon("zoom-original"), i18n("&Normal Zoom"), this);
+ actionCollection()->addAction(KStandardAction::ZoomIn, this, SLOT(zoomIn()));
+ a = actionCollection()->addAction(KStandardAction::ActualSize, this, SLOT(zoomNormal()));
a->setShortcut(KShortcut(Qt::CTRL | Qt::Key_0));
- actionCollection()->addAction(QL1S("zoom_normal"), a);
- connect(a, SIGNAL(triggered(bool)), this, SLOT(zoomNormal()));
-
- a = new KAction(KIcon("zoom-out"), i18n("&Zoom Out"), this);
- a->setShortcut(KShortcut(Qt::CTRL | Qt::Key_Minus));
- actionCollection()->addAction(QL1S("zoom_out"), a);
- connect(a, SIGNAL(triggered(bool)), this, SLOT(zoomOut()));
+ actionCollection()->addAction(KStandardAction::ZoomOut, this, SLOT(zoomOut()));
// =============================== Tools Actions =================================
a = new KAction(i18n("Page S&ource"), this);
@@ -475,7 +465,7 @@ void MainWindow::setupTools()
QWidget *zoomWidget = new QWidget(this);
QToolButton *zoomOut = new QToolButton(zoomWidget);
- zoomOut->setDefaultAction(actionByName(QL1S("zoom_out")));
+ zoomOut->setDefaultAction(actionByName(KStandardAction::name(KStandardAction::ZoomOut)));
zoomOut->setAutoRaise(true);
m_zoomSlider = new QSlider(Qt::Horizontal, zoomWidget);
@@ -486,11 +476,11 @@ void MainWindow::setupTools()
connect(m_zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(setZoomFactor(int)));
QToolButton *zoomIn = new QToolButton(zoomWidget);
- zoomIn->setDefaultAction(actionByName(QL1S("zoom_in")));
+ zoomIn->setDefaultAction(actionByName(KStandardAction::name(KStandardAction::ZoomIn)));
zoomIn->setAutoRaise(true);
QToolButton *zoomNormal = new QToolButton(zoomWidget);
- zoomNormal->setDefaultAction(actionByName(QL1S("zoom_normal")));
+ zoomNormal->setDefaultAction(actionByName(KStandardAction::name(KStandardAction::ActualSize)));
zoomNormal->setAutoRaise(true);
QHBoxLayout* zoomWidgetLayout = new QHBoxLayout(zoomWidget);