-# include <QContextMenuEvent>
-# include <Sonnet/Highlighter>
-# include <Sonnet/SpellCheckDecorator>
+# include <QContextMenuEvent>
+
+# include <Sonnet/Highlighter>
+# include <Sonnet/SpellCheckDecorator>
// Compatibility methods with the rest of the classes which still expect this to be a QLineEdit
inline QString text() const { return toPlainText(); }
inline QString html() const { return toHtml(); }
inline int cursorPosition() const { return textCursor().position(); }
// Compatibility methods with the rest of the classes which still expect this to be a QLineEdit
inline QString text() const { return toPlainText(); }
inline QString html() const { return toHtml(); }
inline int cursorPosition() const { return textCursor().position(); }
inline void backspace() { keyPressEvent(new QKeyEvent(QEvent::KeyPress, Qt::Key_Backspace, Qt::NoModifier)); }
inline bool hasSelectedText() const { return textCursor().hasSelection(); }
inline void backspace() { keyPressEvent(new QKeyEvent(QEvent::KeyPress, Qt::Key_Backspace, Qt::NoModifier)); }
inline bool hasSelectedText() const { return textCursor().hasSelection(); }
inline QString mircColorFromRGB(QString rgbColor) const { return _mircColorMap.key(rgbColor); }
inline QString rgbColorFromMirc(QString mircColor) const { return _mircColorMap[mircColor]; }
inline QString mircColorFromRGB(QString rgbColor) const { return _mircColorMap.key(rgbColor); }
inline QString rgbColorFromMirc(QString mircColor) const { return _mircColorMap[mircColor]; }
inline QStringList history() const { return _history; }
inline QHash<int, QString> tempHistory() const { return _tempHistory; }
inline QStringList history() const { return _history; }
inline QHash<int, QString> tempHistory() const { return _tempHistory; }
void setMaxHeight(int numLines);
void setEmacsMode(bool enable = true);
void setScrollBarsEnabled(bool enable = true);
void setMaxHeight(int numLines);
void setEmacsMode(bool enable = true);
void setScrollBarsEnabled(bool enable = true);
void setLineWrapEnabled(bool enable = false);
inline void setHistory(QStringList history) { _history = history; }
void setLineWrapEnabled(bool enable = false);
inline void setHistory(QStringList history) { _history = history; }
- bool event(QEvent *e) override;
- void keyPressEvent(QKeyEvent *event) override;
- void resizeEvent(QResizeEvent *event) override;
+ bool event(QEvent* e) override;
+ void keyPressEvent(QKeyEvent* event) override;
+ void resizeEvent(QResizeEvent* event) override;
- QString convertMircCodesToHtml(const QString &text);
- bool mircCodesChanged(QTextCursor &cursor, QTextCursor &peekcursor);
+ QString convertMircCodesToHtml(const QString& text);
+ bool mircCodesChanged(QTextCursor& cursor, QTextCursor& peekcursor);