class ChatMonitorFilter : public MessageFilter {
Q_OBJECT
- public:
- ChatMonitorFilter(MessageModel *model, QObject *parent = 0);
-
- virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
- virtual QString idString() const;
-
- private:
- QDateTime _initTime;
+public:
+ enum SenderFields {
+ NoField = 0x00,
+ NetworkField = 0x01,
+ BufferField = 0x02,
+ SenderField = 0x04,
+ AllFields = 0xFF
+ };
+
+ ChatMonitorFilter(MessageModel *model, QObject *parent = 0);
+
+ virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
+ virtual QString idString() const { return "ChatMonitor"; }
+ virtual QVariant data(const QModelIndex &index, int role) const;
+
+ int showFields() const { return _showFields; }
+ bool showOwnMessages() const { return _showOwnMessages; }
+
+public slots:
+ void addShowField(int field);
+ void removeShowField(int field);
+ void setShowOwnMessages(bool show);
+
+private slots:
+ void showFieldsSettingsChanged(const QVariant &newValue);
+ void showOwnMessagesSettingChanged(const QVariant &newValue);
+
+private:
+ int _showFields;
+ bool _showOwnMessages;
};
#endif