+ /**
+ * Clear the formatting of the text, globally or selected text only
+ *
+ * Clears the font weight (bold, italic, underline) and foreground/background coloring.
+ *
+ * @param global If true, clear all text formatting, otherwise only clear selected text
+ */
+ void setFormatClear(const bool global = false);
+
+ /**
+ * Sets the boldness of the selected or typed text
+ *
+ * @param bold If true, set text bold, otherwise set text normal
+ */
+ void setFormatBold(const bool bold);
+
+ /**
+ * Sets the italicness of the selected or typed text
+ *
+ * @param bold If true, set text italic, otherwise set text normal
+ */
+ void setFormatItalic(const bool italic);
+
+ /**
+ * Sets the underline of the selected or typed text
+ *
+ * @param bold If true, set text underlined, otherwise set text normal
+ */
+ void setFormatUnderline(const bool underline);
+
+ Ui::InputWidget ui;
+
+ NetworkId _networkId;
+ IdentityId _identityId;
+ QMenu *_colorMenu, *_colorFillMenu;
+
+ void mergeFormatOnSelection(const QTextCharFormat &format);
+ void fontChanged(const QFont &f);
+ QIcon createColorToolButtonIcon(const QIcon &icon, const QColor &color);
+ QTextCharFormat getFormatOfWordOrSelection();
+ void setFormatOnSelection(const QTextCharFormat &format);
+
+ bool _perChatHistory;
+ struct HistoryState {
+ QStringList history;
+ QHash<int, QString> tempHistory;
+ qint32 idx;
+ QString inputLine;
+ inline HistoryState() : idx(0) {};
+ };
+
+ QMap<BufferId, HistoryState> historyMap;
+};
+