#include "network.h"
#include "networkmodel.h"
#include "contextmenuactionprovider.h"
-#include "uisettings.h"
/*****************************************
* The TreeView showing the Buffers
BufferViewDelegate *tristateDelegate = new BufferViewDelegate(this);
setItemDelegate(tristateDelegate);
delete oldDelegate;
-
- UiStyleSettings s("QtUiStyle/Fonts"); // li'l dirty here, but fonts are stored in QtUiStyle :/
- s.notify("BufferView", this, SLOT(setCustomFont(QVariant)));
- setCustomFont(s.value("BufferView", QFont()));
}
void BufferView::init() {
setIndentation(10);
expandAll();
+ header()->hide(); // nobody seems to use this anyway
+
setAnimated(true);
+ // FIXME This is to workaround bug #663
+ setUniformRowHeights(true);
+
#ifndef QT_NO_DRAGANDDROP
setDragEnabled(true);
setAcceptDrops(true);
}
}
-void BufferView::setCustomFont(const QVariant &v) {
- QFont font = v.value<QFont>();
- if(font.family().isEmpty())
- font = QApplication::font();
- setFont(font);
-}
-
void BufferView::joinChannel(const QModelIndex &index) {
BufferInfo::Type bufferType = (BufferInfo::Type)index.data(NetworkModel::BufferTypeRole).value<int>();
}
void BufferView::wheelEvent(QWheelEvent* event) {
- if(UiSettings().value("MouseWheelChangesBuffers", QVariant(true)).toBool() == (bool)(event->modifiers() & Qt::AltModifier))
+ if(ItemViewSettings().mouseWheelChangesBuffer() == (bool)(event->modifiers() & Qt::AltModifier))
return QTreeView::wheelEvent(event);
int rowDelta = ( event->delta() > 0 ) ? -1 : 1;