Changeset View
Changeset View
Standalone View
Standalone View
applets/notes/plugin/documenthandler.cpp
Context not available. | |||||
300 | emit fontFamilyChanged(); | 300 | emit fontFamilyChanged(); | ||
---|---|---|---|---|---|
301 | } | 301 | } | ||
302 | 302 | | |||
303 | void DocumentHandler::clearFormatting() | ||||
304 | { | ||||
305 | QTextCursor cursor = textCursor(); | ||||
306 | if (cursor.isNull()) | ||||
307 | return; | ||||
308 | | ||||
309 | QTextCharFormat fmt; | ||||
310 | fmt.setFontWeight(QFont::Normal); | ||||
311 | fmt.setFont(m_doc->defaultFont()); | ||||
312 | fmt.clearBackground(); | ||||
313 | | ||||
314 | if (!cursor.hasSelection()) | ||||
315 | cursor.select(QTextCursor::WordUnderCursor); | ||||
316 | cursor.setCharFormat(fmt); | ||||
317 | | ||||
318 | reset(); | ||||
319 | } | ||||
320 | | ||||
303 | QStringList DocumentHandler::defaultFontSizes() const | 321 | QStringList DocumentHandler::defaultFontSizes() const | ||
304 | { | 322 | { | ||
305 | // uhm... this is quite ugly | 323 | // uhm... this is quite ugly | ||
Context not available. |