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
f1643133
Commit
f1643133
authored
Dec 09, 2009
by
Hugo Beauzee-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding (editabke) keyboard shortcut for cut and default mouse mode.
parent
fa2e5431
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
src/Commands/KeyboardShortcutHelper.cpp
src/Commands/KeyboardShortcutHelper.cpp
+0
-1
src/Configuration/VLMCSettingsDefault.cpp
src/Configuration/VLMCSettingsDefault.cpp
+1
-1
src/GUI/MainWindow.cpp
src/GUI/MainWindow.cpp
+8
-0
No files found.
src/Commands/KeyboardShortcutHelper.cpp
View file @
f1643133
...
...
@@ -9,7 +9,6 @@ KeyboardShortcutHelper::KeyboardShortcutHelper( const QString& name, QWidget* pa
m_name
(
name
)
{
const
SettingValue
*
set
=
SettingsManager
::
getInstance
()
->
getValue
(
"keyboard_shortcut"
,
name
);
qDebug
()
<<
set
->
get
().
toString
();
setKey
(
QKeySequence
(
set
->
get
().
toString
()
)
);
connect
(
set
,
SIGNAL
(
changed
(
const
QVariant
&
)
),
this
,
SLOT
(
shortcutUpdated
(
const
QVariant
&
)
)
);
}
...
...
src/Configuration/VLMCSettingsDefault.cpp
View file @
f1643133
...
...
@@ -76,7 +76,7 @@ void VLMCSettingsDefault::loadKeyboardShortcutDefaults( const QString& part )
{
SettingsManager
*
setMan
=
SettingsManager
::
getInstance
();
ADD_SHORTCUT
(
"
Selection
mode"
,
"n"
);
ADD_SHORTCUT
(
"
Default
mode"
,
"n"
);
ADD_SHORTCUT
(
"Cut mode"
,
"x"
);
ADD_SHORTCUT
(
"Launch media preview"
,
"Ctrl+Return"
);
ADD_SHORTCUT
(
"Start render preview"
,
"Space"
);
...
...
src/GUI/MainWindow.cpp
View file @
f1643133
...
...
@@ -171,12 +171,14 @@ void MainWindow::createStatusBar()
{
// Mouse (default) tool
QToolButton
*
mouseTool
=
new
QToolButton
(
this
);
mouseTool
->
setAutoRaise
(
true
);
mouseTool
->
setCheckable
(
true
);
mouseTool
->
setIcon
(
QIcon
(
":/images/mouse"
)
);
m_ui
.
statusbar
->
addPermanentWidget
(
mouseTool
);
// Cut/Split tool
QToolButton
*
splitTool
=
new
QToolButton
(
this
);
splitTool
->
setAutoRaise
(
true
);
splitTool
->
setCheckable
(
true
);
splitTool
->
setIcon
(
QIcon
(
":/images/editcut"
)
);
m_ui
.
statusbar
->
addPermanentWidget
(
splitTool
);
...
...
@@ -188,6 +190,12 @@ void MainWindow::createStatusBar()
toolButtonGroup
->
setExclusive
(
true
);
mouseTool
->
setChecked
(
true
);
//Shortcut part:
KeyboardShortcutHelper
*
defaultModeShortcut
=
new
KeyboardShortcutHelper
(
"Default mode"
,
this
);
KeyboardShortcutHelper
*
cutModeShortcut
=
new
KeyboardShortcutHelper
(
"Cut mode"
,
this
);
connect
(
defaultModeShortcut
,
SIGNAL
(
activated
()
),
mouseTool
,
SLOT
(
click
()
)
);
connect
(
cutModeShortcut
,
SIGNAL
(
activated
()
),
splitTool
,
SLOT
(
click
()
)
);
connect
(
toolButtonGroup
,
SIGNAL
(
buttonClicked
(
int
)
),
this
,
SLOT
(
toolButtonClicked
(
int
)
)
);
...
...
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