Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
8be768a9
Commit
8be768a9
authored
Nov 19, 2011
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: Go To Time dialog: set default time to current (fix #5511)
parent
c40e7aaf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
modules/gui/qt4/dialogs/gototime.cpp
modules/gui/qt4/dialogs/gototime.cpp
+22
-2
modules/gui/qt4/dialogs/gototime.hpp
modules/gui/qt4/dialogs/gototime.hpp
+3
-0
No files found.
modules/gui/qt4/dialogs/gototime.cpp
View file @
8be768a9
...
...
@@ -62,22 +62,38 @@ GotoTimeDialog::GotoTimeDialog( intf_thread_t *_p_intf)
timeEdit
->
setAlignment
(
Qt
::
AlignRight
);
timeEdit
->
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Minimum
);
QPushButton
*
resetButton
=
new
QPushButton
(
QIcon
(
":/update"
),
""
);
resetButton
->
setToolTip
(
qtr
(
"Reset"
)
);
mainLayout
->
addWidget
(
timeIntro
,
0
,
0
,
1
,
1
);
mainLayout
->
addWidget
(
timeEdit
,
0
,
1
,
1
,
1
);
mainLayout
->
addWidget
(
resetButton
,
0
,
2
,
1
,
1
);
mainLayout
->
addWidget
(
buttonBox
,
1
,
0
,
1
,
2
);
mainLayout
->
addWidget
(
buttonBox
,
1
,
0
,
1
,
3
);
BUTTONACT
(
gotoButton
,
close
()
);
BUTTONACT
(
cancelButton
,
cancel
()
);
BUTTONACT
(
resetButton
,
reset
()
);
}
GotoTimeDialog
::~
GotoTimeDialog
()
{
}
void
GotoTimeDialog
::
toggleVisible
()
{
reset
();
if
(
!
isVisible
()
&&
THEMIM
->
getIM
()
->
hasInput
()
)
{
int64_t
i_time
=
var_GetTime
(
THEMIM
->
getInput
(),
"time"
);
timeEdit
->
setTime
(
timeEdit
->
time
().
addSecs
(
i_time
/
1000000
)
);
}
QVLCDialog
::
toggleVisible
();
}
void
GotoTimeDialog
::
cancel
()
{
timeEdit
->
setTime
(
QTime
(
0
,
0
,
0
)
);
reset
(
);
toggleVisible
();
}
...
...
@@ -90,5 +106,9 @@ void GotoTimeDialog::close()
var_SetTime
(
THEMIM
->
getInput
(),
"time"
,
i_time
);
}
toggleVisible
();
}
void
GotoTimeDialog
::
reset
()
{
timeEdit
->
setTime
(
QTime
(
0
,
0
,
0
)
);
}
modules/gui/qt4/dialogs/gototime.hpp
View file @
8be768a9
...
...
@@ -39,8 +39,11 @@ private:
private
slots
:
void
close
();
void
cancel
();
void
reset
();
friend
class
Singleton
<
GotoTimeDialog
>
;
public:
void
toggleVisible
();
};
#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