+void NickView::showContextMenu(const QPoint & pos ) {
+ QModelIndex index = indexAt(pos);
+ QString username = index.sibling(index.row(), 0).data().toString();
+ BufferInfo bufferInfo = index.data(NetworkModel::BufferInfoRole).value<BufferInfo>();
+
+ QMenu nickContextMenu(this);
+ nickContextMenu.addAction(tr("context menu for %1").arg(username));
+ nickContextMenu.addSeparator();
+
+ QAction *whoisAction = nickContextMenu.addAction(tr("WHOIS"));
+ QAction *result = nickContextMenu.exec(QCursor::pos());
+
+ if (result == whoisAction ) {
+ Client::userInput(bufferInfo, "/WHOIS "+username);
+ }
+}