Changeset View
Changeset View
Standalone View
Standalone View
src/lib/format.cpp
Show First 20 Lines • Show All 200 Lines • ▼ Show 20 Line(s) | 197 | { | |||
---|---|---|---|---|---|
201 | return d->style.hasStrikeThrough ? d->style.strikeThrough : theme.isStrikeThrough(d->defaultStyle); | 201 | return d->style.hasStrikeThrough ? d->style.strikeThrough : theme.isStrikeThrough(d->defaultStyle); | ||
202 | } | 202 | } | ||
203 | 203 | | |||
204 | bool Format::spellCheck() const | 204 | bool Format::spellCheck() const | ||
205 | { | 205 | { | ||
206 | return d->spellCheck; | 206 | return d->spellCheck; | ||
207 | } | 207 | } | ||
208 | 208 | | |||
209 | bool Format::hasBoldOverride() const | ||||
210 | { | ||||
211 | return d->style.hasBold; | ||||
212 | } | ||||
213 | | ||||
214 | bool Format::hasItalicOverride() const | ||||
215 | { | ||||
216 | return d->style.hasItalic; | ||||
217 | } | ||||
218 | | ||||
219 | bool Format::hasUnderlineOverride() const | ||||
220 | { | ||||
221 | return d->style.hasUnderline; | ||||
222 | } | ||||
223 | | ||||
224 | bool Format::hasStrikeThroughOverride() const | ||||
225 | { | ||||
226 | return d->style.hasStrikeThrough; | ||||
227 | } | ||||
228 | | ||||
229 | bool Format::hasTextColorOverride() const | ||||
230 | { | ||||
231 | return d->style.textColor; | ||||
232 | } | ||||
233 | | ||||
234 | bool Format::hasBackgroundColorOverride() const | ||||
235 | { | ||||
236 | return d->style.backgroundColor; | ||||
237 | } | ||||
238 | | ||||
239 | bool Format::hasSelectedTextColorOverride() const | ||||
240 | { | ||||
241 | return d->style.selectedTextColor; | ||||
242 | } | ||||
243 | | ||||
244 | bool Format::hasSelectedBackgroundColorOverride() const | ||||
245 | { | ||||
246 | return d->style.selectedBackgroundColor; | ||||
247 | } | ||||
248 | | ||||
209 | 249 | | |||
210 | void FormatPrivate::load(QXmlStreamReader& reader) | 250 | void FormatPrivate::load(QXmlStreamReader& reader) | ||
211 | { | 251 | { | ||
212 | name = reader.attributes().value(QStringLiteral("name")).toString(); | 252 | name = reader.attributes().value(QStringLiteral("name")).toString(); | ||
213 | defaultStyle = stringToDefaultFormat(reader.attributes().value(QStringLiteral("defStyleNum"))); | 253 | defaultStyle = stringToDefaultFormat(reader.attributes().value(QStringLiteral("defStyleNum"))); | ||
214 | 254 | | |||
215 | QStringRef attribute = reader.attributes().value(QStringLiteral("color")); | 255 | QStringRef attribute = reader.attributes().value(QStringLiteral("color")); | ||
216 | if (!attribute.isEmpty()) { | 256 | if (!attribute.isEmpty()) { | ||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |