Set the note we are currently formatting. The pdfPreview is an indication if we should generate a picture for the attachment rather than doing it as an attachment. */
| 66 | attachment rather than doing it as an attachment. |
| 67 | */ |
| 68 | void NoteFormatter::setNote(Note n, bool pdfPreview) { |
| 69 | this->pdfPreview = pdfPreview; |
| 70 | this->note = n; |
| 71 | content = ""; |
| 72 | //this->enableHighlight = true; |
| 73 | readOnly = false; |
| 74 | inkNote = false; |
| 75 | NoteAttributes attributes; |
| 76 | if (note.attributes.isSet()) { |
| 77 | attributes = note.attributes; |
| 78 | QString contentClass; |
| 79 | if (attributes.contentClass.isSet()) |
| 80 | contentClass = attributes.contentClass; |
| 81 | if (contentClass != "") { |
| 82 | QLOG_DEBUG() << "Content class not empty. Setting read-only."; |
| 83 | readOnly = true; |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | |
| 89 | /* Return the formatted content */ |
no test coverage detected