~ubuntu-branches/ubuntu/jaunty/quassel/jaunty-backports

« back to all changes in this revision

Viewing changes to src/client/messagefilter.h

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter
  • Date: 2008-11-17 15:22:46 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20081117152246-3lwlpnr4r08910kv
Tags: 0.3.1-0ubuntu1
* New upstream release (LP: #271403)
* Drop all patches originated from upstream (quassel_*)
* Compile with non-builtin quassel icons
  + Introduce new quassel-data package
  + quassel and quassel-client depend on quassel-data
  + Don't manually enforce icon installation for desktop files in debian/rules
  + Add quassel_01_fix_iconloader.patch
* Drop perl build dependency, I have no clue why it was added in the first
  place. Neither changelog nor Bazaar knows, and since quassel compiles just
  fine without it, removing it should be save.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include <QSortFilterProxyModel>
25
25
 
 
26
#include "bufferinfo.h"
 
27
#include "client.h"
26
28
#include "messagemodel.h"
 
29
#include "networkmodel.h"
27
30
#include "types.h"
28
31
 
29
32
class MessageFilter : public QSortFilterProxyModel {
38
41
  virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
39
42
  virtual QString idString() const;
40
43
  inline bool isSingleBufferFilter() const { return _validBuffers.count() == 1; }
41
 
  
 
44
  BufferId singleBufferId() const { return *(_validBuffers.constBegin()); }
 
45
  inline bool containsBuffer(const BufferId &id) const { return _validBuffers.contains(id); }
 
46
 
 
47
public slots:
 
48
  void messageTypeFilterChanged();
 
49
  void messageRedirectionChanged();
 
50
  void requestBacklog();
 
51
 
 
52
protected:
 
53
  QString bufferName() const { return Client::networkModel()->bufferName(singleBufferId()); }
 
54
  BufferInfo::Type bufferType() const { return Client::networkModel()->bufferType(singleBufferId()); }
 
55
  NetworkId networkId() const { return Client::networkModel()->networkId(singleBufferId()); }
 
56
 
42
57
private:
 
58
  void init();
 
59
 
43
60
  QSet<BufferId> _validBuffers;
 
61
  mutable QSet<MsgId> _redirectedMsgs;
 
62
  QMultiHash<QString, uint> _filteredQuitMsgs;
 
63
  int _messageTypeFilter;
 
64
 
 
65
  bool _userNoticesInDefaultBuffer;
 
66
  bool _userNoticesInStatusBuffer;
 
67
  bool _userNoticesInCurrentBuffer;
 
68
 
 
69
  bool _serverNoticesInDefaultBuffer;
 
70
  bool _serverNoticesInStatusBuffer;
 
71
  bool _serverNoticesInCurrentBuffer;
 
72
 
 
73
  bool _errorMsgsInDefaultBuffer;
 
74
  bool _errorMsgsInStatusBuffer;
 
75
  bool _errorMsgsInCurrentBuffer;
44
76
};
45
77
 
46
78
#endif