| 705 | } |
| 706 | |
| 707 | TextAreaEdit::TextAreaEdit(Okular::FormFieldText *text, PageView *pageView) |
| 708 | : KTextEdit(pageView->viewport()) |
| 709 | , FormWidgetIface(this, text) |
| 710 | { |
| 711 | setAcceptRichText(text->isRichText()); |
| 712 | setCheckSpellingEnabled(text->canBeSpellChecked()); |
| 713 | setAlignment(text->textAlignment()); |
| 714 | setPlainText(text->text()); |
| 715 | setUndoRedoEnabled(false); |
| 716 | |
| 717 | connect(this, &QTextEdit::textChanged, this, &TextAreaEdit::slotChanged); |
| 718 | connect(this, &QTextEdit::cursorPositionChanged, this, &TextAreaEdit::slotChanged); |
| 719 | connect(this, &KTextEdit::aboutToShowContextMenu, this, &TextAreaEdit::slotUpdateUndoAndRedoInContextMenu); |
| 720 | m_prevCursorPos = textCursor().position(); |
| 721 | m_prevAnchorPos = textCursor().anchor(); |
| 722 | m_editing = false; |
| 723 | setVisible(text->isVisible()); |
| 724 | } |
| 725 | |
| 726 | TextAreaEdit::~TextAreaEdit() |
| 727 | { |
nothing calls this directly
no test coverage detected