void KTagComboBox::insertItem(const QString &text, const QString &tag, const QString &submenu, int index ) { QPopupMenu *pi = checkInsertIndex(popup, tags, submenu); checkInsertPos(pi, text, index); pi->insertItem(text, count(), index); tags.append(tag); }
void KTagComboBox::insertSubmenu(const QString &text, const QString &tag, const QString &submenu, int index) { QPopupMenu *pi = checkInsertIndex(popup, tags, submenu); QPopupMenu *p = new QPopupMenu(pi); checkInsertPos(pi, text, index); pi->insertItem(text, p, count(), index); tags.append(tag); connect( p, SIGNAL(activated(int)), SLOT(internalActivate(int)) ); connect( p, SIGNAL(highlighted(int)), SLOT(internalHighlight(int)) ); }
/** * The Rexx stub for the Queue PUT method. replaces the Array * version because it has slightly different semantics for index * validation. The only valid indexes are those within range * and the size is not adjusted for a put out of bounds. * * @param arguments The array of all arguments sent to the * method (variable arguments allowed * here...the first argument is the item being * added, all other arguments are the index). * @param argCount The number of arguments in the method call. * * @return Always return nothing. */ RexxObject *QueueClass::putRexx(RexxObject *value, RexxObject *index) { requiredArgument(value, ARG_ONE); // make sure we have an index specified before trying to decode this. requiredArgument(index, ARG_TWO); // Validate the index argument, but don't allow expansion. size_t position; if (!validateIndex(&index, 1, ARG_TWO, IndexAccess, position)) { reportException(Error_Incorrect_method_index, index); } // we can only update assigned items, so make sure this is within bounds. checkInsertIndex(position); // set the new value and return nothing put(value, position); return OREF_NULL; }
void KTagComboBox::insertSeparator(const QString &submenu, int index) { QPopupMenu *pi = checkInsertIndex(popup, tags, submenu); pi->insertSeparator(index); tags.append(QString()); }