* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
connect(selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
model(), SLOT(changeCurrent(const QModelIndex &, const QModelIndex &)));
connect(selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
model(), SLOT(changeCurrent(const QModelIndex &, const QModelIndex &)));
connect(model(), SIGNAL(selectionChanged(const QModelIndex &)),
this, SLOT(select(const QModelIndex &)));
connect(this, SIGNAL(selectionChanged(const QModelIndex &, QItemSelectionModel::SelectionFlags)),
selectionModel(), SLOT(select(const QModelIndex &, QItemSelectionModel::SelectionFlags)));
connect(model(), SIGNAL(selectionChanged(const QModelIndex &)),
this, SLOT(select(const QModelIndex &)));
connect(this, SIGNAL(selectionChanged(const QModelIndex &, QItemSelectionModel::SelectionFlags)),
selectionModel(), SLOT(select(const QModelIndex &, QItemSelectionModel::SelectionFlags)));
}
void BufferView::setFilteredModel(QAbstractItemModel *model, BufferViewFilter::Modes mode, QStringList nets) {
}
void BufferView::setFilteredModel(QAbstractItemModel *model, BufferViewFilter::Modes mode, QStringList nets) {
+void BufferView::joinChannel(const QModelIndex &index) {
+ Buffer::Type bufferType = (Buffer::Type)index.data(BufferTreeModel::BufferTypeRole).toInt();
+
+ if(bufferType != Buffer::ChannelBuffer)
+ return;
+
+ Client::fakeInput(index.data(BufferTreeModel::BufferUidRole).toUInt(), QString("/JOIN %1").arg(index.sibling(index.row(), 0).data().toString()));
+}
+
void BufferView::keyPressEvent(QKeyEvent *event) {
if(event->key() == Qt::Key_Backspace || event->key() == Qt::Key_Delete) {
event->accept();
void BufferView::keyPressEvent(QKeyEvent *event) {
if(event->key() == Qt::Key_Backspace || event->key() == Qt::Key_Delete) {
event->accept();