- QWidget * showWidget(QWidget *parent = 0);
- void hideWidget();
- void deleteWidget();
-
- void scrollToEnd();
-
- private slots:
- void userInput(QString);
-
- private:
- bool active;
- BufferWidget *widget;
- ChatWidget *chatWidget;
- ChatWidgetContents *contentsWidget;
- VarMap nicks;
- QString topic;
- QString ownNick;
- QString networkName, bufferName;
-
- QList<Message> contents;
-};
-
-//!\brief Displays the contents of a Buffer.
-/** A BufferWidget usually includes a topic line, a nicklist, the chat itself, and an input line.
- * For server buffers or queries, there is of course no nicklist.
- * The contents of the chat is rendered by a ChatWidget.
- */
-class BufferWidget : public QWidget {
- Q_OBJECT
-
- public:
- BufferWidget(QString netname, QString bufname, bool active, QString ownNick, ChatWidgetContents *contents, Buffer *parentBuffer, QWidget *parent = 0);
- ~BufferWidget();
-
- void setActive(bool act = true);
-
- signals:
- void userInput(QString);
-
- protected:
-
- public slots:
- void displayMsg(Message);
- void updateNickList(VarMap nicks);
- void setOwnNick(QString ownNick);
- void setTopic(QString topic);
-
- private slots:
- void enterPressed();
- void itemExpansionChanged(QTreeWidgetItem *);
- void updateTitle();