X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=gui%2Fchatwidget.h;h=2fdd89570695d765621380613be2e78d45f1dff6;hp=16418242889136c501896ac3528c55514da5a03c;hb=ddc5208315db8ca9ca19f6a59ee7caefe631ffc7;hpb=fd718b6209f1ad2bcd199c44c2dae3b0cb0f633b diff --git a/gui/chatwidget.h b/gui/chatwidget.h index 16418242..2fdd8957 100644 --- a/gui/chatwidget.h +++ b/gui/chatwidget.h @@ -52,9 +52,11 @@ class ChatWidget : public QAbstractScrollArea { public slots: void clear(); + void prependChatLine(ChatLine *); + void appendChatLine(ChatLine *); void prependChatLines(QList); - void appendMsg(Message); - void appendMsgList(QList *); + void appendChatLines(QList); + void setContents(QList); protected: virtual void resizeEvent(QResizeEvent *event); @@ -133,7 +135,7 @@ class ChatLine : public QObject { Q_OBJECT public: - ChatLine(Message message, QString networkName, QString bufferName); + ChatLine(Message message); ~ChatLine(); qreal layout(qreal tsWidth, qreal nickWidth, qreal textWidth); @@ -143,9 +145,11 @@ class ChatLine : public QObject { enum SelectionMode { None, Partial, Full }; void setSelection(SelectionMode, int start = 0, int end = 0); - QDateTime getTimeStamp(); - QString getSender(); - QString getText(); + QDateTime timeStamp(); + QString sender(); + QString text(); + uint msgId(); + BufferId bufferId(); bool isUrl(int pos); QUrl getUrl(int pos); @@ -155,7 +159,6 @@ class ChatLine : public QObject { private: qreal hght; Message msg; - QString networkName, bufferName; qreal tsWidth, senderWidth, textWidth; Style::FormattedString tsFormatted, senderFormatted, textFormatted; @@ -193,6 +196,7 @@ class ChatLine : public QObject { QList calcFormatRanges(const Style::FormattedString &, QTextLayout::FormatRange additional = QTextLayout::FormatRange()); }; +/* struct LayoutTask { QList messages; Buffer *buffer; @@ -223,5 +227,6 @@ class LayoutThread : public QThread { bool abort; }; +*/ #endif