We finally got a nice solution to synchronize multiple views or whatevers[tm] even...
[quassel.git] / src / qtui / bufferviewfilter.cpp
index 84dc447..6bcfb6a 100644 (file)
@@ -32,29 +32,12 @@ BufferViewFilter::BufferViewFilter(QAbstractItemModel *model, const Modes &filte
   networks = nets;
   
   connect(model, SIGNAL(invalidateFilter()), this, SLOT(invalidateMe()));
-  connect(model, SIGNAL(selectionChanged(const QModelIndex &)),
-          this, SLOT(select(const QModelIndex &)));
-  
-  connect(this, SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
-          model, SLOT(changeCurrent(const QModelIndex &, const QModelIndex &)));
 }
 
 void BufferViewFilter::invalidateMe() {
   invalidateFilter();
 }
 
-void BufferViewFilter::select(const QModelIndex &index) {
-  emit selectionChanged(mapFromSource(index));
-}
-
-void BufferViewFilter::changeCurrent(const QModelIndex &current, const QModelIndex &previous) {
-  emit currentChanged(mapToSource(current), mapToSource(previous));
-}
-
-void BufferViewFilter::doubleClickReceived(const QModelIndex &clicked) {
-  emit doubleClicked(mapToSource(clicked));
-}
-
 void BufferViewFilter::dropEvent(QDropEvent *event) {
   const QMimeData *data = event->mimeData();
   if(!(mode & FullCustom))
@@ -109,9 +92,9 @@ void BufferViewFilter::removeBuffer(const QModelIndex &index) {
 
 bool BufferViewFilter::filterAcceptBuffer(const QModelIndex &source_bufferIndex) const {
   Buffer::Type bufferType = (Buffer::Type) source_bufferIndex.data(BufferTreeModel::BufferTypeRole).toInt();
-  if((mode & NoChannels) && bufferType == Buffer::ChannelBuffer) return false;
-  if((mode & NoQueries) && bufferType == Buffer::QueryBuffer) return false;
-  if((mode & NoServers) && bufferType == Buffer::ServerBuffer) return false;
+  if((mode & NoChannels) && bufferType == Buffer::ChannelType) return false;
+  if((mode & NoQueries) && bufferType == Buffer::QueryType) return false;
+  if((mode & NoServers) && bufferType == Buffer::StatusType) return false;
 
   bool isActive = source_bufferIndex.data(BufferTreeModel::BufferActiveRole).toBool();
   if((mode & NoActive) && isActive) return false;