| 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 SUBTITLELANGUAGE_H |
| 16 | #define SUBTITLELANGUAGE_H |
| 17 | |
| 18 | #include <QObject> |
| 19 | #include <QStringList> |
| 20 | |
| 21 | class SubtitleLanguage { |
| 22 | public: |
| 23 | SubtitleLanguage(QString source = ""); |
| 24 | |
| 25 | void setLanguage(QString source); |
| 26 | |
| 27 | QString toTwoLetter(); |
| 28 | QString toTriLetter(); |
| 29 | QString toFullName(); |
| 30 | |
| 31 | QStringList listLanguages(); |
| 32 | QStringList listLanguageTwoLetterCodes(); |
| 33 | |
| 34 | private: |
| 35 | QStringList codes2l, codes3l, names; |
| 36 | int idx; |
| 37 | |
| 38 | void fill_tables(); |
| 39 | }; |
| 40 | |
| 41 | #endif |