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


C++ QMultiMap::insertMulti方法代码示例

本文整理汇总了C++中QMultiMap::insertMulti方法的典型用法代码示例。如果您正苦于以下问题:C++ QMultiMap::insertMulti方法的具体用法?C++ QMultiMap::insertMulti怎么用?C++ QMultiMap::insertMulti使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QMultiMap的用法示例。


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

示例1: QComboBox

QMultiMap<int, IOptionsDialogWidget *> StatusIcons::optionsDialogWidgets(const QString &ANodeId, QWidget *AParent)
{
	QMultiMap<int, IOptionsDialogWidget *> widgets;
	if (FOptionsManager!=NULL && ANodeId==OPN_APPEARANCE)
	{
		QComboBox *cmbStatusIcons = new QComboBox(AParent);
		cmbStatusIcons->setItemDelegate(new IconsetDelegate(cmbStatusIcons));

		int index = 0;
		for (QMap<QString, IconStorage *>::const_iterator it=FStorages.constBegin(); it!=FStorages.constEnd(); ++it)
		{
			QString name = it.value()->storageProperty(FILE_STORAGE_NAME,it.key());
			cmbStatusIcons->addItem(it.value()->getIcon(SIK_ONLINE),name,it.key());

			cmbStatusIcons->setItemData(index,it.value()->storage(),IconsetDelegate::IDR_STORAGE);
			cmbStatusIcons->setItemData(index,it.value()->subStorage(),IconsetDelegate::IDR_SUBSTORAGE);
			cmbStatusIcons->setItemData(index,true,IconsetDelegate::IDR_HIDE_STORAGE_NAME);

			index++;
		}
		cmbStatusIcons->model()->sort(0);

		widgets.insertMulti(OHO_APPEARANCE_ROSTER, FOptionsManager->newOptionsDialogHeader(tr("Contacts list"),AParent));
		widgets.insertMulti(OWO_APPEARANCE_STATUSICONS, FOptionsManager->newOptionsDialogWidget(Options::node(OPV_STATUSICONS_DEFAULT),tr("Status icons:"),cmbStatusIcons,AParent));
	}
	return widgets;
}
开发者ID:ZerGabriel,项目名称:vacuum-im,代码行数:27,代码来源:statusicons.cpp

示例2:

QMultiMap<int, IOptionsDialogWidget *> RosterItemExchange::optionsDialogWidgets(const QString &ANodeId, QWidget *AParent)
{
	QMultiMap<int, IOptionsDialogWidget *> widgets;
	if (ANodeId == OPN_ROSTERVIEW)
	{
		widgets.insertMulti(OHO_ROSTER_MANAGEMENT,FOptionsManager->newOptionsDialogHeader(tr("Contacts list management"),AParent));
		widgets.insertMulti(OWO_ROSTER_EXCHANGEAUTO,FOptionsManager->newOptionsDialogWidget(Options::node(OPV_ROSTER_EXCHANGE_AUTOAPPROVEENABLED),tr("Allow gateways and group services manage your contacts list"),AParent));
	}
	return widgets;
}
开发者ID:ChALkeR,项目名称:vacuum-im,代码行数:10,代码来源:rosteritemexchange.cpp

示例3: ShortcutOptionsWidget

QMultiMap<int, IOptionsDialogWidget *> ShortcutManager::optionsDialogWidgets(const QString &ANodeId, QWidget *AParent)
{
	QMultiMap<int, IOptionsDialogWidget *> widgets;
	if (ANodeId == OPN_SHORTCUTS)
	{
		widgets.insertMulti(OHO_SHORTCUTS, FOptionsManager->newOptionsDialogHeader(tr("Shortcuts"),AParent));
		widgets.insertMulti(OWO_SHORTCUTS, new ShortcutOptionsWidget(AParent));
	}
	return widgets;
}
开发者ID:RoadWorksSoftware,项目名称:eyecu-qt,代码行数:10,代码来源:shortcutmanager.cpp

示例4: MessengerOptions

