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

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

Definition at line 2299 of file dcoptions.cpp.

Referenced by InitDocument().

{
      QPopupMenu *m = 0;
      QListViewItem *newitem;
      int id, cs_yes, cs_no;
      
      m = new QPopupMenu(this);
      
      DCMenuHandler::InsertMenu( m, emiADD );
      DCMenuHandler::InsertMenu( m, emiREMOVE );
      cs_yes = m->insertItem(tr("Case sensitive"));
      cs_no = m->insertItem(tr("Case insensitive"));
      
      id = m->exec(QCursor::pos());
      
      delete m;
      
      if ( id == -1)
      {
            return;
      }
      else if ( id == emiADD )
      {
            newitem = new QListViewItem( listView_AUTO_RESPONSES, "-trigger", tr("No"), "response" );
            newitem->setRenameEnabled(0, TRUE);
            newitem->setRenameEnabled(2, TRUE);
      }
      else if ( id == emiREMOVE )
      {
            if (item != 0)
            {
                  delete item;
            }
      }
      else if ( id == cs_yes )
      {
            if (item != 0)
            {
                  item->setText(1, tr("Yes"));
            }
      }
      else if ( id == cs_no )
      {
            if (item != 0)
            {
                  item->setText(1, tr("No"));
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index