MCPcopy Create free account
hub / github.com/KDE/okular / reloadInfo

Method reloadInfo

part/annotwindow.cpp:270–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270void AnnotWindow::reloadInfo()
271{
272 QColor newcolor;
273 if (m_annot->subType() == Okular::Annotation::AText) {
274 Okular::TextAnnotation *textAnn = static_cast<Okular::TextAnnotation *>(m_annot);
275 if (textAnn->textType() == Okular::TextAnnotation::InPlace && textAnn->inplaceIntent() == Okular::TextAnnotation::TypeWriter) {
276 newcolor = QColor(0xfd, 0xfd, 0x96);
277 }
278 }
279 if (!newcolor.isValid()) {
280 newcolor = m_annot->style().color().isValid() ? QColor(m_annot->style().color().red(), m_annot->style().color().green(), m_annot->style().color().blue(), 255) : Qt::yellow;
281 }
282 if (newcolor != m_color) {
283 m_color = newcolor;
284 setPalette(QPalette(m_color));
285 QPalette pl = textEdit->palette();
286 pl.setColor(QPalette::Base, m_color);
287 textEdit->setPalette(pl);
288 }
289 m_title->setAuthor(m_annot->author());
290 m_title->setDate(m_annot->modificationDate());
291}
292
293int AnnotWindow::pageNumber() const
294{

Callers 1

notifyPageChangedMethod · 0.80

Calls 10

subTypeMethod · 0.80
inplaceIntentMethod · 0.80
QColorClass · 0.70
textTypeMethod · 0.45
isValidMethod · 0.45
colorMethod · 0.45
setColorMethod · 0.45
setAuthorMethod · 0.45
authorMethod · 0.45
modificationDateMethod · 0.45

Tested by

no test coverage detected