Commit 18864b2a authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

All menu shortcuts are now editable.

parent ae1ad6fa
......@@ -84,6 +84,12 @@ void VLMCSettingsDefault::loadKeyboardShortcutDefaults( const QString& part )
ADD_SHORTCUT( "Undo", QKeySequence( QKeySequence::Undo ).toString().toLocal8Bit() );
ADD_SHORTCUT( "Redo", QKeySequence( QKeySequence::Redo ).toString().toLocal8Bit() );
ADD_SHORTCUT( "Help", QKeySequence( QKeySequence::HelpContents ).toString().toLocal8Bit() );
ADD_SHORTCUT( "Quit", QKeySequence( QKeySequence::Close ).toString().toLocal8Bit() );
ADD_SHORTCUT( "Preferences", "Alt+P" );
ADD_SHORTCUT( "Fullscreen", "F" );
ADD_SHORTCUT( "New project", QKeySequence( QKeySequence::New ).toString().toLocal8Bit() );
ADD_SHORTCUT( "Open project", QKeySequence( QKeySequence::Open ).toString().toLocal8Bit() );
ADD_SHORTCUT( "Save", QKeySequence( QKeySequence::Save ).toString().toLocal8Bit() );
ADD_SHORTCUT( "Save as", QKeySequence( QKeySequence::SaveAs ).toString().toLocal8Bit() );
return ;
}
......@@ -473,7 +473,21 @@ void MainWindow::keyboardShortcutChanged( const QString& name, const QString&
{
qDebug() << "shortcut" << name << "changed to" << val;
if ( name == "Help" )
{
m_ui.actionHelp->setShortcut( val );
}
else if ( name == "Quit" )
m_ui.actionQuit->setShortcut( val );
else if ( name == "Preferences" )
m_ui.actionPreferences->setShortcut( val );
else if ( name == "Fullscreen" )
m_ui.actionFullscreen->setShortcut( val );
else if ( name == "New project" )
m_ui.actionNew_Project->setShortcut( val );
else if ( name == "Open project" )
m_ui.actionLoad_Project->setShortcut( val );
else if ( name == "Save" )
m_ui.actionSave->setShortcut( val );
else if ( name == "Save as" )
m_ui.actionSave_As->setShortcut( val );
else
qWarning() << "Unknown shortcut:" << name;
}
......@@ -96,9 +96,6 @@
<property name="text">
<string>Quit</string>
</property>
<property name="shortcut">
<string>Ctrl+Q</string>
</property>
</action>
<action name="actionAbout">
<property name="text">
......@@ -114,9 +111,6 @@
<property name="text">
<string>Preferences</string>
</property>
<property name="shortcut">
<string>Alt+P</string>
</property>
</action>
<action name="actionMedia_Library">
<property name="checkable">
......@@ -146,9 +140,6 @@
<property name="text">
<string>New Project</string>
</property>
<property name="shortcut">
<string>Ctrl+N</string>
</property>
</action>
<action name="actionFullscreen">
<property name="checkable">
......@@ -157,9 +148,6 @@
<property name="text">
<string>Fullscreen</string>
</property>
<property name="shortcut">
<string>F</string>
</property>
</action>
<action name="actionRender">
<property name="text">
......@@ -170,17 +158,11 @@
<property name="text">
<string>Load Project</string>
</property>
<property name="shortcut">
<string>Ctrl+O</string>
</property>
</action>
<action name="actionSave">
<property name="text">
<string>Save</string>
</property>
<property name="shortcut">
<string>Ctrl+S</string>
</property>
</action>
<action name="actionImport">
<property name="text">
......@@ -220,9 +202,6 @@
<property name="text">
<string>Save As</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+S</string>
</property>
</action>
</widget>
<resources>
......
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