X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fbufferviewfilter.h;h=f53662a1a550a3d40efa55395617f08445afaeab;hp=38aa793059ecd14c882e461c1eb2a0a694eb4993;hb=92fc8c5b119111a35ab8423c3cbde5b2a022badf;hpb=0a43227b8cd44625f4881cc1545d42c8c8a4876c diff --git a/src/uisupport/bufferviewfilter.h b/src/uisupport/bufferviewfilter.h index 38aa7930..f53662a1 100644 --- a/src/uisupport/bufferviewfilter.h +++ b/src/uisupport/bufferviewfilter.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,8 +18,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef BUFFERVIEWFILTER_H_ -#define BUFFERVIEWFILTER_H_ +#pragma once + +#include "uisupport-export.h" #include #include @@ -34,7 +35,7 @@ /***************************************** * Buffer View Filter *****************************************/ -class BufferViewFilter : public QSortFilterProxyModel +class UISUPPORT_EXPORT BufferViewFilter : public QSortFilterProxyModel { Q_OBJECT @@ -69,6 +70,8 @@ public: QList actions(const QModelIndex &index); + void setFilterString(const QString string); + protected: bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const; bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const; @@ -93,6 +96,7 @@ private: QSet _toAdd; QSet _toTempRemove; QSet _toRemove; + QString _filterString; bool filterAcceptBuffer(const QModelIndex &) const; bool filterAcceptNetwork(const QModelIndex &) const; @@ -103,5 +107,3 @@ private: Q_DECLARE_OPERATORS_FOR_FLAGS(BufferViewFilter::Modes) - -#endif // BUFFERVIEWFILTER_H_