X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtgui%2Fbufferviewfilter.h;h=93478c75fe1d45028d05c31949006668b9ffc591;hp=8bce14392e052691bc1b93c19260bfe95e4b1283;hb=999dd26d04c96a142ee0ee8e1d066d939b7c4499;hpb=73edffb5f0f6ecae4118c36a7ca2c0d479b7f8c6 diff --git a/src/qtgui/bufferviewfilter.h b/src/qtgui/bufferviewfilter.h index 8bce1439..93478c75 100644 --- a/src/qtgui/bufferviewfilter.h +++ b/src/qtgui/bufferviewfilter.h @@ -22,6 +22,7 @@ #define _BUFFERVIEWFILTER_H_ #include +#include #include #include "buffer.h" #include "buffertreemodel.h" @@ -40,28 +41,37 @@ public: AllNets = 0x08, NoChannels = 0x10, NoQueries = 0x20, - NoServers = 0x40 + NoServers = 0x40, + FullCustom = 0x80 }; - Q_DECLARE_FLAGS(Modes, Mode) + Q_DECLARE_FLAGS(Modes, Mode); - BufferViewFilter(QAbstractItemModel *model, Modes mode, QStringList nets, QObject *parent = 0); + BufferViewFilter(QAbstractItemModel *model, const Modes &mode, const QStringList &nets); public slots: void invalidateMe(); void changeCurrent(const QModelIndex &, const QModelIndex &); void doubleClickReceived(const QModelIndex &); - void select(const QModelIndex &, QItemSelectionModel::SelectionFlags); + void select(const QModelIndex &); + void dropEvent(QDropEvent *); + void removeBuffer(const QModelIndex &); + signals: void currentChanged(const QModelIndex &, const QModelIndex &); void doubleClicked(const QModelIndex &); - void updateSelection(const QModelIndex &, QItemSelectionModel::SelectionFlags); + void selectionChanged(const QModelIndex &); private: + bool filterAcceptBuffer(const QModelIndex &) const; + bool filterAcceptNetwork(const QModelIndex &) const; bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const; - + bool lessThan(const QModelIndex &, const QModelIndex &); + void addBuffer(const uint &); + Modes mode; QStringList networks; + QList customBuffers; }; Q_DECLARE_OPERATORS_FOR_FLAGS(BufferViewFilter::Modes)