X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatitem.h;h=a6a94b2ec81ab57ebf1af274cf69bc2ae4d6d264;hb=8d736eb601e79e8fe1a866eb67e626b33f651d7a;hp=7b9d65126255404a0539cb9b8e92906e46630847;hpb=694f9bfbf7f1af19108461c7e00d133e55082bce;p=quassel.git diff --git a/src/qtui/chatitem.h b/src/qtui/chatitem.h index 7b9d6512..a6a94b2e 100644 --- a/src/qtui/chatitem.h +++ b/src/qtui/chatitem.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef CHATITEM_H_ @@ -112,9 +112,8 @@ protected: virtual UiStyle::FormatList formatList() const; void paintBackground(QPainter *); - QVector selectionFormats() const; virtual QVector additionalFormats() const; - void overlayFormat(UiStyle::FormatList &fmtList, int start, int end, quint32 overlayFmt) const; + void overlayFormat(UiStyle::FormatList &fmtList, quint16 start, quint16 end, UiStyle::FormatType overlayFmt) const; inline qint16 selectionStart() const { return _selectionStart; } inline void setSelectionStart(qint16 start) { _selectionStart = start; } @@ -124,6 +123,9 @@ protected: inline void setSelectionMode(SelectionMode mode) { _selectionMode = mode; } void setSelection(SelectionMode mode, qint16 selectionStart, qint16 selectionEnd); + virtual bool hasActiveClickable() const; + virtual std::pair activeClickableRange() const; + qint16 posToCursor(const QPointF &pos) const; inline void setGeometry(qreal width, qreal height) { clearCache(); _boundingRect.setSize(QSizeF(width, height)); } @@ -206,11 +208,12 @@ protected: virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event); virtual void handleClick(const QPointF &pos, ChatScene::ClickMode clickMode); + virtual bool hasActiveClickable() const; + virtual std::pair activeClickableRange() const; + virtual void addActionsToMenu(QMenu *menu, const QPointF &itemPos); virtual void copyLinkToClipboard(); - virtual QVector additionalFormats() const; - virtual void initLayout(QTextLayout *layout) const; virtual void doLayout(QTextLayout *layout) const; virtual UiStyle::FormatList formatList() const;