BufferViewOverlay now correctly respects filtering of buffer types
[quassel.git] / src / client / bufferviewoverlay.h
index 70fb927..204e553 100644 (file)
@@ -34,6 +34,7 @@ class BufferViewOverlay : public QObject {
 public:
   BufferViewOverlay(QObject *parent = 0);
 
+  inline const QSet<int> &bufferViewIds() { return _bufferViewIds; }
   bool allNetworks();
 
   const QSet<NetworkId> &networkIds();
@@ -41,11 +42,11 @@ public:
   const QSet<BufferId> &removedBufferIds();
   const QSet<BufferId> &tempRemovedBufferIds();
 
-  bool addBuffersAutomatically();
-  bool hideInactiveBuffers();
   int allowedBufferTypes();
   int minimumActivity();
 
+  inline bool isInitialized() { return _uninitializedViewCount == 0; }
+
 public slots:
   void addView(int viewId);
   void removeView(int viewId);
@@ -55,6 +56,7 @@ public slots:
 
 signals:
   void hasChanged();
+  void initDone();
 
 protected:
   virtual void customEvent(QEvent *event);
@@ -65,14 +67,14 @@ private slots:
 
 private:
   void updateHelper();
+  QSet<BufferId> filterBuffersByConfig(const QList<BufferId> &buffers, const BufferViewConfig *config);
+
   bool _aboutToUpdate;
 
   QSet<int> _bufferViewIds;
+  int _uninitializedViewCount;
 
   QSet<NetworkId> _networkIds;
-
-  bool _addBuffersAutomatically;
-  bool _hideInactiveBuffers;
   int _allowedBufferTypes;
   int _minimumActivity;