46class QUENTIER_EXPORT NoteEditor :
public QWidget
51 QWidget * parent =
nullptr,
52#
if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
53 Qt::WindowFlags flags = {});
55 Qt::WindowFlags flags = 0);
58 ~NoteEditor()
noexcept override;
81 local_storage::ILocalStoragePtr localStorage,
83 QThread * backgroundJobsThread =
nullptr,
84 enml::IDecryptedTextCachePtr decryptedTextCache =
nullptr);
106 [[nodiscard]] const QUndoStack *
undoStack() const noexcept;
186 [[nodiscard]] QString selectedText() const noexcept;
187 [[nodiscard]]
bool hasSelection() const noexcept;
189 [[nodiscard]]
bool spellCheckEnabled() const noexcept;
191 [[nodiscard]]
bool print(
192 QPrinter & printer,
ErrorString & errorDescription);
194 [[nodiscard]]
bool exportToPdf(
195 const QString & absoluteFilePath,
ErrorString & errorDescription);
197 [[nodiscard]]
bool exportToEnex(
198 const QStringList & tagNames, QString & enex,
229 qevercloud::Note note, qevercloud::Notebook notebook);
262 QString userId, QString shardId, QString noteGuid);
276 QString url, QString userId, QString shardId, QString noteGuid);
278 void convertedToNote(qevercloud::Note note);
281 void noteEditorHtmlUpdated(QString html);
283 void currentNoteChanged(qevercloud::Note note);
285 void spellCheckerNotReady();
286 void spellCheckerReady();
303 ErrorString errorDescription, QString noteLocalId);
307 void textBoldState(
bool state);
308 void textItalicState(
bool state);
309 void textUnderlineState(
bool state);
310 void textStrikethroughState(
bool state);
311 void textAlignLeftState(
bool state);
312 void textAlignCenterState(
bool state);
313 void textAlignRightState(
bool state);
314 void textAlignFullState(
bool state);
315 void textInsideOrderedListState(
bool state);
316 void textInsideUnorderedListState(
bool state);
317 void textInsideTableState(
bool state);
319 void textFontFamilyChanged(QString fontFamily);
320 void textFontSizeChanged(
int fontSize);
322 void insertTableDialogRequested();
365 const QStringList & tagLocalIds, const QStringList & tagGuids);
372 void pasteUnformatted();
375 void formatSelectionAsSourceCode();
380 void textUnderline();
381 void textStrikethrough();
382 void textHighlight();
389 void findNext(const QString & text,
bool matchCase) const;
390 void findPrevious(const QString & text,
bool matchCase) const;
393 const QString & textToReplace, const QString & replacementText,
397 const QString & textToReplace, const QString & replacementText,
400 void insertToDoCheckbox();
402 void insertInAppNoteLink(
403 const QString & userId, const QString & shardId,
404 const QString & noteGuid, const QString & linkText);
406 void setSpellcheck(
bool enabled);
408 void setFont(const QFont & font);
409 void setFontHeight(
int height);
410 void setFontColor(const QColor & color);
411 void setBackgroundColor(const QColor & color);
437 void insertHorizontalLine();
439 void increaseFontSize();
440 void decreaseFontSize();
442 void increaseIndentation();
443 void decreaseIndentation();
445 void insertBulletedList();
446 void insertNumberedList();
448 void insertTableDialog();
450 void insertFixedWidthTable(
int rows,
int columns,
int widthInPixels);
452 void insertRelativeWidthTable(
int rows,
int columns,
double relativeWidth);
454 void insertTableRow();
455 void insertTableColumn();
456 void removeTableRow();
457 void removeTableColumn();
459 void addAttachmentDialog();
460 void saveAttachmentDialog(const QByteArray & resourceHash);
461 void saveAttachmentUnderCursor();
462 void openAttachment(const QByteArray & resourceHash);
463 void openAttachmentUnderCursor();
464 void copyAttachment(const QByteArray & resourceHash);
465 void copyAttachmentUnderCursor();
467 void encryptSelectedText();
468 void decryptEncryptedTextUnderCursor();
470 void editHyperlinkDialog();
471 void copyHyperlink();
472 void removeHyperlink();
474 void onNoteLoadCancelled();
477 void dragMoveEvent(QDragMoveEvent * pEvent) override;
478 void dropEvent(QDropEvent * pEvent) override;