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

QT: Added missing shortcuts to the ge widget.

parent dfc95d5c
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include <QApplication> #include <QApplication>
#include <QMenuBar> #include <QMenuBar>
#include <QMessageBox> #include <QMessageBox>
#include <QShortcut>
#include <QVBoxLayout> #include <QVBoxLayout>
void WGeQtWidget::focusInEvent(QFocusEvent* event) void WGeQtWidget::focusInEvent(QFocusEvent* event)
...@@ -246,6 +247,11 @@ WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename, ...@@ -246,6 +247,11 @@ WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename,
"system-help"); "system-help");
graph_form->setMenuBar(menu_bar); 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); add_expanding(graph_form, grow_widget);
...@@ -264,4 +270,4 @@ WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename, ...@@ -264,4 +270,4 @@ WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename,
graph->set_nav_background_color(); graph->set_nav_background_color();
} }
} }
\ No newline at end of file
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <QMenuBar> #include <QMenuBar>
#include <QResizeEvent> #include <QResizeEvent>
#include <QShortcut>
#include <QVBoxLayout> #include <QVBoxLayout>
void XttGeQtWidget::focusInEvent(QFocusEvent* event) void XttGeQtWidget::focusInEvent(QFocusEvent* event)
...@@ -390,6 +391,11 @@ XttGeQt::XttGeQt(void* xg_parent_ctx, const char* xg_name, ...@@ -390,6 +391,11 @@ XttGeQt::XttGeQt(void* xg_parent_ctx, const char* xg_name,
"system-help"); "system-help");
graph_form->setMenuBar(menu_bar); 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); 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