Logo Search packages:      
Sourcecode: valknut version File versions  Download package

void DCOptions::slotContextMenuUserChatCommands ( QListViewItem *  item,
const QPoint &  pos,
int  col 
) [private, slot]

Definition at line 2264 of file dcoptions.cpp.

Referenced by InitDocument().

{
      QPopupMenu *m;
      QListViewItem *newitem;
      int id;
      
      m = new QPopupMenu(this);
      
      DCMenuHandler::InsertMenu( m, emiADD );
      DCMenuHandler::InsertMenu( m, emiREMOVE );
      
      id = m->exec(QCursor::pos());
      
      delete m;
      
      if ( id == -1 )
      {
            return;
      }
      else if ( id == emiADD )
      {
            newitem = new QListViewItem( listView_CHAT_COMMANDS, "/s", "/sh somescript.sh" );
            newitem->setRenameEnabled(0, TRUE);
            newitem->setRenameEnabled(1, TRUE);
      }
      else if ( id == emiREMOVE )
      {
            if (item != 0)
            {
                  delete item;
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index