X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fabstractbuffercontainer.h;h=249af25a0d33ce9d1442036f0a4c617bd0366f1d;hp=51b9b9ad0cb11d6f04fe9be48dc909435e5a4068;hb=694f9bfbf7f1af19108461c7e00d133e55082bce;hpb=61c8d84d1c849373e0f115dc748ed45cff95287d diff --git a/src/uisupport/abstractbuffercontainer.h b/src/uisupport/abstractbuffercontainer.h index 51b9b9ad..249af25a 100644 --- a/src/uisupport/abstractbuffercontainer.h +++ b/src/uisupport/abstractbuffercontainer.h @@ -28,60 +28,63 @@ class AbstractChatView; class AbstractUiMsg; class Buffer; -class AbstractBufferContainer : public AbstractItemView { - Q_OBJECT +class AbstractBufferContainer : public AbstractItemView +{ + Q_OBJECT public: - AbstractBufferContainer(QWidget *parent); - virtual ~AbstractBufferContainer(); + AbstractBufferContainer(QWidget *parent); + virtual ~AbstractBufferContainer(); - inline BufferId currentBuffer() const { return _currentBuffer; } + inline BufferId currentBuffer() const { return _currentBuffer; } signals: - void currentChanged(BufferId); - void currentChanged(const QModelIndex &); + void currentChanged(BufferId); + void currentChanged(const QModelIndex &); protected: - //! Create an AbstractChatView for the given BufferId and add it to the UI if necessary - virtual AbstractChatView *createChatView(BufferId) = 0; + //! Create an AbstractChatView for the given BufferId and add it to the UI if necessary + virtual AbstractChatView *createChatView(BufferId) = 0; - //! Remove a chat view from the UI and delete it - /** This method shall remove the view from the UI (for example, from a QStackedWidget) if appropriate. - * It also shall delete the object afterwards. - * \param view The chat view to be removed and deleted - */ - virtual void removeChatView(BufferId) = 0; + //! Remove a chat view from the UI and delete it + /** This method shall remove the view from the UI (for example, from a QStackedWidget) if appropriate. + * It also shall delete the object afterwards. + * \param view The chat view to be removed and deleted + */ + virtual void removeChatView(BufferId) = 0; - //! If true, the marker line will be set automatically on buffer switch - /** \return Whether the marker line should be set on buffer switch - */ - virtual inline bool autoMarkerLine() const { return true; } + //! If true, the marker line will be set automatically on buffer switch + /** \return Whether the marker line should be set on buffer switch + */ + virtual inline bool autoMarkerLine() const { return true; } protected slots: - virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); - virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end); + virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); + virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end); - //! Show the given chat view - /** This method is called when the given chat view should be displayed. Use this e.g. for - * selecting the appropriate page in a QStackedWidget. - * \param view The chat view to be displayed. May be 0 if no chat view is selected. - */ - virtual void showChatView(BufferId) = 0; + //! Show the given chat view + /** This method is called when the given chat view should be displayed. Use this e.g. for + * selecting the appropriate page in a QStackedWidget. + * \param view The chat view to be displayed. May be 0 if no chat view is selected. + */ + virtual void showChatView(BufferId) = 0; private slots: - void removeBuffer(BufferId bufferId); - void setCurrentBuffer(BufferId bufferId); + void removeBuffer(BufferId bufferId); + void setCurrentBuffer(BufferId bufferId); private: - BufferId _currentBuffer; - QHash _chatViews; + BufferId _currentBuffer; + QHash _chatViews; }; -class AbstractChatView { +class AbstractChatView +{ public: - virtual ~AbstractChatView() {}; - virtual MsgId lastMsgId() const = 0; + virtual ~AbstractChatView() {}; + virtual MsgId lastMsgId() const = 0; }; + #endif