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
a587c752
Commit
a587c752
authored
Feb 15, 2012
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: trigger epg on program doubleclick
parent
e6d4348b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
7 deletions
+19
-7
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+1
-1
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+15
-4
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+3
-2
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
a587c752
...
...
@@ -550,7 +550,7 @@ void CoverArtLabel::askForUpdate()
}
TimeLabel
::
TimeLabel
(
intf_thread_t
*
_p_intf
,
TimeLabel
::
Display
_displayType
)
:
QLabel
(),
p_intf
(
_p_intf
),
bufTimer
(
new
QTimer
(
this
)
),
:
Clickable
QLabel
(),
p_intf
(
_p_intf
),
bufTimer
(
new
QTimer
(
this
)
),
buffering
(
false
),
showBuffering
(
false
),
bufVal
(
-
1
),
displayType
(
_displayType
)
{
b_remainingTime
=
false
;
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
a587c752
...
...
@@ -118,7 +118,20 @@ private slots:
};
#endif
class
TimeLabel
:
public
QLabel
class
ClickableQLabel
:
public
QLabel
{
Q_OBJECT
public:
virtual
void
mouseDoubleClickEvent
(
QMouseEvent
*
event
)
{
Q_UNUSED
(
event
);
emit
doubleClicked
();
}
signals:
void
doubleClicked
();
};
class
TimeLabel
:
public
ClickableQLabel
{
Q_OBJECT
public:
...
...
@@ -142,7 +155,7 @@ protected:
if
(
displayType
!=
TimeLabel
::
Both
)
return
;
event
->
accept
();
toggleTimeDisplay
();
emit
timeLabelDoubleClicked
(
);
ClickableQLabel
::
mouseDoubleClickEvent
(
event
);
}
private:
intf_thread_t
*
p_intf
;
...
...
@@ -159,8 +172,6 @@ private:
char
psz_time
[
MSTRTIME_MAX_SIZE
];
void
toggleTimeDisplay
();
void
paintEvent
(
QPaintEvent
*
);
signals:
void
timeLabelDoubleClicked
();
private
slots
:
void
setDisplayPosition
(
float
pos
,
int64_t
time
,
int
length
);
void
setDisplayPosition
(
float
pos
);
...
...
modules/gui/qt4/main_interface.cpp
View file @
a587c752
...
...
@@ -459,7 +459,7 @@ inline void MainInterface::createStatusBar()
QStatusBar
*
statusBarr
=
statusBar
();
TimeLabel
*
timeLabel
=
new
TimeLabel
(
p_intf
);
nameLabel
=
new
QLabel
(
this
);
nameLabel
=
new
ClickableQLabel
(
);
nameLabel
->
setTextInteractionFlags
(
Qt
::
TextSelectableByMouse
|
Qt
::
TextSelectableByKeyboard
);
SpeedLabel
*
speedLabel
=
new
SpeedLabel
(
p_intf
,
this
);
...
...
@@ -480,11 +480,12 @@ inline void MainInterface::createStatusBar()
statusBarr
->
addPermanentWidget
(
speedLabel
,
0
);
statusBarr
->
addPermanentWidget
(
timeLabel
,
0
);
CONNECT
(
nameLabel
,
doubleClicked
(),
THEDP
,
epgDialog
()
);
/* timeLabel behaviour:
- double clicking opens the goto time dialog
- right-clicking and clicking just toggle between remaining and
elapsed time.*/
CONNECT
(
timeLabel
,
timeLabelD
oubleClicked
(),
THEDP
,
gotoTimeDialog
()
);
CONNECT
(
timeLabel
,
d
oubleClicked
(),
THEDP
,
gotoTimeDialog
()
);
CONNECT
(
THEMIM
->
getIM
(),
encryptionChanged
(
bool
),
this
,
showCryptedLabel
(
bool
)
);
...
...
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