MCPcopy Create free account
hub / github.com/QNapi/qnapi / encodeToken

Method encodeToken

libqnapi/src/subconvert/formats/subrip.cpp:149–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149QString SubRipSubtitleFormat::encodeToken(const SubToken &entry) const {
150 switch (entry.type) {
151 case STT_WS:
152 return " ";
153 case STT_WORD:
154 return entry.payload;
155 case STT_NEWLINE:
156 return "\n";
157 case STT_BOLD:
158 return "<b>";
159 case STT_BOLD_END:
160 return "</b>";
161 case STT_ITALIC:
162 return "<i>";
163 case STT_ITALIC_END:
164 return "</i>";
165 case STT_UNDERLINE:
166 return "<u>";
167 case STT_UNDERLINE_END:
168 return "</u>";
169 case STT_FONTCOLOR:
170 return QString("<font color=\"#%1\">").arg(entry.payload);
171 case STT_FONTCOLOR_END:
172 return "</font>";
173 default:
174 return "";
175 }
176}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected