您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ updateItem函数代码示例

51自学网 2021-06-03 09:13:44
  C++
这篇教程C++ updateItem函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中updateItem函数的典型用法代码示例。如果您正苦于以下问题:C++ updateItem函数的具体用法?C++ updateItem怎么用?C++ updateItem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了updateItem函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: updateItem

void ItemBank::update() {	vector<string>items;	for (vector<Item*>::iterator iter = bank.begin(); iter != bank.end(); iter++) {		items = updateItem(items, *iter);	}		DataStorage* dataStorage = dataStorage->getInstance();	dataStorage->writeToFile(items);	return;}
开发者ID:cs2103aug2014-t14-3c,项目名称:main,代码行数:12,


示例2: Q_ASSERT

void InputManager::updateTree(){    m_tree->clear();    for (quint32 i = 0; i < m_inputMap->universes(); i++)    {        InputPatch* inputPatch = m_inputMap->patch(i);        Q_ASSERT(inputPatch != NULL);        QTreeWidgetItem* item = new QTreeWidgetItem(m_tree);        updateItem(item, inputPatch, i);    }}
开发者ID:speakman,项目名称:qlc,代码行数:12,


示例3: updateItem

void LLNotifications::cancel(LLNotificationPtr pNotif){	if (pNotif == NULL || pNotif->isCancelled()) return;	LLNotificationSet::iterator it=mItems.find(pNotif);	if (it == mItems.end())	{		llerrs << "Attempted to delete nonexistent notification " << pNotif->getName() << llendl;	}	updateItem(LLSD().with("sigtype", "delete").with("id", pNotif->id()), pNotif);	pNotif->cancel();}
开发者ID:OS-Development,项目名称:VW.Singularity,代码行数:12,


示例4: remove

    void TableItem::setItem(const Widget::Ptr& widgetPtr, HorizontalAlign align)    {        if (m_widget != nullptr)            remove(m_widget);        m_widget = widgetPtr;        m_align = align;        updateItem();        if (m_widget != nullptr)            add(m_widget);    }
开发者ID:Dka8,项目名称:TGUI,代码行数:12,


示例5: Item

WSortFilterProxyModel::Item *WSortFilterProxyModel::itemFromSourceIndex(const WModelIndex& sourceParent)  const{  if (!sourceParent.isValid()) {    if (!mappedRootItem_) {      Item *result = new Item(sourceParent);      mappedRootItem_ = result;      updateItem(result);    }    return mappedRootItem_;  }  ItemMap::const_iterator i = mappedIndexes_.find(sourceParent);  if (i == mappedIndexes_.end()) {    Item *result = new Item(sourceParent);    mappedIndexes_[sourceParent] = result;    updateItem(result);    return result;  } else    return dynamic_cast<Item *>(i->second);}
开发者ID:chr-thien,项目名称:wt,代码行数:22,


示例6: updateItem

void KDPluginsListBox::setEnabled( bool state ){  if( state == isEnabled() )  {    return;  }  QListBox::setEnabled( state );  for( uint i=0; i<count(); i++ )  {    updateItem( i );  }}
开发者ID:badele,项目名称:old-projects,代码行数:13,


示例7: updateItem

