Commit 0ff83e88 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Added missing shortcuts to the ge widget.

parent dfc95d5c
......@@ -45,6 +45,7 @@
#include <QApplication>
#include <QMenuBar>
#include <QMessageBox>
#include <QShortcut>
#include <QVBoxLayout>
void WGeQtWidget::focusInEvent(QFocusEvent* event)
......@@ -246,6 +247,11 @@ WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename,
"system-help");
graph_form->setMenuBar(menu_bar);
} else {
new QShortcut(QKeySequence("CTRL+W"), toplevel, SLOT(close()));
new QShortcut(QKeySequence("CTRL+I"), toplevel, SLOT(activate_zoom_in()));
new QShortcut(QKeySequence("CTRL+O"), toplevel, SLOT(activate_zoom_out()));
new QShortcut(QKeySequence("CTRL+H"), toplevel, SLOT(activate_help()));
}
add_expanding(graph_form, grow_widget);
......@@ -264,4 +270,4 @@ WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename,
graph->set_nav_background_color();
}
}
\ No newline at end of file
}
......@@ -46,6 +46,7 @@
#include <QMenuBar>
#include <QResizeEvent>
#include <QShortcut>
#include <QVBoxLayout>
void XttGeQtWidget::focusInEvent(QFocusEvent* event)
......@@ -390,6 +391,11 @@ XttGeQt::XttGeQt(void* xg_parent_ctx, const char* xg_name,
"system-help");
graph_form->setMenuBar(menu_bar);
} else {
new QShortcut(QKeySequence("CTRL+W"), toplevel, SLOT(close()));
new QShortcut(QKeySequence("CTRL+I"), toplevel, SLOT(activate_zoom_in()));
new QShortcut(QKeySequence("CTRL+O"), toplevel, SLOT(activate_zoom_out()));
new QShortcut(QKeySequence("CTRL+H"), toplevel, SLOT(activate_help()));
}
add_expanding(graph_form, grow_widget);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment