| 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 SUBFILE_H |
| 16 | #define SUBFILE_Hcxx . . $ `libqnapi/src/subconvert/subfile.h:16:9`! |
| 17 | |
| 18 | #include <QStringList> |
| 19 | #include <QVector> |
| 20 | |
| 21 | enum SubTokenTypecxx . . $ SubTokenType# { |
| 22 | STT_WScxx . . $ STT_WS. = 0, |
| 23 | STT_WORDcxx . . $ STT_WORD. = 1, |
| 24 | STT_NEWLINEcxx . . $ STT_NEWLINE. = 2, |
| 25 | STT_BOLDcxx . . $ STT_BOLD. = 3, |
| 26 | STT_BOLD_ENDcxx . . $ STT_BOLD_END. = 4, |
| 27 | STT_ITALICcxx . . $ STT_ITALIC. = 5, |
| 28 | STT_ITALIC_ENDcxx . . $ STT_ITALIC_END. = 6, |
| 29 | STT_UNDERLINEcxx . . $ STT_UNDERLINE. = 7, |
| 30 | STT_UNDERLINE_ENDcxx . . $ STT_UNDERLINE_END. = 8, |
| 31 | STT_FONTCOLORcxx . . $ STT_FONTCOLOR. = 9, |
| 32 | STT_FONTCOLOR_ENDcxx . . $ STT_FONTCOLOR_END. = 10 |
| 33 | }; |
| 34 | |
| 35 | struct SubTokencxx . . $ SubToken# { |
| 36 | SubTokenTypecxx . . $ SubTokenType# typecxx . . $ SubToken#type.; |
| 37 | QStringcxx . . $ QString# payloadcxx . . $ SubToken#payload.; |
| 38 | |
| 39 | bool operatorcxx . . $ SubToken#`operator==`(cc24c11a156bc920).==(const SubTokencxx . . $ SubToken#& other) const { |
| 40 | return typecxx . . $ SubToken#type. == other.typecxx . . $ SubToken#type. && payloadcxx . . $ SubToken#payload. ==cxx . . $ `operator==`(edf9e4f73813982f). other.payloadcxx . . $ SubToken#payload.; |
| 41 | } |
| 42 | }; |
| 43 | |
| 44 | struct SubEntrycxx . . $ SubEntry# { |
| 45 | long frameStartcxx . . $ SubEntry#frameStart., frameStopcxx . . $ SubEntry#frameStop.; |
| 46 | // if time-based, they represent frames as milliseconds |
| 47 | // if frame-based, they represent exact frame numbers |
| 48 | |
| 49 | QVectorcxx . . $ QVector#<SubTokencxx . . $ SubToken#> tokenscxx . . $ SubEntry#tokens.; |
| 50 | }; |
| 51 | |
| 52 | struct SubFilecxx . . $ SubFile# { |
| 53 | QVectorcxx . . $ QVector#<SubEntrycxx . . $ SubEntry#> entriescxx . . $ SubFile#entries.; |
| 54 | }; |
| 55 | |
| 56 | #endif // SUBFILE_H |