void ColorDialog::loadColors(){  QStringList contents = LUtils::readFile(filepath);  for(int i=0; i<ui->tree_color->topLevelItemCount(); i++){    QTreeWidgetItem *it = ui->tree_color->topLevelItem(i);    //Get the current value and update the item    QStringList fil = contents.filter(it->whatsThis(0)+"=");    QString val;    for(int i=0; i<fil.length(); i++){       if( fil[i].startsWith(it->whatsThis(0)+"=") ){ val = fil[i]; }    }    updateItem(it, val.section("=",1,1));  }}
开发者ID:HenryHu,项目名称:lumina,代码行数:13,


示例8: updateItem

void SmartListCtrl::thumbManagerUpdate( const std::string& longText ){	if ( !GetSafeHwnd() || longText.empty() )		return;	std::string longTextTmp = longText;	std::replace( longTextTmp.begin(), longTextTmp.end(), '/', '//' );	std::string textTmp = longTextTmp.c_str() + longTextTmp.find_last_of( '//' ) + 1;	updateItem(		AssetInfo( "", textTmp, longTextTmp ),		false /* dont try to remove from cache, it's not there */ );}
开发者ID:siredblood,项目名称:tree-bumpkin-project,代码行数:13,


示例9: args

void InternalLink::handleInternalLink(DesuraId id, uint8 action, const std::vector<std::string> &argsList){	if (g_pMainApp->isOffline() && action != ACTION_LAUNCH)		return;	Args args(argsList);	bool handled = true;	switch (action)	{	case ACTION_UPLOAD		: uploadMCF( id );						break;	case ACTION_CREATE		: createMCF( id );						break;	case ACTION_RESUPLOAD	: resumeUploadMCF( id, args );			break;#ifdef WIN32	case ACTION_INSTALLEDW	: installedWizard();					break;#endif	case ACTION_SHOWSETTINGS: showSettings(args);					break;	case ACTION_APPUPDATELOG: showUpdateLogApp( id.getItem() );		break;	case ACTION_PAUSE		: setPauseItem( id , true );			break;	case ACTION_UNPAUSE		: setPauseItem( id , false );			break;	case ACTION_UNINSTALL	: uninstallMCF( id );					break;	case ACTION_PROMPT		: showPrompt(id, args);					break;	case ACTION_UPDATELOG	: showUpdateLog(id);					break;	case ACTION_DISPCDKEY	: showCDKey(id, args);					break;	default: 		handled = false;		break;	}	if (handled || checkForm(id))		return;	switch (action)	{	case ACTION_INSTALL		: installItem(id, args);				break;	case ACTION_LAUNCH		: launchItem(id, args);					break;	case ACTION_VERIFY		: verifyItem(id, args);					break;	case ACTION_UPDATE		: updateItem(id, args);					break;	case ACTION_TEST		: installTestMCF(id, args);				break;	case ACTION_INSCHECK	: installCheck(id);						break;	case ACTION_SHOWUPDATE	: showUpdateForm(id, args);				break;	case ACTION_SWITCHBRANCH: switchBranch(id, args);				break;	case ACTION_CLEANCOMPLEXMOD: cleanComplexMod(id);				break;	default: 		Warning(gcString("Unknown internal link {0} for item {1}/n.", (uint32)action, id.toInt64()));			break;	}}
开发者ID:CSRedRat,项目名称:desura-app,代码行数:51,


示例10: updateItem

void BearerMonitor::configurationAdded(const QNetworkConfiguration &config, QTreeWidgetItem *parent){    QTreeWidgetItem *item = new QTreeWidgetItem;    updateItem(item, config);    if (parent)        parent->addChild(item);    else        treeWidget->addTopLevelItem(item);    if (config.type() == QNetworkConfiguration::ServiceNetwork) {        foreach (const QNetworkConfiguration &child, config.children())            configurationAdded(child, item);    }
开发者ID:Andreas665,项目名称:qt,代码行数:14,


示例11: mParent

/** Constructor */PeerItem::PeerItem(FeedHolder *parent, uint32_t feedId, const std::string &peerId, uint32_t type, bool isHome):QWidget(NULL), mParent(parent), mFeedId(feedId),	mPeerId(peerId), mType(type), mIsHome(isHome){    /* Invoke the Qt Designer generated object setup routine */    setupUi(this);      messageframe->setVisible(false);    sendmsgButton->setEnabled(false);    /* general ones */    connect( expandButton, SIGNAL( clicked( void ) ), this, SLOT( toggle ( void ) ) );    connect( clearButton, SIGNAL( clicked( void ) ), this, SLOT( removeItem ( void ) ) );    /* specific ones */    connect( chatButton, SIGNAL( clicked( void ) ), this, SLOT( openChat ( void ) ) );    connect( actionNew_Message, SIGNAL( triggered( ) ), this, SLOT( sendMsg ( void ) ) );    connect( quickmsgButton, SIGNAL( clicked( ) ), this, SLOT( togglequickmessage() ) );    connect( cancelButton, SIGNAL( clicked( ) ), this, SLOT( togglequickmessage() ) );    connect( sendmsgButton, SIGNAL( clicked( ) ), this, SLOT( sendMessage() ) );    connect(NotifyQt::getInstance(), SIGNAL(friendsChanged()), this, SLOT(updateItem()));    QMenu *msgmenu = new QMenu();    msgmenu->addAction(actionNew_Message);    quickmsgButton->setMenu(msgmenu);    avatar->setId(mPeerId, false);    expandFrame->hide();    updateItemStatic();    updateItem();}
开发者ID:RedCraig,项目名称:retroshare,代码行数:38,


示例12: FeedItem

/** Constructor */SecurityItem::SecurityItem(FeedHolder *parent, uint32_t feedId, const RsPgpId &gpgId, const RsPeerId &sslId, const std::string &sslCn, const std::string& ip_address,uint32_t type, bool isHome) :    FeedItem(NULL), mParent(parent), mFeedId(feedId),    mGpgId(gpgId), mSslId(sslId), mSslCn(sslCn), mIP(ip_address), mType(type), mIsHome(isHome){	/* Invoke the Qt Designer generated object setup routine */	setupUi(this);	//quickmsgButton->hide();	chatButton->hide();	removeFriendButton->setEnabled(false);	removeFriendButton->hide();	peerDetailsButton->setEnabled(false);	friendRequesttoolButton->hide();	requestLabel->hide();	/* general ones */	connect( expandButton, SIGNAL( clicked( void ) ), this, SLOT( toggle ( void ) ) );	connect( clearButton, SIGNAL( clicked( void ) ), this, SLOT( removeItem ( void ) ) );	/* specific ones */	connect( chatButton, SIGNAL( clicked( void ) ), this, SLOT( openChat ( void ) ) );	//connect( quickmsgButton, SIGNAL( clicked( ) ), this, SLOT( sendMsg() ) );	connect( removeFriendButton, SIGNAL(clicked()), this, SLOT(removeFriend()));	connect( peerDetailsButton, SIGNAL(clicked()), this, SLOT(peerDetails()));	connect( friendRequesttoolButton, SIGNAL(clicked()), this, SLOT(friendRequest()));	connect(NotifyQt::getInstance(), SIGNAL(friendsChanged()), this, SLOT(updateItem()));    avatar->setId(ChatId(mSslId));	expandFrame->hide();	updateItemStatic();	updateItem();}
开发者ID:Naeren,项目名称:RetroShare,代码行数:38,


示例13: updateItem

/*!   /brief TreeModel::propertyChanged   This function is responsible to propagade the changes in the data to   the GUI. */void TreeModel::propertyChanged(){    int propCount   = QObject::sender()->metaObject()->propertyCount();    int signalIndex = QObject::senderSignalIndex();    for ( int i = 0; i < propCount; ++i )    {        QMetaProperty metaProperty = mp_object->metaObject()->property( i );        if ( metaProperty.notifySignalIndex() == signalIndex )        {            QStandardItem* item = m_propertyIndexToItemMap.value( i );            updateItem( item, mp_object, metaProperty );            return;        }    }}
开发者ID:GromeTT,项目名称:KinectTracker,代码行数:20,


示例14: addWidgetToRightSide

BOOL LLPanelDummyClothingListItem::postBuild(){    addWidgetToRightSide("btn_add_panel");    setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, FALSE));    updateItem(wearableTypeToString(mWearableType));    // Make it look loke clothing item - reserve space for 'delete' button    setLeftWidgetsWidth(getChildView("item_icon")->getRect().mLeft);    setWidgetsVisible(false);    reshapeWidgets();    return TRUE;}
开发者ID:WoLf-,项目名称:NaCl-main,代码行数:15,


示例15: getItem

BOOL LLPanelInventoryListItemBase::postBuild(){	LLViewerInventoryItem* inv_item = getItem();	if (inv_item)	{		mIconImage = LLInventoryIcon::getIcon(inv_item->getType(), inv_item->getInventoryType(), inv_item->getFlags(), FALSE);		updateItem(inv_item->getName());	}	setNeedsRefresh(true);	setWidgetsVisible(false);	reshapeWidgets();	return TRUE;}
开发者ID:Belxjander,项目名称:Kirito,代码行数:16,


示例16: postError

QListWidgetItem *PawnConverter::pawnToItem(const Pawn &pawn){    if (pawn.isNull()) {        postError("Can't convert pawn to item: pawn is null");        return nullptr;    }    QListWidgetItem *item = new QListWidgetItem();    if (!updateItem(item, pawn))        return nullptr;    postSuccess(QString("Convertion Pawn %1 to item have been successfull").arg(pawn.name()));    return item;}
开发者ID:orb3b,项目名称:UTManager,代码行数:16,


示例17: updateItem

void PropertyTableModel::changeProperty(const core::property_t& pr) {  for (size_t i = 0; i < data_.size(); ++i) {    PropertyTableItem* it = dynamic_cast<PropertyTableItem*>(data_[i]);  // +    if (!it) {      continue;    }    core::property_t prop = it->property();    if (prop.first == pr.first) {      it->setProperty(pr);      updateItem(index(i, PropertyTableItem::eKey, QModelIndex()),                 index(i, PropertyTableItem::eValue, QModelIndex()));      return;    }  }}
开发者ID:fastogt,项目名称:fastonosql,代码行数:16,


示例18: g_warning

void ControlManagerImpl::setControlSize(int size, bool force){    if ((size < 1) || (size > 7)) {        g_warning("Illegal logical size set: %d", size);    } else if (force || (size != _size)) {        _size = size;        for (std::vector<SPCanvasItem *>::iterator it = _itemList.begin(); it != _itemList.end(); ++it)        {            if (*it) {                updateItem(*it);            }        }        _sizeChangedSignal.emit();    }}
开发者ID:Drooids,项目名称:inkscape,代码行数:17,


示例19: updateItem

void CheatEditorWindow::textEdited() {  QList<QTreeWidgetItem*> items = list->selectedItems();  if(items.count() > 0) {    QTreeWidgetItem *item = items[0];    unsigned n = item->data(0, Qt::UserRole).toUInt();    string scode = codeEdit->text().toUtf8().data();    string sdesc = descEdit->text().toUtf8().data();    SNES::Cheat::cheat_t code;    SNES::cheat.get(n, code);    SNES::cheat.edit(n, code.enabled, scode, sdesc);    updateItem(item);    syncUi();  }}
开发者ID:ben401,项目名称:OpenEmu,代码行数:17,


示例20: insertItem

void KonqCombo::setTemporary( const QString& url, const QPixmap& pix ){    //kDebug() << url << "temporary=" << temporary;    // Insert a temporary item when we don't have one yet    if ( count() == 0 )      insertItem( pix, url, temporary, titleOfURL( url ) );    else    {        if (url != temporaryItem())          applyPermanent();        updateItem( pix, url, temporary, titleOfURL( url ) );    }    setCurrentIndex( temporary );}
开发者ID:theunbelievablerepo,项目名称:dolphin2.1,代码行数:17,


示例21: itItem

void QtGroupBoxPropertyBrowserPrivate::slotUpdate(){    QListIterator<WidgetItem *> itItem(m_recreateQueue);    while (itItem.hasNext()) {        WidgetItem *item = itItem.next();        WidgetItem *par = item->parent;        QWidget *w = 0;        QGridLayout *l = 0;        int oldRow = -1;        if (!par) {            w = q_ptr;            l = m_mainLayout;            oldRow = m_children.indexOf(item);        } else {            w = par->groupBox;            l = par->layout;            oldRow = par->children.indexOf(item);            if (hasHeader(par))                oldRow += 2;        }        if (item->widget) {            item->widget->setParent(w);        } else if (item->widgetLabel) {            item->widgetLabel->setParent(w);        } else {            item->widgetLabel = new QLabel(w);            item->widgetLabel->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed));            item->widgetLabel->setTextFormat(Qt::PlainText);        }        int span = 1;        if (item->widget)            l->addWidget(item->widget, oldRow, 1, 1, 1);        else if (item->widgetLabel)            l->addWidget(item->widgetLabel, oldRow, 1, 1, 1);        else            span = 2;        item->label = new QLabel(w);        item->label->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));        l->addWidget(item->label, oldRow, 0, 1, span);        updateItem(item);    }    m_recreateQueue.clear();}
开发者ID:samuel79,项目名称:qt-solutions,代码行数:46,


示例22: while

void UatDialog::updateItems(){    if (!uat_) return;    // Forcibly sync ui->uaTreeWidget with uat_.    // It would probably be more correct to create a UatModel and    // use it in conjunction with a QTreeView.    while (ui->uatTreeWidget->topLevelItemCount() > (int) uat_->raw_data->len) {        delete (ui->uatTreeWidget->topLevelItem(0));    }    for (guint row = 0; row < uat_->raw_data->len; row++) {        QTreeWidgetItem *item = ui->uatTreeWidget->topLevelItem(row);        if (!item) item = new QTreeWidgetItem(ui->uatTreeWidget);        item->setData(0, Qt::UserRole, qVariantFromValue(row));        updateItem(*item);    }}
开发者ID:kimkucheol,项目名称:wireshark,代码行数:17,


示例23: time

void ProgressTree2::monitoredJobChanged(Job* state){    time_t now;    time(&now);    monitoredJobLastChanged = now;    QTreeWidgetItem* item = findItem(state, true);    if (item)        updateItem(item, state);    if (state->isCompleted()) {        if (item) {            setItemWidget(item, 4, 0);        }    }}
开发者ID:benpope82,项目名称:npackd-cpp,代码行数:17,


示例24: appendItem

void TodoView::newTodo(){  QString tmpStr;  KDPEvent *newEvent;  newEvent = new KDPEvent;  newEvent->setStatus(QString("NEEDS ACTION"));  newEvent->setPriority(1);  calendar->addTodo(newEvent);  tmpStr.sprintf("%i/n",newEvent->getEventId());  tmpStr += "EMPTY/n0/n /n ";  appendItem(tmpStr.data());  repaint();  setCurrentItem(numRows()-1);  updateItem(currentItem(), 3);}
开发者ID:kthxbyte,项目名称:KDE1-Linaro,代码行数:18,


示例25: Q_ASSERT

void OutputManager::slotEditClicked(){	QTreeWidgetItem* item;	OutputPatch* patch;	int universe;	item = m_tree->currentItem();	if (item == NULL)		return;	universe = item->text(KColumnUniverse).toInt() - 1;	patch = _app->outputMap()->patch(universe);	Q_ASSERT(patch != NULL);	OutputPatchEditor ope(this, universe, patch);	if (ope.exec() == QDialog::Accepted)		updateItem(item, patch, universe);}
开发者ID:speakman,项目名称:qlc,代码行数:18,


示例26: fill

bool GxsChannelPostItem::setPost(const RsGxsChannelPost &post, bool doFill){	if (groupId() != post.mMeta.mGroupId || messageId() != post.mMeta.mMsgId) {		std::cerr << "GxsChannelPostItem::setPost() - Wrong id, cannot set post";		std::cerr << std::endl;		return false;	}	mPost = post;	if (doFill) {		fill();	}	updateItem();	return true;}
开发者ID:Naeren,项目名称:RetroShare,代码行数:18,


示例27: QPointF

void QGeoTiledMapPixmapObjectInfo::update(){    int zoomFactor = tiledMapData->zoomFactor();        QPointF pos = tiledMapData->coordinateToWorldReferencePosition(pixmap->coordinate());    QPointF offset = pixmap->offset();    offset *= zoomFactor;    pos += offset;    int width = tiledMapData->worldReferenceSize().width();    int x = pos.x();    if (x > width)        x -= width;    if (x < 0)        x += width;    pos.setX(x);    int rightBound = pos.x() + pixmap->pixmap().width() * zoomFactor;    QPointF pos2 = QPointF(-1.0 * static_cast<qreal>(width / zoomFactor), 0);    if (rightBound > width ) {        if (!pixmapItem2) {            pixmapItem2 = new QGraphicsPixmapItem(pixmapItem1);            pixmapItem2->setPixmap(pixmap->pixmap());        }    } else {        if (pixmapItem2) {            delete pixmapItem2;            pixmapItem2 = 0;        }    }    pixmapItem1->setScale(zoomFactor);    pixmapItem1->setPos(pos);    if (pixmapItem2)        pixmapItem2->setPos(pos2);    updateItem();}
开发者ID:bavanisp,项目名称:qtmobility-1.1.0,代码行数:44,



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


C++ updateLabel函数代码示例
C++ updateInterface函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。