Ejemplo n.º 1
0
/*
  Saving notes's option for pasting to HTML notes only plaintext
*/
void Settings::setNotePastePlaintext(bool v)
{
	if(note_paste_plaintext != v)
	{
		note_paste_plaintext = v;
		config.setValue("NotePastePlaintext", note_paste_plaintext);
		emit NotePastePlaintextChanged();
	}
}
Ejemplo n.º 2
0
HtmlNote::HtmlNote(const QFileInfo& fileinfo, Note::Type type_new)
    : Note(fileinfo, type_new)
{
    text_edit = new TextEdit();

    load(); //loading note's content

    connect(text_edit, SIGNAL(textChanged()), this, SLOT(contentChanged()));

    connect(text_edit, SIGNAL(currentCharFormatChanged(const QTextCharFormat &)),
            this, SLOT(currentCharFormatChanged(const QTextCharFormat &)));

    text_edit->setAcceptRichText(!settings.getNotePastePlaintext());
    connect(&settings, SIGNAL(NotePastePlaintextChanged()), this, SLOT(noteNotePastePlaintextChanged()));
}