MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / setNote

Method setNote

html/noteformatter.cpp:68–86  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

66 attachment rather than doing it as an attachment.
67 */
68void 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 */

Callers 3

exportAsPdfMethod · 0.45
sendEmailMethod · 0.45
renderMethod · 0.45

Calls 1

isSetMethod · 0.45

Tested by

no test coverage detected