aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger/QT/SkDebuggerGUI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'debugger/QT/SkDebuggerGUI.cpp')
-rw-r--r--debugger/QT/SkDebuggerGUI.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index 131386c120..823fffc54e 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -28,6 +28,9 @@ SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) :
, fActionShowDeletes(this)
, fActionStepBack(this)
, fActionStepForward(this)
+ , fActionZoomIn(this)
+ , fActionZoomOut(this)
+ , fMapper(this)
, fCentralWidget(this)
, fFilter(&fCentralWidget)
, fContainerLayout(&fCentralWidget)
@@ -76,6 +79,13 @@ SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) :
connect(&fCanvasWidget, SIGNAL(scaleFactorChanged(float)), this, SLOT(actionScale(float)));
connect(&fCanvasWidget, SIGNAL(commandChanged(int)), &fSettingsWidget, SLOT(updateCommand(int)));
+ fMapper.setMapping(&fActionZoomIn, 1);
+ fMapper.setMapping(&fActionZoomOut, -1);
+
+ connect(&fActionZoomIn, SIGNAL(triggered()), &fMapper, SLOT(map()));
+ connect(&fActionZoomOut, SIGNAL(triggered()), &fMapper, SLOT(map()));
+ connect(&fMapper, SIGNAL(mapped(int)), &fCanvasWidget, SLOT(keyZoom(int)));
+
fInspectorWidget.setDisabled(true);
fMenuEdit.setDisabled(true);
fMenuNavigate.setDisabled(true);
@@ -413,6 +423,11 @@ void SkDebuggerGUI::setupUi(QMainWindow *SkDebuggerGUI) {
fActionStepForward.setIcon(stepForward);
fActionStepForward.setText("Step Forward");
+ fActionZoomIn.setShortcut(QKeySequence(tr("Ctrl+=")));
+ fActionZoomIn.setText("Zoom In");
+ fActionZoomOut.setShortcut(QKeySequence(tr("Ctrl+-")));
+ fActionZoomOut.setText("Zoom Out");
+
fListWidget.setItemDelegate(new SkListWidget(&fListWidget));
fListWidget.setObjectName(QString::fromUtf8("listWidget"));
fListWidget.setMaximumWidth(250);
@@ -501,6 +516,8 @@ void SkDebuggerGUI::setupUi(QMainWindow *SkDebuggerGUI) {
fMenuView.setTitle("View");
fMenuView.addAction(&fActionBreakpoint);
fMenuView.addAction(&fActionShowDeletes);
+ fMenuView.addAction(&fActionZoomIn);
+ fMenuView.addAction(&fActionZoomOut);
fMenuWindows.setTitle("Window");
fMenuWindows.addAction(&fActionInspector);