formats["%DU"] = url;
}
-QString Style::mircToInternal(QString mirc) {
- mirc.replace('%', "%%"); // escape % just to be sure
- mirc.replace('\x02', "%B");
- mirc.replace('\x03', "%C");
- mirc.replace('\x0f', "%O");
- mirc.replace('\x12', "%R");
- mirc.replace('\x16', "%R");
- mirc.replace('\x1d', "%S");
- mirc.replace('\x1f', "%U");
- return mirc;
-}
-
/** Returns a string stripped of format codes, and a list of FormatRange objects
* describing the formats of the string.
* \param s string in internal format (% style format codes)
*/
-Style::FormattedString Style::internalToFormatted(QString s) {
+Style::StyledString Style::formattedToStyled(QString s) {
QHash<QString, int> toggles;
QString p;
- FormattedString sf;
+ StyledString sf;
QTextLayout::FormatRange rng;
rng.format = formats["default"]; rng.start = 0; rng.length = -1; sf.formats.append(rng);
toggles["default"] = sf.formats.count() - 1;