+BufferView::BufferView(QWidget *parent)
+ : QTreeView(parent),
+ showChannelList(tr("Show Channel List"), this),
+ _connectNetAction(tr("Connect"), this),
+ _disconnectNetAction(tr("Disconnect"), this),
+ _joinChannelAction(tr("Join Channel"), this),
+
+ _joinBufferAction(tr("Join"), this),
+ _partBufferAction(tr("Part"), this),
+ _hideBufferTemporarilyAction(tr("Hide buffers"), this),
+ _hideBufferPermanentlyAction(tr("Hide buffers permanently"), this),
+ _removeBufferAction(tr("Delete buffer"), this),
+ _ignoreListAction(tr("Ignore list"), this),
+
+ _hideJoinAction(tr("Join Events"), this),
+ _hidePartAction(tr("Part Events"), this),
+ _hideKillAction(tr("Kill Events"), this),
+ _hideQuitAction(tr("Quit Events"), this),
+ _hideModeAction(tr("Mode Events"), this)
+
+{
+ _hideJoinAction.setCheckable(true);
+ _hidePartAction.setCheckable(true);
+ _hideKillAction.setCheckable(true);
+ _hideQuitAction.setCheckable(true);
+ _hideModeAction.setCheckable(true);
+ _hideJoinAction.setEnabled(false);
+ _hidePartAction.setEnabled(false);
+ _ignoreListAction.setEnabled(false);
+ _hideKillAction.setEnabled(false);
+ _hideQuitAction.setEnabled(false);
+ _hideModeAction.setEnabled(false);
+
+ showChannelList.setIcon(QIcon(":/16x16/actions/oxygen/16x16/actions/format-list-unordered.png"));
+
+ connect(this, SIGNAL(collapsed(const QModelIndex &)), this, SLOT(on_collapse(const QModelIndex &)));
+ connect(this, SIGNAL(expanded(const QModelIndex &)), this, SLOT(on_expand(const QModelIndex &)));
+
+ setSelectionMode(QAbstractItemView::ExtendedSelection);