diff options
author | Robert Jonsson <spamatica@gmail.com> | 2013-03-04 19:44:48 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2013-03-04 19:44:48 +0000 |
commit | 0cbda2ef8898f4e6333407c64e662d6e087878fa (patch) | |
tree | a7e5b99664df29a2f0a3c23ee0bff2bc9a377e3c /muse2/muse/widgets/tools.cpp | |
parent | 8c3f10f97d58e596a2ecd1c5c2280d2b6b7f5e11 (diff) |
print shortcuts for tools
Diffstat (limited to 'muse2/muse/widgets/tools.cpp')
-rw-r--r-- | muse2/muse/widgets/tools.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/muse2/muse/widgets/tools.cpp b/muse2/muse/widgets/tools.cpp index 0bac4b10..8a62d2a9 100644 --- a/muse2/muse/widgets/tools.cpp +++ b/muse2/muse/widgets/tools.cpp @@ -27,6 +27,7 @@ #include "icons.h" #include "action.h" +#include "shortcuts.h" namespace MusEGui { @@ -78,6 +79,9 @@ ToolB toolList[] = { {&cursorIcon, QT_TRANSLATE_NOOP("MusEGui::EditToolBar", "cursor"), infoCursor} }; +QMap<int,int> toolShortcuts; + + const unsigned gNumberOfTools = sizeof(toolList) / sizeof(ToolB); //--------------------------------------------------------- @@ -122,7 +126,22 @@ EditToolBar::EditToolBar(QWidget* parent, int tools, const char*) // Note: Does not take ownership. addActions(action->actions()); - connect(action, SIGNAL(selected(QAction*)), SLOT(toolChanged(QAction*))); + connect(action, SIGNAL(selected(QAction*)), SLOT(toolChanged(QAction*))); + + toolShortcuts[PointerTool] = SHRT_TOOL_CURSOR; + toolShortcuts[PencilTool] = SHRT_TOOL_PENCIL; + toolShortcuts[RubberTool] = SHRT_TOOL_RUBBER; + toolShortcuts[CutTool] = SHRT_TOOL_SCISSORS; + toolShortcuts[GlueTool] = SHRT_TOOL_GLUE; + toolShortcuts[RangeTool] = SHRT_TOOL_RANGE; + toolShortcuts[PanTool] = SHRT_TOOL_PAN; + toolShortcuts[ZoomTool] = SHRT_TOOL_ZOOM; + //toolShortcuts[ScoreTool] = SHRT_TOOL_ + //toolShortcuts[QuantTool] = SHRT_TOOL_ + toolShortcuts[DrawTool] = SHRT_TOOL_LINEDRAW; + toolShortcuts[MuteTool] = SHRT_TOOL_MUTE; + toolShortcuts[AutomationTool] = SHRT_TOOL_LINEDRAW; + toolShortcuts[CursorTool] = SHRT_TOOL_CURSOR; } //--------------------------------------------------------- |