Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
luyikei
VLMC
Commits
aee3995f
Commit
aee3995f
authored
Dec 09, 2009
by
Hugo Beauzee-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing shortcut initialization
parent
18864b2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
src/GUI/MainWindow.cpp
src/GUI/MainWindow.cpp
+13
-4
No files found.
src/GUI/MainWindow.cpp
View file @
aee3995f
...
...
@@ -458,17 +458,26 @@ void MainWindow::projectChanged( const QString& projectName, bool savedStatus
setWindowTitle
(
title
);
}
#define
GE
T_SHORTCUT( instName, shortcutName ) \
#define
INI
T_SHORTCUT( instName, shortcutName
, actionInstance
) \
const SettingValue* instName = SettingsManager::getInstance()->getValue( "keyboard_shortcut", shortcutName );\
KeyboardShortcutHelper* helper##instName = new KeyboardShortcutHelper( shortcutName, this, true ); \
connect( helper##instName, SIGNAL( changed( const QString&, const QString&) ), this, SLOT( keyboardShortcutChanged(QString,QString)) );
connect( helper##instName, SIGNAL( changed( const QString&, const QString&) ), this, SLOT( keyboardShortcutChanged(QString,QString)) ); \
m_ui.actionInstance->setShortcut( instName->get().toString() );
void
MainWindow
::
initializeMenuKeyboardShortcut
()
{
GET_SHORTCUT
(
help
,
"Help"
);
m_ui
.
actionHelp
->
setShortcut
(
help
->
get
().
toString
()
);
INIT_SHORTCUT
(
help
,
"Help"
,
actionHelp
);
INIT_SHORTCUT
(
quit
,
"Quit"
,
actionQuit
);
INIT_SHORTCUT
(
preferences
,
"Preferences"
,
actionPreferences
);
INIT_SHORTCUT
(
fullscreen
,
"Fullscreen"
,
actionFullscreen
);
INIT_SHORTCUT
(
newProject
,
"New project"
,
actionNew_Project
);
INIT_SHORTCUT
(
openProject
,
"Open project"
,
actionLoad_Project
);
INIT_SHORTCUT
(
save
,
"Save"
,
actionSave
);
INIT_SHORTCUT
(
saveAs
,
"Save as"
,
actionSave_As
);
}
#undef INIT_SHORTCUT
void
MainWindow
::
keyboardShortcutChanged
(
const
QString
&
name
,
const
QString
&
val
)
{
qDebug
()
<<
"shortcut"
<<
name
<<
"changed to"
<<
val
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment