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

Method slotSetColor

part/annotationactionhandler.cpp:495–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493}
494
495void AnnotationActionHandlerPrivate::slotSetColor(AnnotationColor colorType, const QColor &color)
496{
497 QColor selectedColor(color);
498 if (!selectedColor.isValid()) {
499 selectedColor = QColorDialog::getColor(currentColor, nullptr, i18nc("@title:window", "Select color"));
500 if (!selectedColor.isValid()) {
501 return;
502 }
503 }
504 if (colorType == AnnotationColor::Color) {
505 currentColor = selectedColor;
506 annotator->setAnnotationColor(selectedColor);
507 } else if (colorType == AnnotationColor::InnerColor) {
508 currentInnerColor = selectedColor;
509 annotator->setAnnotationInnerColor(selectedColor);
510 }
511}
512
513void AnnotationActionHandlerPrivate::slotSelectAnnotationFont()
514{

Callers

nothing calls this directly

Calls 3

setAnnotationColorMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected