本文整理汇总了C++中deleteItem函数的典型用法代码示例。如果您正苦于以下问题:C++ deleteItem函数的具体用法?C++ deleteItem怎么用?C++ deleteItem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了deleteItem函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QDialog
ListDialog::ListDialog() : QDialog()
{
ui.setupUi(this);
connect(ui.addButton, SIGNAL(clicked()), this, SLOT(addItem()));
connect(ui.editButton, SIGNAL(clicked()), this, SLOT(editItem()));
connect(ui.deleteButton, SIGNAL(clicked()), this, SLOT(deleteItem()));
}
示例2: deleteItem
void TeethX::lvMain_KeyDown(Win::Event& e)
{
LPNMLVKEYDOWN p = (LPNMLVKEYDOWN) e.lParam;
if (p->wVKey == VK_DELETE)
{
deleteItem();
}
}
示例3: deleteItem
void CTabbedInt::reset()
{
deleteItem(activeTab);
activeTab = createItem(activeID);
activeTab->moveTo(pos.topLeft());
if (active)
redraw();
}
示例4: menu
void MusicSongsSummarizied::contextMenuEvent(QContextMenuEvent *event)
{
QMenu menu(this);
menu.setStyleSheet(MusicUIObject::MMenuStyle02);
menu.addAction(QIcon(":/contextMenu/delete"), tr("deleteItem"), this, SLOT(deleteItem()));
menu.addAction(QIcon(":/contextMenu/add"), tr("addNewItem"), this, SLOT(addNewItem()));
menu.addAction(tr("changItemName"), this, SLOT(changItemName()));
menu.exec(event->globalPos());
}
示例5: destroyKeyboardInstanceObject
void
destroyKeyboardInstanceObject (KeyboardInstanceObject *kio) {
flushKeyEvents(kio);
if (kio->events.buffer) free(kio->events.buffer);
deleteItem(kio->kmo->instanceQueue, kio);
if (kio->kix) destroyKeyboardInstanceExtension(kio->kix);
free(kio);
}
示例6: addItem
void JsonDbSortingListModelPrivate::sendNotifications(int partitionIndex, const QVariantMap &v, QJsonDbWatcher::Action action)
{
if (action == QJsonDbWatcher::Created) {
addItem(v, partitionIndex);
} else if (action == QJsonDbWatcher::Removed) {
deleteItem(v, partitionIndex);
} else if (action == QJsonDbWatcher::Updated) {
updateItem(v, partitionIndex);
}
}
示例7: currentItem
/**
* Slot for deleting an item called from the popup menu.
*/
void RefactoringAssistant::deleteItem()
{
QTreeWidgetItem *item = currentItem();
if (item) {
UMLObject *o = findUMLObject(item);
if (o) {
deleteItem(item, o);
}
}
}
示例8: WidgetListItem
void WidgetListEditor::addItem(QWidget *item)
{
WidgetListItem* widgetListItem = new WidgetListItem(this);
widgetListItem->setItem(item);
ui->list->addWidget(widgetListItem);
connect(widgetListItem, SIGNAL(deleteItem()), this, SLOT(on_deleteItem()));
connect(widgetListItem, SIGNAL(moveUp()), this, SLOT(on_moveUp()));
connect(widgetListItem, SIGNAL(moveDown()), this, SLOT(on_moveDown()));
}
示例9: deleteAllItem
/**
* Xoa tat ca cac item co itemID thuoc list itemIDs.
* @param itemIDs
* @return bool
*/
bool ItemDB::deleteAllItem(vector<string> itemIDs, ItemTagDB& itemTagDB) {
int size = itemIDs.size();
bool result = true;
for (int i = 0; i < size; i++) {
if (!deleteItem(itemIDs[i], itemTagDB)) {
poco_error_f1(*logger, "deleteAllItem: Error to delete ItemID = %s", itemIDs[i]);
result = false;
}
}
return result;
}
示例10: throw
void BST::deleteItem(TreeNode *& treePtr,
KeyType searchKey)
throw(TreeException)
// Calls: deleteNodeItem.
{
if (treePtr == NULL)
throw TreeException("TreeException: delete failed"); // empty tree
else if (searchKey == treePtr->item.getKey())
// item is in the root of some subtree
deleteNodeItem(treePtr); // delete the item
// else search for the item
else if (searchKey < treePtr->item.getKey())
// search the left subtree
deleteItem(treePtr->leftChildPtr, searchKey);
else // search the right subtree
deleteItem(treePtr->rightChildPtr, searchKey);
} // end deleteItem
示例11: unlink
bool Q3GList::removeRef( Q3PtrCollection::Item d )
{
if ( findRef(d) == -1 )
return false;
Q3LNode *n = unlink();
if ( !n )
return false;
deleteItem( n->data );
delete n;
return true;
}
示例12: locate
/*!
Replaces the item at index \a index with \a d.
*/
bool Q3GList::replaceAt( uint index, Q3PtrCollection::Item d )
{
Q3LNode *n = locate( index );
if ( !n )
return false;
if ( n->data != d ) {
deleteItem( n->data );
n->data = newItem( d );
}
return true;
}
示例13: main
int main(int argc, char *argv[])
{
FILE *file = initFile();
init(file);
if(argc == 1){
printItems();
} else {
if(!strcmp(argv[1],"add")){
if(argc<3){
printf("Usage: todo add [<priority>] <text>\n");
} else {
insertItem(argv,argc);
}
}
if(!strcmp(argv[1],"del")){
if(argc<3){
printf("Usage: todo del <id>\n");
} else {
deleteItem(atoi(argv[2]));
}
}
if(!strcmp(argv[1],"swap")){
if(argc<4){
printf("Usage: todo swap <id1> <id2>\n");
} else {
swapIDs(atoi(argv[2]), atoi(argv[3]));
}
}
/*
if(!strcmp(argv[1],"prio")){
if(argc < 4){
printf("Usage: todo prio <id> <new_prio>\n");
} else {
changePrio(atoi(argv[2]), atoi(argv[3]));
}
}
*/
}
cleanUp();
return 0;
}
示例14: deleteItem
void UserFunctionListWidget::keyPressEvent(QKeyEvent* event)
{
if (event->key() == Qt::Key_Delete)
deleteItem();
else if (event->key() == Qt::Key_E)
editItem();
else {
QWidget::keyPressEvent(event);
return;
}
event->accept();
}
示例15: QMainWindow
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->progressBar->setVisible(false);
ui->widthSpinBox->setValue(Settings::instance()->width());
ui->heightSpinBox->setValue(Settings::instance()->height());
new QShortcut(QKeySequence(Qt::Key_Delete), this, SLOT(deleteItem()));
}