QMultiMap<int, IOptionsWidget *> MessageWidgets::optionsWidgets(const QString &ANodeId, QWidget *AParent)
{
	QMultiMap<int, IOptionsWidget *> widgets;
	if (FOptionsManager && ANodeId == OPN_MESSAGES)
	{
		widgets.insertMulti(OWO_MESSAGES, FOptionsManager->optionsHeaderWidget(QString::null,tr("Select the method of sending messages"),AParent));
		widgets.insertMulti(OWO_MESSAGES, new MessengerOptions(AParent));
	}
	return widgets;
}
开发者ID:Rambler-ru,项目名称:Contacts,代码行数:10,代码来源:messagewidgets.cpp

示例5:

QMultiMap<int, IOptionsDialogWidget *> DataStreamsManger::optionsDialogWidgets(const QString &ANodeId, QWidget *AParent)
{
	QMultiMap<int, IOptionsDialogWidget *> widgets;
	if (FOptionsManager && ANodeId==OPN_DATATRANSFER)
	{
		int index = 0;
		foreach(IDataStreamMethod *method, FMethods)
		{
			widgets.insertMulti(OHO_DATATRANSFER_METHODNAME + index, FOptionsManager->newOptionsDialogHeader(tr("Transfer method %1").arg(method->methodName()),AParent));
			widgets.insertMulti(OWO_DATATRANSFER_METHODSETTINGS + index, method->methodSettingsWidget(settingsProfileNode(QUuid(),method->methodNS()),AParent));
			index += 10;
		}
开发者ID:RoadWorksSoftware,项目名称:eyecu-qt,代码行数:12,代码来源:datastreamsmanager.cpp

示例6:

QMultiMap<int, IOptionsWidget *> MainWindowPlugin::optionsWidgets(const QString &ANodeId, QWidget *AParent)
{
	QMultiMap<int, IOptionsWidget *> widgets;
	if (FOptionsManager && ANodeId == OPN_ROSTER)
	{
		widgets.insertMulti(OWO_ROSTER_MAINWINDOW_STAYONTOP, FOptionsManager->optionsNodeWidget(Options::node(OPV_MAINWINDOW_STAYONTOP),tr("Stay on top of other windows"),AParent));
#ifdef Q_OS_WIN
		if (QSysInfo::windowsVersion() == QSysInfo::WV_WINDOWS7)
			widgets.insertMulti(OWO_ROSTER_MAINWINDOW_MINIMIZETOTRAY, FOptionsManager->optionsNodeWidget(Options::node(OPV_MAINWINDOW_MINIMIZETOTRAY_W7),tr("Show application icon in tray"),AParent));
#endif
	}
	return widgets;
}
开发者ID:RandomWalkEagle,项目名称:Contacts,代码行数:13,代码来源:mainwindowplugin.cpp

示例7: updateDataHolder

void Annotations::updateDataHolder(const Jid &AStreamJid, const QList<Jid> &AContactJids)
{
	IRosterIndex *sroot = FRostersModel!=NULL ? FRostersModel->streamRoot(AStreamJid) : NULL;
	if (sroot && !AContactJids.isEmpty())
	{
		QMultiMap<int,QVariant> findData;
		foreach(const Jid &contactJid, AContactJids)
			findData.insertMulti(RDR_PREP_BARE_JID,contactJid.pBare());
		findData.insertMulti(RDR_STREAM_JID,AStreamJid.pFull());

		foreach (IRosterIndex *index, sroot->findChilds(findData,true))
			emit rosterDataChanged(index,RDR_ANNOTATIONS);
	}
开发者ID:Vacuum-IM,项目名称:vacuum-im,代码行数:13,代码来源:annotations.cpp

示例8: UserTuneOptions

QMultiMap<int, IOptionsDialogWidget *> UserTuneHandler::optionsDialogWidgets(const QString &ANodeId, QWidget *AParent)
{
	QMultiMap<int, IOptionsDialogWidget *> widgets;
	if (FOptionsManager && ANodeId == OPN_USERTUNE) {
#ifdef READ_WRITE_TUNE
		widgets.insertMulti(OWO_USERTUNE, new UserTuneOptions(AParent));
#else
		widgets.insertMulti(OWO_USERTUNE, FOptionsManager->optionsNodeWidget(Options::node(OPV_USERTUNE_SHOW_ROSTER_LABEL),tr("Show music icon in roster"),AParent));
		widgets.insertMulti(OWO_USERTUNE, FOptionsManager->optionsNodeWidget(Options::node(OPV_USERTUNE_TAG_FORMAT),tr("Tag format:"),AParent));
#endif
	}
	return widgets;
}
开发者ID:Vacuum-IM,项目名称:usertune,代码行数:13,代码来源:usertune.cpp

示例9: if

QMultiMap<int, IOptionsDialogWidget *> ConnectionManager::optionsDialogWidgets(const QString &ANodeId, QWidget *AParent)
{
	QMultiMap<int, IOptionsDialogWidget *> widgets;
	QStringList nodeTree = ANodeId.split(".",QString::SkipEmptyParts);
	if (nodeTree.count()==3 && nodeTree.at(0)==OPN_ACCOUNTS && nodeTree.at(2)=="Parameters")
	{
		widgets.insertMulti(OHO_ACCOUNTS_PARAMS_CONNECTION,FOptionsManager->newOptionsDialogHeader(tr("Connection"),AParent));
		widgets.insertMulti(OWO_ACCOUNTS_PARAMS_CONNECTION, new ConnectionOptionsWidget(this,Options::node(OPV_ACCOUNT_ITEM,nodeTree.at(1)),AParent));
	}
	else if (ANodeId == OPN_ACCOUNTS)
	{
		widgets.insertMulti(OWO_ACCOUNTS_DEFAULTPROXY, proxySettingsWidget(Options::node(OPV_PROXY_DEFAULT),AParent));
	}
	return widgets;
}
开发者ID:Vacuum-IM,项目名称:vacuum-im,代码行数:15,代码来源:connectionmanager.cpp

示例10: parseHits

void parseHits(QXmlStreamReader & in, Task & task, const QString subtask)
{
    QMultiMap<int, Task::Hit> sortedHits;
    while(!in.atEnd()) {
        QXmlStreamReader::TokenType token = in.readNext();
        if (token == QXmlStreamReader::StartElement) {
            QString elementName = in.name().toString();
            if (0) {
            } else if (elementName.compare("h", Qt::CaseInsensitive) == 0){
                Task::Hit hit;
                QXmlStreamAttributes attrs = in.attributes();
                hit.timestamp = QDateTime::fromString(attrs.value("t").toString(), DATETIMEFORMAT);
                hit.duration = attrs.value("d").toString().toUInt();
                sortedHits.insertMulti(hit.timestamp.toTime_t(), hit);
            }
        } else if (token == QXmlStreamReader::EndElement && in.name().toString().compare("hits", Qt::CaseInsensitive) == 0) {
            break;
        }
    }

    // remove duplicates
    QMultiMap<int, Task::Hit>::iterator itr =  sortedHits.begin();
    Task::Hit prev;
    while(itr != sortedHits.end()) {
        if (itr.value() == prev)
            itr = sortedHits.erase(itr);
        else {
            prev = itr.value();
            itr++;
        }
    }
    task.hits[subtask] = sortedHits.values();
}
开发者ID:zanettea,项目名称:SAK,代码行数:33,代码来源:task.cpp

示例11: locker

QMultiMap<uint,uint> *SDBCache::loadMap(QString id, QString db,QMultiMap<uint,uint> **origin){

    QMutexLocker locker(this->_mutex);
//    if(this->_mapCache.contains(db + "/" + id)){
//        Log::add(tr("Loading from memory cache: %1").arg(db + "/" + id),Log::Debug);
//        return this->_mapCache.object(db + "/" + id);
//    }

    if(this->isKeyCached(this->_mapCacheHash,db + "/" + id)){
        //Log::add(tr("Loading from memory cache: %1").arg(db + "/" + id),Log::Debug);
        return this->cacheObject(this->_mapCacheHash,&this->_mapCacheHistory,&this->_mapCacheMax,db + "/" + id).v;
    }
    //Log::add(tr("Loading from cache file: %1").arg(db + "/" + id),Log::Debug);


    QMultiMap<uint,uint> *map = new QMultiMap<uint,uint>();
    QString data = this->load(id,db,0,true);
    QStringList sl = data.split(",");

    if(sl.length()%2 == 0){

        for(int i = 0; i < sl.length();i+=2){
            map->insertMulti(QVariant(sl.at(i)).toUInt(),QVariant(sl.at(i+1)).toUInt());
        }

    }

//    QMultiMap<uint,uint> *cpy = new QMultiMap<uint,uint>(*map);
//    this->_mapCache.insert(db + "/" + id, map, 1);
    SDBCache::MapCacheNode n;
    n.v = map;
    n.p = origin;
    this->addCacheEntry(&this->_mapCacheHistory,this->_mapCacheHash,db + "/" + id, n, &this->_mapCacheMax);
    return map;
}
开发者ID:okirmis,项目名称:sdb-server,代码行数:35,代码来源:sdbcache.cpp

示例12: SettingsGoogle

QMultiMap<int, IOptionsDialogWidget *> MapSourceGoogle::optionsDialogWidgets(const QString &ANodeId, QWidget *AParent)
{
	QMultiMap<int, IOptionsDialogWidget *> widgets;
	if (ANodeId == OPN_MAP_GOOGLE )
		widgets.insertMulti(OWO_MAPSOURCE, new SettingsGoogle(AParent));
	return widgets;
}
开发者ID:RoadWorksSoftware,项目名称:eyecu-qt,代码行数:7,代码来源:mapsourcegoogle.cpp

示例13: operator

long YawDetector::operator()(QString image){
	auto pair1 = position(image);
	size_t eyes1Size = size(pair1);
	long position1 = pair1.first + pair1.second;

	QMultiMap<long, QString> scores;
	auto images = positions.keys();
	foreach(QString image, images){
		auto pair2 = positions.value(image);
		long score = 0;

		if(eyes1Size != size(pair2)){
			score = ONE_MILLION;
		} else {
			long position2 = pair2.first + pair2.second;
			if(eyes1Size == 0){
				score = 0;
			} else if(eyes1Size == 1){
				if((pair1.first == 0 && pair2.first == 0) || (pair1.second == 0 && pair2.second == 0)){
					score = (position1 - position2);
				} else {
					score = ONE_MILLION;
				}
			} else {
				score = (position1 - position2);
			}
		}

		scores.insertMulti(std::abs(score), image);
	}
开发者ID:Gonaz,项目名称:HeadPoseEstimation,代码行数:30,代码来源:yawdetector.cpp

示例14: rebuildRows

void ChatSearchFromController::rebuildRows() {
	auto ms = getms();
	auto wasEmpty = !delegate()->peerListFullRowsCount();

	auto now = unixtime();
	QMultiMap<int32, UserData*> ordered;
	if (_chat->noParticipantInfo()) {
		AuthSession::Current().api().requestFullPeer(_chat);
	} else if (!_chat->participants.isEmpty()) {
		for (auto i = _chat->participants.cbegin(), e = _chat->participants.cend(); i != e; ++i) {
			auto user = i.key();
			ordered.insertMulti(App::onlineForSort(user, now), user);
		}
	}
	for_const (auto user, _chat->lastAuthors) {
		if (user->isInaccessible()) continue;
		appendRow(user);
		if (!ordered.isEmpty()) {
			ordered.remove(App::onlineForSort(user, now), user);
		}
	}
	if (!ordered.isEmpty()) {
		for (auto i = ordered.cend(), b = ordered.cbegin(); i != b;) {
			appendRow(*(--i));
		}
	}
	checkForEmptyRows();
	delegate()->peerListRefreshRows();
}
开发者ID:eegorov,项目名称:tdesktop,代码行数:29,代码来源:dialogs_search_from_controllers.cpp

示例15: TuneListenerFileOptions

QMultiMap<int, IOptionsDialogWidget *> TuneListenerFile::optionsDialogWidgets(const QString &ANodeId, QWidget *AParent)
{
	QMultiMap<int, IOptionsDialogWidget *> widgets;
	if (ANodeId == OPN_PEP)
		widgets.insertMulti(OWO_PEP_USERTUNE_FILE, new TuneListenerFileOptions(AParent));
    return widgets;
}
开发者ID:RoadWorksSoftware,项目名称:eyecu-qt,代码行数:7,代码来源:tunelistenerfile.cpp


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