NoServers = 0x40,
FullCustom = 0x80
};
- Q_DECLARE_FLAGS(Modes, Mode);
+ Q_DECLARE_FLAGS(Modes, Mode)
BufferViewFilter(QAbstractItemModel *model, BufferViewConfig *config = 0);
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 source_rowsInserted(const QModelIndex &parent, int start, int end);
+ 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<BufferViewConfig> _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)