inline CutoffMode senderCutoffMode() const { return _cutoffMode; }
inline void setSenderCutoffMode(CutoffMode mode) { _cutoffMode = mode; }
+ /**
+ * Gets whether to re-add hidden brackets around sender for all message types
+ *
+ * Used within the Chat Monitor as the normal message prefixes are overridden.
+ *
+ * @return Whether to re-add hidden brackets around sender for all message types
+ */
+ inline bool alwaysBracketSender() const { return _alwaysBracketSender; }
+ /**
+ * Sets whether to re-add hidden brackets around sender for all message types
+ *
+ * @see ChatScene::alwaysBracketSender()
+ *
+ * @param brackets Sets whether to re-add hidden brackets around sender for all message types
+ */
+ inline void setAlwaysBracketSender(bool alwaysBracket) { _alwaysBracketSender = alwaysBracket; }
+
QString selection() const;
bool hasSelection() const;
bool hasGlobalSelection() const;
void requestBacklog();
-#ifdef HAVE_WEBKIT
+#if defined HAVE_WEBKIT || defined HAVE_WEBENGINE
void loadWebPreview(ChatItem *parentItem, const QUrl &url, const QRectF &urlRect);
void clearWebPreview(ChatItem *parentItem = 0);
#endif
private slots:
void firstHandlePositionChanged(qreal xpos);
void secondHandlePositionChanged(qreal xpos);
-#ifdef HAVE_WEBKIT
+#if defined HAVE_WEBKIT || defined HAVE_WEBENGINE
void webPreviewNextStep();
#endif
void showWebPreviewChanged();
+ /**
+ * Updates the local setting cache of whether or not to show sender brackets
+ */
+ void showSenderBracketsChanged();
+
+ /**
+ * Updates the local setting cache of whether or not to use the custom timestamp format
+ */
+ void useCustomTimestampFormatChanged();
+
+ /**
+ * Updates the local setting cache of the timestamp format string
+ */
+ void timestampFormatStringChanged();
+
+ /**
+ * Updates the status of whether or not the timestamp format string contains brackets
+ *
+ * When the timestamp contains brackets -and- showSenderBrackets is disabled, we need to
+ * automatically add brackets. This function checks if the timestamp has brackets and stores
+ * the result, rather than checking each time text is copied.
+ */
+ void updateTimestampHasBrackets();
+
void rowsRemoved();
void clickTimeout();
qreal _firstColHandlePos, _secondColHandlePos;
int _defaultFirstColHandlePos, _defaultSecondColHandlePos;
CutoffMode _cutoffMode;
+ /// Whether to re-add hidden brackets around sender for all message types
+ bool _alwaysBracketSender;
ChatItem *_selectingItem;
int _selectionStartCol, _selectionMinCol;
bool _showWebPreview;
+ bool _showSenderBrackets; /// If true, show brackets around sender names
+
+ bool _useCustomTimestampFormat; /// If true, use the custom timestamp format
+ QString _timestampFormatString; /// Format of the timestamp string
+ bool _timestampHasBrackets; /// If true, timestamp format has [brackets] of some sort
+
static const int _webSearchSelectionTextMaxVisible = 24;
-#ifdef HAVE_WEBKIT
+#if defined HAVE_WEBKIT || defined HAVE_WEBENGINE
struct WebPreview {
enum PreviewState {
NoPreview,
WebPreview() : parentItem(0), previewItem(0), previewState(NoPreview) {}
};
WebPreview webPreview;
-#endif // HAVE_WEBKIT
+#endif // HAVE_WEBKIT || HAVE_WEBENGINE
};