Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
230b1c05
Commit
230b1c05
authored
Sep 09, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - MainInterface, avoid the bug that makes the popupMenu toggle the TimeDisplay().
parent
4d9d3b9b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
12 deletions
+17
-12
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+13
-1
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+4
-9
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+0
-2
No files found.
modules/gui/qt4/components/interface_widgets.hpp
View file @
230b1c05
...
...
@@ -186,7 +186,7 @@ public:
virtual
~
VolumeClickHandler
()
{};
bool
eventFilter
(
QObject
*
obj
,
QEvent
*
e
)
{
if
(
e
->
type
()
==
QEvent
::
MouseButtonPress
)
if
(
e
->
type
()
==
QEvent
::
MouseButtonPress
)
{
aout_VolumeMute
(
p_intf
,
NULL
);
audio_volume_t
i_volume
;
...
...
@@ -201,6 +201,18 @@ private:
intf_thread_t
*
p_intf
;
};
#include <QLabel>
#include <QMouseEvent>
class
TimeLabel
:
public
QLabel
{
Q_OBJECT
void
mousePressEvent
(
QMouseEvent
*
event
)
{
if
(
event
->
button
()
==
Qt
::
LeftButton
)
emit
timeLabelClicked
();
}
signals:
void
timeLabelClicked
();
};
/******************** Playlist Widgets ****************/
#include <QModelIndex>
...
...
modules/gui/qt4/main_interface.cpp
View file @
230b1c05
...
...
@@ -137,7 +137,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
* TODO: do we add a label for the current Volume ?
**/
b_remainingTime
=
false
;
timeLabel
=
new
Q
Label
;
timeLabel
=
new
Time
Label
;
nameLabel
=
new
QLabel
;
speedLabel
=
new
QLabel
(
"1.00x"
);
timeLabel
->
setFrameStyle
(
QFrame
::
Sunken
|
QFrame
::
Panel
);
...
...
@@ -147,7 +147,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
statusBar
()
->
addPermanentWidget
(
timeLabel
,
2
);
speedLabel
->
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
timeLabel
->
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
timeLabel
->
installEventFilter
(
this
);
CONNECT
(
timeLabel
,
timeLabelClicked
(),
this
,
toggleTimeDisplay
()
);
CONNECT
(
speedLabel
,
customContextMenuRequested
(
QPoint
),
this
,
showSpeedMenu
(
QPoint
)
);
CONNECT
(
timeLabel
,
customContextMenuRequested
(
QPoint
),
...
...
@@ -675,6 +675,7 @@ void MainInterface::setDisplayPosition( float pos, int time, int length )
void
MainInterface
::
toggleTimeDisplay
()
{
msg_Dbg
(
p_intf
,
"coincoin"
);
b_remainingTime
=
(
b_remainingTime
?
false
:
true
);
}
...
...
@@ -697,7 +698,7 @@ void MainInterface::setStatus( int status )
void
MainInterface
::
setRate
(
int
rate
)
{
QString
str
;
str
.
setNum
(
(
1000
/
(
double
)
rate
),
'f'
,
2
);
str
.
setNum
(
(
1000
/
(
double
)
rate
),
'f'
,
2
);
str
.
append
(
"x"
);
speedLabel
->
setText
(
str
);
speedControl
->
updateControls
(
rate
);
...
...
@@ -932,12 +933,6 @@ void MainInterface::customEvent( QEvent *event )
}
}
bool
MainInterface
::
eventFilter
(
QObject
*
obj
,
QEvent
*
event
)
{
if
(
(
obj
==
timeLabel
)
&&
(
event
->
type
()
==
QEvent
::
MouseButtonPress
)
)
toggleTimeDisplay
();
}
void
MainInterface
::
keyPressEvent
(
QKeyEvent
*
e
)
{
int
i_vlck
=
qtEventToVLCKey
(
e
);
...
...
modules/gui/qt4/main_interface.hpp
View file @
230b1c05
...
...
@@ -72,8 +72,6 @@ protected:
void
dragLeaveEvent
(
QDragLeaveEvent
*
);
void
closeEvent
(
QCloseEvent
*
);
bool
eventFilter
(
QObject
*
obj
,
QEvent
*
event
);
friend
class
VolumeClickHandler
;
private:
QSettings
*
settings
;
...
...
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