| 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 | #include "subtitleformatsregistry.h"cxx . . $ `<file>/libqnapi/src/subconvert/subtitleformatsregistry.h`/ |
| 16 | |
| 17 | #include "subconvert/formats/microdvd.h"cxx . . $ `<file>/libqnapi/src/subconvert/formats/microdvd.h`/ |
| 18 | #include "subconvert/formats/mpl2.h"cxx . . $ `<file>/libqnapi/src/subconvert/formats/mpl2.h`/ |
| 19 | #include "subconvert/formats/subrip.h"cxx . . $ `<file>/libqnapi/src/subconvert/formats/subrip.h`/ |
| 20 | #include "subconvert/formats/tmplayer.h"cxx . . $ `<file>/libqnapi/src/subconvert/formats/tmplayer.h`/ |
| 21 | |
| 22 | SubtitleFormatsRegistrycxx . . $ SubtitleFormatsRegistry#::SubtitleFormatsRegistrycxx . . $ SubtitleFormatsRegistry#SubtitleFormatsRegistry(49f6e7a06ebc5aa8).() { |
| 23 | registerFormatcxx . . $ SubtitleFormatsRegistry#registerFormat(46173dd4a4ca6dac).(new MicroDVDSubtitleFormatcxx . . $ MicroDVDSubtitleFormat#); |
| 24 | registerFormatcxx . . $ SubtitleFormatsRegistry#registerFormat(46173dd4a4ca6dac).(new MPL2SubtitleFormatcxx . . $ MPL2SubtitleFormat#); |
| 25 | registerFormatcxx . . $ SubtitleFormatsRegistry#registerFormat(46173dd4a4ca6dac).(new SubRipSubtitleFormatcxx . . $ SubRipSubtitleFormat#); |
| 26 | registerFormatcxx . . $ SubtitleFormatsRegistry#registerFormat(46173dd4a4ca6dac).(new TMPlayerSubtitleFormatcxx . . $ TMPlayerSubtitleFormat#); |
| 27 | } |
| 28 | |
| 29 | QStringListcxx . . $ QStringList# SubtitleFormatsRegistrycxx . . $ SubtitleFormatsRegistry#::listFormatNamescxx . . $ SubtitleFormatsRegistry#listFormatNames(e1dbd5c4feadc8f5).() const { |
| 30 | QStringListcxx . . $ QStringList# formatNamescxx . . $ QStringList#QStringList(49f6e7a06ebc5aa8).; |
| 31 | foreachcxx . . $ `<external>/15045578679651060896/qglobal.h:1145:13`! (QString format, formats.keys()) { |
| 32 | formatNames <<cxx . . $ QStringList#`operator<<`(85116071a693d053). selectcxx . . $ SubtitleFormatsRegistry#select(849396506c5f6260).(format)->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).formatNamecxx . . $ SubtitleFormat#formatName(6ef7b6c27b00b43d).(); |
| 33 | } |
| 34 | return formatNames; |
| 35 | } |
| 36 | |
| 37 | QSharedPointercxx . . $ QSharedPointer#<const SubtitleFormatcxx . . $ SubtitleFormat#> SubtitleFormatsRegistrycxx . . $ SubtitleFormatsRegistry#::selectcxx . . $ SubtitleFormatsRegistry#select(849396506c5f6260).( |
| 38 | const QStringcxx . . $ QString# &format) const { |
| 39 | returncxx . . $ QSharedPointer#QSharedPointer(21100a343a80bccd). formatscxx . . $ QSharedPointer#QSharedPointer(5b65d0baf1030a65)..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(format.toLowercxx . . $ QString#toLower(dca2c5857e9adf82).(), QSharedPointercxx . . $ QSharedPointer#<SubtitleFormatcxx . . $ SubtitleFormat#>(0)); |
| 40 | } |
| 41 | |
| 42 | void SubtitleFormatsRegistrycxx . . $ SubtitleFormatsRegistry#::registerFormatcxx . . $ SubtitleFormatsRegistry#registerFormat(46173dd4a4ca6dac).(SubtitleFormatcxx . . $ SubtitleFormat# *format) { |
| 43 | formatscxx . . $ SubtitleFormatsRegistry#formats..insertcxx . . $ QMap#insert(929a1ed410fe8423).(format->formatNamecxx . . $ SubtitleFormat#formatName(6ef7b6c27b00b43d).().toLowercxx . . $ QString#toLower(30b3b70527b1c61a).(), |
| 44 | QSharedPointercxx . . $ QSharedPointer#<SubtitleFormatcxx . . $ SubtitleFormat#>(format)); |
| 45 | } |