projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cmake: Fix build with Qt 5.11
[quassel.git]
/
src
/
uisupport
/
abstractbuffercontainer.h
diff --git
a/src/uisupport/abstractbuffercontainer.h
b/src/uisupport/abstractbuffercontainer.h
index
245f38d
..
9af43ca
100644
(file)
--- a/
src/uisupport/abstractbuffercontainer.h
+++ b/
src/uisupport/abstractbuffercontainer.h
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-
08 by the Quassel IRC Team
*
+ * Copyright (C) 2005-
2018 by the Quassel Project
*
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* 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., *
* 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., *
- * 5
9 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
+ * 5
1 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
***************************************************************************/
#ifndef ABSTRACTBUFFERCONTAINER_H_
***************************************************************************/
#ifndef ABSTRACTBUFFERCONTAINER_H_
@@
-28,16
+28,21
@@
class AbstractChatView;
class AbstractUiMsg;
class Buffer;
class AbstractUiMsg;
class Buffer;
-class AbstractBufferContainer : public AbstractItemView {
- Q_OBJECT
+class AbstractBufferContainer : public AbstractItemView
+{
+ Q_OBJECT
-
public:
+public:
AbstractBufferContainer(QWidget *parent);
virtual ~AbstractBufferContainer();
inline BufferId currentBuffer() const { return _currentBuffer; }
AbstractBufferContainer(QWidget *parent);
virtual ~AbstractBufferContainer();
inline BufferId currentBuffer() const { return _currentBuffer; }
- protected:
+signals:
+ 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;
@@
-46,9
+51,14
@@
class AbstractBufferContainer : public AbstractItemView {
* It also shall delete the object afterwards.
* \param view The chat view to be removed and deleted
*/
* It also shall delete the object afterwards.
* \param view The chat view to be removed and deleted
*/
- virtual void removeChatView(AbstractChatView *view) = 0;
+ 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; }
-
protected slots:
+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);
@@
-57,27
+67,24
@@
class AbstractBufferContainer : public AbstractItemView {
* selecting the appropriate page in a QStackedWidget.
* \param view The chat view to be displayed. May be 0 if no chat view is selected.
*/
* 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(
AbstractChatView *view
) = 0;
+ virtual void showChatView(
BufferId
) = 0;
- private slots:
- void appendMsg(AbstractUiMsg *);
- void prependMsg(AbstractUiMsg *);
+private slots:
void removeBuffer(BufferId bufferId);
void setCurrentBuffer(BufferId bufferId);
void removeBuffer(BufferId bufferId);
void setCurrentBuffer(BufferId bufferId);
-
private:
+private:
BufferId _currentBuffer;
QHash<BufferId, AbstractChatView *> _chatViews;
};
BufferId _currentBuffer;
QHash<BufferId, AbstractChatView *> _chatViews;
};
-class AbstractChatView {
-
- public:
- virtual ~AbstractChatView() = 0;
- virtual void appendMsg(AbstractUiMsg *msg) = 0;
- virtual void prependMsg(AbstractUiMsg *msg) = 0;
- virtual void setContents(const QList<AbstractUiMsg *> &contents) = 0;
+class AbstractChatView
+{
+public:
+ virtual ~AbstractChatView() {};
+ virtual MsgId lastMsgId() const = 0;
};
};
+
#endif
#endif