X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.h;h=4e90951706b666c9c7df70e406fa1412d4b17f23;hp=1de870ef55a3ac20dcaf18ce81e6760a23f31724;hb=46888b395628f1023916a571762c07e72bc7f73c;hpb=76db8cdfbeffaaba359c8e80cf2146da9e9e7f8a diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index 1de870ef..4e909517 100644 --- a/src/qtui/chatscene.h +++ b/src/qtui/chatscene.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -130,6 +130,8 @@ public slots: void setWidth(qreal width); void layout(int start, int end, qreal width); + void resetColumnWidths(); + void setMarkerLineVisible(bool visible = true); void setMarkerLine(MsgId msgId = MsgId()); void jumpToMarkerLine(bool requestBacklog); @@ -143,9 +145,11 @@ public slots: void selectionToClipboard(QClipboard::Mode = QClipboard::Clipboard); void stringToClipboard(const QString &str, QClipboard::Mode = QClipboard::Clipboard); + void webSearchOnSelection(); + 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 @@ -171,11 +175,35 @@ protected slots: 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(); @@ -204,6 +232,7 @@ private: ColumnHandleItem *_firstColHandle, *_secondColHandle; qreal _firstColHandlePos, _secondColHandlePos; + int _defaultFirstColHandlePos, _defaultSecondColHandlePos; CutoffMode _cutoffMode; ChatItem *_selectingItem; @@ -221,7 +250,15 @@ private: bool _showWebPreview; -#ifdef HAVE_WEBKIT + 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; + +#if defined HAVE_WEBKIT || defined HAVE_WEBENGINE struct WebPreview { enum PreviewState { NoPreview, @@ -239,7 +276,7 @@ private: WebPreview() : parentItem(0), previewItem(0), previewState(NoPreview) {} }; WebPreview webPreview; -#endif // HAVE_WEBKIT +#endif // HAVE_WEBKIT || HAVE_WEBENGINE };