X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fbufferviewfilter.h;h=18c32ad6d608af13b7c39ee23e2c3655a7b9fa53;hp=581cd6c9cd19936d81f444c897c96fffe911785a;hb=ddba2696fe051b472d6670e225e67c2f6f1972ce;hpb=997a62b68d7469a93f373476dd955c44eb051be0 diff --git a/src/uisupport/bufferviewfilter.h b/src/uisupport/bufferviewfilter.h index 581cd6c9..18c32ad6 100644 --- a/src/uisupport/bufferviewfilter.h +++ b/src/uisupport/bufferviewfilter.h @@ -21,6 +21,7 @@ #ifndef BUFFERVIEWFILTER_H_ #define BUFFERVIEWFILTER_H_ +#include #include #include #include @@ -60,21 +61,41 @@ public: void setConfig(BufferViewConfig *config); inline BufferViewConfig *config() const { return _config; } + virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder); + public slots: - void removeBuffer(const QModelIndex &); + void checkPreviousCurrentForRemoval(const QModelIndex ¤t, const QModelIndex &previous); + void checkItemForRemoval(const QModelIndex &index) { checkItemsForRemoval(index, index); } + void checkItemsForRemoval(const QModelIndex &topLeft, const QModelIndex &bottomRight); protected: bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const; bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const; bool bufferLessThan(const QModelIndex &source_left, const QModelIndex &source_right) const; bool networkLessThan(const QModelIndex &source_left, const QModelIndex &source_right) const; + virtual void customEvent(QEvent *event); +signals: + void _dataChanged(const QModelIndex &source_topLeft, const QModelIndex &source_bottomRight); + void configChanged(); + +private slots: + void configInitialized(); + private: QPointer _config; + Qt::SortOrder _sortOrder; + + QColor _FgColorInactiveActivity; + QColor _FgColorNoActivity; + QColor _FgColorHighlightActivity; + QColor _FgColorNewMessageActivity; + QColor _FgColorOtherActivity; + void loadColors(); bool filterAcceptBuffer(const QModelIndex &) const; bool filterAcceptNetwork(const QModelIndex &) const; - void addBuffer(const BufferId &); + void addBuffer(const BufferId &) const; }; Q_DECLARE_OPERATORS_FOR_FLAGS(BufferViewFilter::Modes)