forked from Subtivals/subtivals
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.h
66 lines (62 loc) · 1.29 KB
/
script.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef SCRIPT_H
#define SCRIPT_H
#include <QObject>
#include <QString>
#include <QList>
#include <QMap>
#include "style.h"
#include "event.h"
/*
* Scipts from an ASS file : union of events and styles.
*/
class Script : public QObject
{
Q_OBJECT
public:
/*
* Constructs a script from an ASS file.
*/
explicit Script(const QString &p_fileName, QObject *parent = 0);
/*
* Returns the name of the ASS file used to create the script.
*/
const QString &fileName() const;
/*
* Returns the script title.
*/
const QString &title() const;
/*
* Returns a style from its name.
*/
const Style *style(const QString &p_name) const;
/*
* Return the number of events in the script.
*/
int eventsCount() const;
/*
* Returns an iterator on the events of the script.
*/
const QListIterator<Event *> events() const;
/*
* Returns the event at the given index.
*/
const Event * eventAt(int i) const;
private:
/*
* Script ASS file name.
*/
QString m_fileName;
/*
* Script title.
*/
QString m_title;
/*
* Script styles map.
*/
QMap<QString, Style *> m_styles;
/*
* Script events list.
*/
QList<Event *> m_events;
};
#endif // SCRIPT_H