当前位置: 首页>>代码示例>>C++>>正文


C++ deleteItem函数代码示例

本文整理汇总了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()));
}
开发者ID:embicoin,项目名称:Foundations.of.Qt.Development,代码行数:8,代码来源:listdialog.cpp

示例2: deleteItem

void TeethX::lvMain_KeyDown(Win::Event& e)
{
	LPNMLVKEYDOWN p = (LPNMLVKEYDOWN) e.lParam;
	if (p->wVKey == VK_DELETE)
	{
		deleteItem();
	}
}
开发者ID:israelfloresdga,项目名称:Wintempla-Bases-de-Datos-Avanzadas,代码行数:8,代码来源:TeethX.cpp

示例3: deleteItem

void CTabbedInt::reset()
{
	deleteItem(activeTab);
	activeTab = createItem(activeID);
	activeTab->moveTo(pos.topLeft());

	if (active)
		redraw();
}
开发者ID:Ed-von-Schleck,项目名称:vcmi,代码行数:9,代码来源:CIntObjectClasses.cpp

示例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());
}
开发者ID:chenpusn,项目名称:Musicplayer,代码行数:9,代码来源:musicsongssummarizied.cpp

示例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);
}
开发者ID:hinderer,项目名称:brltty,代码行数:9,代码来源:kbd.c

示例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);
    }
}
开发者ID:Distrotech,项目名称:qtjsondb,代码行数:10,代码来源:jsondbsortinglistmodel.cpp

示例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);
        }
    }
}
开发者ID:Salmista-94,项目名称:umbrello,代码行数:13,代码来源:refactoringassistant.cpp

示例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()));
}
开发者ID:Ulle84,项目名称:UllesSourceCode,代码行数:10,代码来源:WidgetListEditor.cpp

示例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;
}
开发者ID:mappcenter,项目名称:lazyboys-pro,代码行数:16,代码来源:ItemDB.cpp

示例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
开发者ID:elisemmc,项目名称:EECS268,代码行数:20,代码来源:BST.cpp

示例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;
}
开发者ID:stephaneAG,项目名称:PengPod700,代码行数:11,代码来源:q3glist.cpp

示例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;
}
开发者ID:stephaneAG,项目名称:PengPod700,代码行数:14,代码来源:q3glist.cpp

示例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;
}
开发者ID:reuteran,项目名称:todo-list,代码行数:54,代码来源:todo.c

示例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();
}
开发者ID:0pq76r,项目名称:SpeedCrunch,代码行数:12,代码来源:userfunctionlistwidget.cpp

示例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()));
}
开发者ID:ncux,项目名称:Simple-Resize,代码行数:12,代码来源:mainwindow.cpp


注:本文中的deleteItem函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。