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
13817879
Commit
13817879
authored
Sep 08, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - MI: Install an event filter to make click on timeLabel automatically switch between modes.
parent
d3a76dfe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+11
-4
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+4
-1
No files found.
modules/gui/qt4/main_interface.cpp
View file @
13817879
...
...
@@ -49,7 +49,7 @@
#ifdef WIN32
#define PREF_W 410
#define PREF_H 1
5
1
#define PREF_H 1
2
1
#else
#define PREF_W 450
#define PREF_H 160
...
...
@@ -145,7 +145,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
(
speedLabel
,
customContextMenuRequested
(
QPoint
),
this
,
showSpeedMenu
(
QPoint
)
);
CONNECT
(
timeLabel
,
customContextMenuRequested
(
QPoint
),
...
...
@@ -275,6 +275,7 @@ void MainInterface::setVLCWindowsTitle( QString aTitle )
}
}
void
MainInterface
::
handleMainUi
(
QSettings
*
settings
)
{
/* Create the main Widget and the mainLayout */
...
...
@@ -664,7 +665,7 @@ void MainInterface::setDisplay( float pos, int time, int length )
else
timeLabel
->
setText
(
" "
+
title
+
" "
);
}
void
MainInterface
::
toggleTimeDisplay
(
bool
b_remain
=
false
)
void
MainInterface
::
toggleTimeDisplay
()
{
b_remainingTime
=
(
b_remainingTime
?
false
:
true
);
}
...
...
@@ -803,7 +804,7 @@ void MainInterface::updateSystrayTooltipName( QString name )
else
{
sysTray
->
setToolTip
(
name
);
if
(
notificationEnabled
&&
(
isHidden
()
||
isMinimized
()
)
)
if
(
notificationEnabled
)
{
sysTray
->
showMessage
(
qtr
(
"VLC media player"
),
name
,
QSystemTrayIcon
::
NoIcon
,
4000
);
...
...
@@ -910,6 +911,12 @@ 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 @
13817879
...
...
@@ -70,6 +70,9 @@ protected:
void
dragMoveEvent
(
QDragMoveEvent
*
);
void
dragLeaveEvent
(
QDragLeaveEvent
*
);
void
closeEvent
(
QCloseEvent
*
);
bool
eventFilter
(
QObject
*
obj
,
QEvent
*
event
);
friend
class
VolumeClickHandler
;
private:
QSettings
*
settings
;
...
...
@@ -129,7 +132,7 @@ private slots:
void
setName
(
QString
);
void
setVLCWindowsTitle
(
QString
title
=
""
);
void
setDisplay
(
float
,
int
,
int
);
void
toggleTimeDisplay
(
bool
);
void
toggleTimeDisplay
();
void
setElapsedTime
();
void
setRemainTime
();
#if 0
...
...
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