/* Saving notes's font */ void Settings::setNoteFont(const QFont& v) { if(note_font != v) { note_font = v; config.setValue("NoteFont", note_font.toString()); emit NoteFontChanged(); } }
TextEdit::TextEdit() : QTextEdit() { highlighter = new Highlighter(document()); connect(&settings, SIGNAL(NoteHighlightChanged()), highlighter, SLOT(rehighlight())); setFont(settings.getNoteFont()); connect(&settings, SIGNAL(NoteFontChanged()), this, SLOT(fontChanged())); setMouseTracking(settings.getNoteLinksOpen()); connect(&settings, SIGNAL(NoteLinkOpenChanged()), this, SLOT(linkOpenChanged())); }