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
65e80048
Commit
65e80048
authored
Nov 24, 2014
by
Ludovic Fauvet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: better wording for the resume playback code
parent
5c8d3f06
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
46 deletions
+46
-46
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+1
-1
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+2
-2
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+35
-35
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+8
-8
No files found.
modules/gui/qt4/input_manager.cpp
View file @
65e80048
...
...
@@ -136,7 +136,7 @@ void InputManager::setInput( input_thread_t *_p_input )
!
var_GetFloat
(
p_input
,
"start-time"
)
&&
!
var_GetFloat
(
p_input
,
"stop-time"
)
)
{
emit
continu
ePlayback
(
(
int64_t
)
i_time
*
1000
);
emit
resum
ePlayback
(
(
int64_t
)
i_time
*
1000
);
}
}
}
...
...
modules/gui/qt4/input_manager.hpp
View file @
65e80048
...
...
@@ -223,8 +223,8 @@ signals:
void
titleChanged
(
bool
);
void
chapterChanged
(
bool
);
void
inputCanSeek
(
bool
);
/// You can
continueP
layback
void
continu
ePlayback
(
int64_t
);
/// You can
resume p
layback
void
resum
ePlayback
(
int64_t
);
/// Statistics are updated
void
statisticsUpdated
(
input_item_t
*
);
void
infoChanged
(
input_item_t
*
);
...
...
modules/gui/qt4/main_interface.cpp
View file @
65e80048
...
...
@@ -366,13 +366,13 @@ void MainInterface::reloadPrefs()
}
}
void
MainInterface
::
create
ContinueDialog
(
QWidget
*
w
)
void
MainInterface
::
create
ResumePanel
(
QWidget
*
w
)
{
/* Create non-modal
continueDialog
*/
continueDialog
=
new
QWidget
(
w
);
continueDialog
->
hide
();
QHBoxLayout
*
continueDialogLayout
=
new
QHBoxLayout
(
continueDialog
);
continueDialogLayout
->
setSpacing
(
0
);
continueDialog
Layout
->
setMargin
(
0
);
/* Create non-modal
resumePanel
*/
resumePanel
=
new
QWidget
(
w
);
resumePanel
->
hide
();
QHBoxLayout
*
resumePanelLayout
=
new
QHBoxLayout
(
resumePanel
);
resumePanelLayout
->
setSpacing
(
0
);
resumePanel
Layout
->
setMargin
(
0
);
QLabel
*
continuePixmapLabel
=
new
QLabel
();
continuePixmapLabel
->
setPixmap
(
QPixmap
(
":/menu/help"
)
);
...
...
@@ -380,63 +380,63 @@ void MainInterface::createContinueDialog( QWidget *w )
QLabel
*
continueLabel
=
new
QLabel
(
qtr
(
"Do you want to restart the playback where left off?"
)
);
QToolButton
*
cancel
=
new
QToolButton
(
continueDialog
);
QToolButton
*
cancel
=
new
QToolButton
(
resumePanel
);
cancel
->
setAutoRaise
(
true
);
cancel
->
setText
(
"X"
);
QPushButton
*
ok
=
new
QPushButton
(
qtr
(
"&Continue"
)
);
continueDialog
Layout
->
addWidget
(
continuePixmapLabel
);
continueDialog
Layout
->
addWidget
(
continueLabel
);
continueDialog
Layout
->
addStretch
(
1
);
continueDialog
Layout
->
addWidget
(
ok
);
continueDialog
Layout
->
addWidget
(
cancel
);
resumePanel
Layout
->
addWidget
(
continuePixmapLabel
);
resumePanel
Layout
->
addWidget
(
continueLabel
);
resumePanel
Layout
->
addStretch
(
1
);
resumePanel
Layout
->
addWidget
(
ok
);
resumePanel
Layout
->
addWidget
(
cancel
);
continueTimer
=
new
QTimer
(
continueDialog
);
continu
eTimer
->
setSingleShot
(
true
);
continu
eTimer
->
setInterval
(
6000
);
resumeTimer
=
new
QTimer
(
resumePanel
);
resum
eTimer
->
setSingleShot
(
true
);
resum
eTimer
->
setInterval
(
6000
);
CONNECT
(
continueTimer
,
timeout
(),
this
,
hideContinueDialog
()
);
CONNECT
(
resumeTimer
,
timeout
(),
this
,
hideResumePanel
()
);
CONNECT
(
cancel
,
clicked
(),
this
,
hide
ContinueDialog
()
);
BUTTONACT
(
ok
,
continu
ePlayback
()
);
CONNECT
(
cancel
,
clicked
(),
this
,
hide
ResumePanel
()
);
BUTTONACT
(
ok
,
resum
ePlayback
()
);
CONNECT
(
THEMIM
->
getIM
(),
continuePlayback
(
int64_t
),
this
,
showContinueDialog
(
int64_t
)
);
CONNECT
(
THEMIM
->
getIM
(),
resumePlayback
(
int64_t
),
this
,
showResumePanel
(
int64_t
)
);
w
->
layout
()
->
addWidget
(
continueDialog
);
w
->
layout
()
->
addWidget
(
resumePanel
);
}
void
MainInterface
::
show
ContinueDialog
(
int64_t
_time
)
{
void
MainInterface
::
show
ResumePanel
(
int64_t
_time
)
{
int
setting
=
var_InheritInteger
(
p_intf
,
"qt-continue"
);
if
(
setting
==
0
)
return
;
i_
continu
eTime
=
_time
;
i_
resum
eTime
=
_time
;
if
(
setting
==
2
)
continu
ePlayback
();
resum
ePlayback
();
else
{
continueDialog
->
setVisible
(
true
);
continu
eTimer
->
start
();
resumePanel
->
setVisible
(
true
);
resum
eTimer
->
start
();
}
}
void
MainInterface
::
hide
ContinueDialog
()
void
MainInterface
::
hide
ResumePanel
()
{
if
(
continueDialog
->
isVisible
()
)
if
(
resumePanel
->
isVisible
()
)
{
if
(
!
isFullScreen
()
&&
!
isMaximized
()
)
resize
(
width
(),
height
()
-
continueDialog
->
height
()
);
continueDialog
->
hide
();
continu
eTimer
->
stop
();
resize
(
width
(),
height
()
-
resumePanel
->
height
()
);
resumePanel
->
hide
();
resum
eTimer
->
stop
();
}
}
void
MainInterface
::
continu
ePlayback
()
void
MainInterface
::
resum
ePlayback
()
{
var_SetTime
(
THEMIM
->
getInput
(),
"time"
,
i_
continu
eTime
);
hide
ContinueDialog
();
var_SetTime
(
THEMIM
->
getInput
(),
"time"
,
i_
resum
eTime
);
hide
ResumePanel
();
}
void
MainInterface
::
createMainWidget
(
QSettings
*
creationSettings
)
...
...
@@ -448,7 +448,7 @@ void MainInterface::createMainWidget( QSettings *creationSettings )
main
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mainLayout
->
setSpacing
(
0
);
mainLayout
->
setMargin
(
0
);
create
ContinueDialog
(
main
);
create
ResumePanel
(
main
);
/* */
stackCentralW
=
new
QVLCStackedWidget
(
main
);
...
...
@@ -754,7 +754,7 @@ void MainInterface::releaseVideoSlot( void )
videoWidget
->
release
();
setVideoOnTop
(
false
);
setVideoFullScreen
(
false
);
hide
ContinueDialog
();
hide
ResumePanel
();
if
(
stackCentralW
->
currentWidget
()
==
videoWidget
)
restoreStackOldWidget
();
...
...
modules/gui/qt4/main_interface.hpp
View file @
65e80048
...
...
@@ -113,7 +113,7 @@ private:
void
createMainWidget
(
QSettings
*
);
void
createStatusBar
();
void
createPlaylist
();
void
create
ContinueDialog
(
QWidget
*
w
);
void
create
ResumePanel
(
QWidget
*
w
);
/* Systray */
void
createSystray
();
...
...
@@ -149,10 +149,10 @@ private:
PlaylistWidget
*
playlistWidget
;
//VisualSelector *visualSelector;
/*
continue
*/
QWidget
*
continueDialog
;
QTimer
*
continu
eTimer
;
int64_t
i_
continu
eTime
;
/*
resume panel
*/
QWidget
*
resumePanel
;
QTimer
*
resum
eTimer
;
int64_t
i_
resum
eTime
;
/* Status Bar */
QLabel
*
nameLabel
;
...
...
@@ -260,9 +260,9 @@ private slots:
void
setBoss
();
void
setRaise
();
void
show
ContinueDialog
(
int64_t
);
void
hide
ContinueDialog
();
void
continu
ePlayback
();
void
show
ResumePanel
(
int64_t
);
void
hide
ResumePanel
();
void
resum
ePlayback
();
signals:
void
askGetVideo
(
WId
*
,
struct
vout_window_t
*
,
unsigned
*
,
unsigned
*
);
...
...
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