1
/* smplayer, GUI front-end for mplayer.
2
Copyright (C) 2006-2009 Ricardo Villalba <rvm@escomposlinux.org>
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.
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.
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
19
#ifndef _TITLETRACKS_H_
20
#define _TITLETRACKS_H_
25
/* Class to store info about DVD titles */
30
TitleData() { _name = ""; _duration = 0; _ID = -1; _chapters = 0; _angles = 0; };
33
void setName( const QString & n ) { _name = n; };
34
void setDuration( double d ) { _duration = d; };
35
void setChapters( int n ) { _chapters = n; };
36
void setAngles( int n ) { _angles = n; };
37
void setID( int id ) { _ID = id; };
39
QString name() const { return _name; };
40
double duration() const { return _duration; };
41
int chapters() const { return _chapters; };
42
int angles() const { return _angles; };
43
int ID() const { return _ID; };
45
QString displayName() const {
48
if (!_name.isEmpty()) {
52
dname = QString::number(_ID);
55
dname += " ("+ Helper::formatTime( (int) _duration ) +")";
80
void addName(int ID, QString name);
81
void addDuration(int ID, double duration);
82
void addChapters(int ID, int n);
83
void addAngles(int ID, int n);
87
bool existsItemAt(int n);
89
TitleData itemAt(int n);
90
TitleData item(int ID);
94
typedef QMap <int, TitleData> TitleMap;