1 /*  smplayer, GUI front-end for mplayer.
2     Copyright (C) 2006-2021 Ricardo Villalba <ricardo@smplayer.info>
3 
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8 
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13 
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 */
18 
19 #include "inputbookmark.h"
20 
InputBookmark(QWidget * parent,Qt::WindowFlags f)21 InputBookmark::InputBookmark( QWidget* parent, Qt::WindowFlags f )
22 	: QDialog(parent, f)
23 {
24 	setupUi(this);
25 	time_edit->setDisplayFormat("hh:mm:ss");
26 	name_edit->setFocus();
27 }
28 
~InputBookmark()29 InputBookmark::~InputBookmark() {
30 }
31 
setTime(int time)32 void InputBookmark::setTime(int time) {
33 	QTime t(0,0);
34 	time_edit->setTime(t.addSecs(time));
35 }
36 
time()37 int InputBookmark::time() {
38 	QTime t(0,0);
39 	return t.secsTo(time_edit->time());
40 }
41 
setName(const QString & name)42 void InputBookmark::setName(const QString & name) {
43 	name_edit->setText(name);
44 }
45 
name()46 QString InputBookmark::name() {
47 	return name_edit->text();
48 }
49 
50 #include "moc_inputbookmark.cpp"
51