Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
f6857c6a
Commit
f6857c6a
authored
Apr 12, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - MouseWheel support - patch by Sergey Volk.
parent
3e54b375
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
4 deletions
+27
-4
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+15
-0
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+1
-0
modules/gui/qt4/util/customwidgets.cpp
modules/gui/qt4/util/customwidgets.cpp
+10
-4
modules/gui/qt4/util/customwidgets.hpp
modules/gui/qt4/util/customwidgets.hpp
+1
-0
No files found.
modules/gui/qt4/main_interface.cpp
View file @
f6857c6a
...
@@ -551,6 +551,21 @@ void MainInterface::keyPressEvent( QKeyEvent *e )
...
@@ -551,6 +551,21 @@ void MainInterface::keyPressEvent( QKeyEvent *e )
e
->
ignore
();
e
->
ignore
();
}
}
void
MainInterface
::
wheelEvent
(
QWheelEvent
*
e
)
{
int
i_vlckey
=
0
;
if
(
e
->
delta
()
>
0
)
i_vlckey
=
KEY_MOUSEWHEELUP
;
else
i_vlckey
=
KEY_MOUSEWHEELDOWN
;
/* Handle modifiers */
i_vlckey
|=
qtKeyModifiersToVLC
(
e
);
var_SetInteger
(
p_intf
->
p_libvlc
,
"key-pressed"
,
i_vlckey
);
e
->
accept
();
}
void
MainInterface
::
stop
()
void
MainInterface
::
stop
()
{
{
playlist_Stop
(
THEPL
);
playlist_Stop
(
THEPL
);
...
...
modules/gui/qt4/main_interface.hpp
View file @
f6857c6a
...
@@ -76,6 +76,7 @@ private:
...
@@ -76,6 +76,7 @@ private:
/* Video */
/* Video */
VideoWidget
*
videoWidget
;
VideoWidget
*
videoWidget
;
virtual
void
keyPressEvent
(
QKeyEvent
*
);
virtual
void
keyPressEvent
(
QKeyEvent
*
);
virtual
void
wheelEvent
(
QWheelEvent
*
);
bool
embeddedPlaylistWasActive
;
bool
embeddedPlaylistWasActive
;
bool
videoIsActive
;
bool
videoIsActive
;
...
...
modules/gui/qt4/util/customwidgets.cpp
View file @
f6857c6a
...
@@ -97,15 +97,21 @@ void ClickLineEdit::focusOutEvent( QFocusEvent *ev )
...
@@ -97,15 +97,21 @@ void ClickLineEdit::focusOutEvent( QFocusEvent *ev )
/***************************************************************************
/***************************************************************************
* Hotkeys converters
* Hotkeys converters
***************************************************************************/
***************************************************************************/
int
qtKeyModifiersToVLC
(
QInputEvent
*
e
)
{
int
i_keyModifiers
=
0
;
if
(
e
->
modifiers
()
&
Qt
::
ShiftModifier
)
i_keyModifiers
|=
KEY_MODIFIER_SHIFT
;
if
(
e
->
modifiers
()
&
Qt
::
AltModifier
)
i_keyModifiers
|=
KEY_MODIFIER_ALT
;
if
(
e
->
modifiers
()
&
Qt
::
ControlModifier
)
i_keyModifiers
|=
KEY_MODIFIER_CTRL
;
if
(
e
->
modifiers
()
&
Qt
::
MetaModifier
)
i_keyModifiers
|=
KEY_MODIFIER_META
;
return
i_keyModifiers
;
}
int
qtEventToVLCKey
(
QKeyEvent
*
e
)
int
qtEventToVLCKey
(
QKeyEvent
*
e
)
{
{
int
i_vlck
=
0
;
int
i_vlck
=
0
;
/* Handle modifiers */
/* Handle modifiers */
if
(
e
->
modifiers
()
&
Qt
::
ShiftModifier
)
i_vlck
|=
KEY_MODIFIER_SHIFT
;
i_vlck
|=
qtKeyModifiersToVLC
(
e
);
if
(
e
->
modifiers
()
&
Qt
::
AltModifier
)
i_vlck
|=
KEY_MODIFIER_ALT
;
if
(
e
->
modifiers
()
&
Qt
::
ControlModifier
)
i_vlck
|=
KEY_MODIFIER_CTRL
;
if
(
e
->
modifiers
()
&
Qt
::
MetaModifier
)
i_vlck
|=
KEY_MODIFIER_META
;
bool
found
=
false
;
bool
found
=
false
;
/* Look for some special keys */
/* Look for some special keys */
...
...
modules/gui/qt4/util/customwidgets.hpp
View file @
f6857c6a
...
@@ -88,5 +88,6 @@ signals:
...
@@ -88,5 +88,6 @@ signals:
class
QKeyEvent
;
class
QKeyEvent
;
int
qtEventToVLCKey
(
QKeyEvent
*
e
);
int
qtEventToVLCKey
(
QKeyEvent
*
e
);
QString
VLCKeyToString
(
int
val
);
QString
VLCKeyToString
(
int
val
);
int
qtKeyModifiersToVLC
(
QInputEvent
*
e
);
#endif
#endif
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