Debian Codegraph @

libqnapi/src/subconvert/formats/mpl2.h

raw symbols SCIP
1 /*****************************************************************************
2 ** QNapi
3 ** Copyright (C) 2008-2017 Piotr KrzemiƄski <[email protected]>
4 **
5 ** This program is free software; you can redistribute it and/or modify
6 ** it under the terms of the GNU General Public License as published by
7 ** the Free Software Foundation; either version 2 of the License, or
8 ** (at your option) any later version.
9 **
10 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
11 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12 **
13 *****************************************************************************/
14
15 #ifndef MPL2SUBTITLEFORMAT_H
16 #define MPL2SUBTITLEFORMAT_H
17
18 #include "subconvert/subtitleformat.h"
19
20 class MPL2SubtitleFormat : public SubtitleFormat {
21 public:
22 virtual ~MPL2SubtitleFormat() {}
23
24 bool isTimeBased() const { return true; }
25 QString formatName() const { return "MPL2"; }
26 QString defaultExtension() const { return "txt"; }
27
28 bool detect(const QStringList &lines) const;
29 SubFile decode(const QStringList &lines) const;
30 QStringList encode(const SubFile &subFile) const;
31
32 private:
33 QString encodeEntry(const SubEntry &entry) const;
34 QString encodeToken(const SubToken &entry) const;
35 };
36
37 #endif // MPL2SUBTITLEFORMAT_H