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


C++ QValueList::end方法代码示例

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


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

示例1: init

void HomeDirNotify::init()
{
    if(mInited)
        return;
    mInited = true;

    KUser current_user;
    QValueList< KUserGroup > groups = current_user.groups();
    QValueList< int > uid_list;

    QValueList< KUserGroup >::iterator groups_it = groups.begin();
    QValueList< KUserGroup >::iterator groups_end = groups.end();

    for(; groups_it != groups_end; ++groups_it)
    {
        QValueList< KUser > users = (*groups_it).users();

        QValueList< KUser >::iterator it = users.begin();
        QValueList< KUser >::iterator users_end = users.end();

        for(; it != users_end; ++it)
        {
            if((*it).uid() >= MINIMUM_UID && !uid_list.contains((*it).uid()))
            {
                uid_list.append((*it).uid());

                QString name = (*it).loginName();
                KURL url;
                url.setPath((*it).homeDir());

                m_homeFoldersMap[name] = url;
            }
        }
    }
}
开发者ID:serghei,项目名称:kde3-kdebase,代码行数:35,代码来源:homedirnotify.cpp

示例2: mod

ScimSetupWindow::ScimSetupWindow(scim::SocketServerThread *parent, const char */*name*/, KConfigSkeleton */*config*/)
 : KCMultiDialog(KDialogBase::TreeList, i18n("Configure skim"), 0), d(new ScimSetupWindowPrivate)
{
    m_mc = SkimPluginManager::self();
    setIcon(KGlobal::iconLoader()->loadIcon("configure", KIcon::NoGroup));
    d->inputServer = parent;
    d->scim_backend_need_update = false;
    setShowIconsInTreeList( true );
    connect( this, SIGNAL( configCommitted( const QCString & ) ),
      KSettings::Dispatcher::self(), SLOT( reparseConfiguration( const QCString & ) ) );
    connect( this, SIGNAL( configCommitted( const QCString & ) ), 
      SLOT(slotConfigurationChangedFor( const QCString & )));
    connect( m_mc, SIGNAL(allPluginsLoaded()), this, SLOT(load()));

    //we cache all the available kcms and their hierarchy, so that we do not
    //need to reload them everytime load() is called
    QValueList<SkimPluginInfo *> skimplugins = SkimPluginInfo::fromServices( KTrader::self()->query( "Skim/SetupDir", "[X-KDE-PluginInfo-Category] == 'Root'" ));

    QValueList<SkimPluginInfo *>::ConstIterator pit;

    ScimSetupWindowPrivate::SetupDirInfo curDir;
    for ( pit = skimplugins.begin(); pit != skimplugins.end(); ++pit )
    {
        curDir.sortedMods.clear();
        curDir.path.clear();
        QValueList< KService::Ptr > services =
                KTrader::self()->query( "Skim/KCModule",
        "[X-KDE-PluginInfo-DisplayParent] == '" + (*pit)->pluginName() + "'" );

        std::multimap<int, int> sortedMods; //map weight to index in mods
        /*if( services.size() > 1)*/
        {
            curDir.path << (*pit)->name();
            curDir.iconfile = (*pit)->icon();

            //sort the kcm according to their weight. 0 will be the first
            for( QValueList<KService::Ptr>::ConstIterator it =
                 services.begin();
                 it != services.end(); ++it )
            {
                KCModuleInfo mod(*it);
                d->mods.push_back(mod);
                curDir.sortedMods.insert(std::pair<int, int> (mod.weight(), d->mods.size()-1));
            }
            QVariant v = ( *pit )->weight();
            int weight = v.isValid () ? v.toInt() : 1000;
            //sort the dir according to their weight. 0 will be the first
            d->dirReposition.insert(std::pair<int, ScimSetupWindowPrivate::SetupDirInfo> (weight, curDir));
        }
    }

    load();

    if(ScimKdeSettings::self()->config()->hasGroup(SetupWindowGroup))
    {
        ScimKdeSettings::self()->config()->setGroup(SetupWindowGroup);
        if( ScimKdeSettings::self()->config()->hasKey(SetupWindowSize))
            resize(ScimKdeSettings::self()->config()->readSizeEntry(SetupWindowSize));
    }
}
开发者ID:scim-im,项目名称:skim,代码行数:60,代码来源:scimsetupwindow.cpp

示例3: askForCorrelograms

void CorrelationView::askForCorrelograms(){  
//If the widget is not about to be deleted, request the data.
 if(!goingToDie){
  dataReady = false;

  //Compute the pairs for all the clusters currently shown.
  const QValueList<int>& shownClusters = view.clusters();
  QValueList<int> clusters;
  QValueList<int>::const_iterator clustersIterator;
  for(clustersIterator = shownClusters.begin(); clustersIterator != shownClusters.end(); ++clustersIterator)
    clusters.append(*clustersIterator);
  qHeapSort(clusters);


  pairs.clear();
  QValueList<Pair>* clusterPairs = new QValueList<Pair>();
  QValueList<int>::iterator iterator;
  int i = 0;
  for(iterator = clusters.begin(); iterator != clusters.end(); ++iterator){
   QValueList<int>::iterator iterator2;
   for(iterator2 = clusters.at(i); iterator2 != clusters.end(); ++iterator2){
    //Create pairs as (*iterator,*iterator2) where *iterator <= *iterator2
    pairs.append(Pair(*iterator,*iterator2));
    clusterPairs->append(Pair(*iterator,*iterator2));
   }
   ++i;
  }

  //Create a thread to get the correlation data for that cluster.
  CorrelationThread* correlationThread = getCorrelations(clusterPairs,clusters);
  threadsToBeKill.append(correlationThread);
 }
}
开发者ID:caffeine-xx,项目名称:klusters,代码行数:33,代码来源:correlationview.cpp

示例4: okClicked

void VariableDialog::okClicked()
{
    QValueList<MetaDataBase::Variable> lst;

    QListViewItemIterator it( varView );
    while ( it.current() != 0 ) {
	MetaDataBase::Variable v;
	v.varName = it.current()->text( 0 ).simplifyWhiteSpace();
	if ( v.varName[ (int)v.varName.length() - 1 ] != ';' )
	    v.varName += ";";
	v.varAccess = it.current()->text( 1 );
	lst << v;
	++it;
    }

    if ( !lst.isEmpty() ) {
	QValueList<MetaDataBase::Variable> invalidLst;
	QValueList<MetaDataBase::Variable>::Iterator it1 = lst.begin();
	QValueList<MetaDataBase::Variable>::Iterator it2;
	for ( ; it1 != lst.end(); ++it1 ) {
	    it2 = it1;
	    ++it2;
	    for ( ; it2 != lst.end(); ++it2 ) {
		if ( MetaDataBase::extractVariableName( (*it1).varName ) ==
		     MetaDataBase::extractVariableName( (*it2).varName ) ) {
		    invalidLst << (*it1);
		    break;
		}
	    }
	}
	if ( !invalidLst.isEmpty() ) {
	    if ( QMessageBox::information( this, tr( "Edit Variables" ),
					   tr( "One variable has been declared twice.\n"
					   "Remove this variable?" ), tr( "&Yes" ), tr( "&No" ) ) == 0 ) {
		for ( it2 = invalidLst.begin(); it2 != invalidLst.end(); ++it2 ) {
		    it = varView->firstChild();
		    while ( it.current() != 0 ) {
			if ( MetaDataBase::extractVariableName( (*it)->text( 0 ).simplifyWhiteSpace() ) ==
			     MetaDataBase::extractVariableName( (*it2).varName ) ) {
			    delete (*it);
			    break;
			}
			++it;
		    }
		}
	    }
	    formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView();
	    return;
	}
    }
    Command *cmd = new SetVariablesCommand( "Edit variables", formWindow, lst );
    formWindow->commandHistory()->addCommand( cmd );
    cmd->execute();
    accept();
}
开发者ID:AliYousuf,项目名称:univ-aca-mips,代码行数:55,代码来源:variabledialogimpl.cpp

示例5: addPendingFolders

void KNCollectionView::addPendingFolders()
{
    QValueList<KNFolder *> folders = knGlobals.folderManager()->folders();
    for(QValueList<KNFolder *>::Iterator it = folders.begin(); it != folders.end(); ++it)
        if(!(*it)->listItem())
            addFolder((*it));
    // now open the folders if they were open in the last session
    for(QValueList<KNFolder *>::Iterator it = folders.begin(); it != folders.end(); ++it)
        if((*it)->listItem())
            (*it)->listItem()->setOpen((*it)->wasOpen());
}
开发者ID:serghei,项目名称:kde3-kdepim,代码行数:11,代码来源:kncollectionview.cpp

示例6: filter

bool OKeyFilterPrivate::filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat )
{
    QValueList<QWSServer::KeyboardFilter*>::Iterator iter;
    for (iter=preFilterList.begin();iter!=preFilterList.end();++iter) {
        if ((*iter)->filter(unicode,keycode,modifiers,isPress,autoRepeat)) {
            return true;
        }
    }
    for (iter=filterList.begin();iter!=filterList.end();++iter) {
        if ((*iter)->filter(unicode,keycode,modifiers,isPress,autoRepeat)) {
            return true;
        }
    }
    return false;
}
开发者ID:opieproject,项目名称:opie,代码行数:15,代码来源:okeyfilter.cpp

示例7: countScalarsVectorsAndStrings

void Plugin::countScalarsVectorsAndStrings(const QValueList<Plugin::Data::IOValue>& table, unsigned& scalars, unsigned& vectors, unsigned& strings, unsigned& numberOfPids) {
  scalars = 0;
  vectors = 0;
  strings = 0;
  numberOfPids = 0;

  for (QValueList<Plugin::Data::IOValue>::ConstIterator it = table.begin(); it != table.end(); ++it) {
    switch ((*it)._type) {
      case Plugin::Data::IOValue::StringType:
        ++strings;
        break;
      case Plugin::Data::IOValue::PidType:
        ++numberOfPids;
      case Plugin::Data::IOValue::FloatType:
        ++scalars;
        break;
      case Plugin::Data::IOValue::TableType:
        if ((*it)._subType == Plugin::Data::IOValue::FloatSubType ||
            (*it)._subType == Plugin::Data::IOValue::FloatNonVectorSubType) {
          ++vectors;
        }
        break;
      default:
        break;
    }
  }
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:27,代码来源:plugin.cpp

示例8: loadCompositeSettingsInternal

void CompMgrClient::loadCompositeSettingsInternal()
{
    m_enableComposite = ScimKdeSettings::enable_Composite();

    disconnect(SkimPluginManager::self(), SIGNAL(allPluginsLoaded()), this, SLOT(updateCompositeSettings()));
    if(m_enableComposite)
    {
        if(!m_createdAtoms || m_useKompmgr != ScimKdeSettings::use_Kompmgr())
        {
            m_useKompmgr = ScimKdeSettings::use_Kompmgr();
            create_X11_atoms();
        }
        connect(SkimPluginManager::self(), SIGNAL(allPluginsLoaded()), this, SLOT(updateCompositeSettings()));
    }
    
    QStringList availableWindows;
    QValueList<QObject *>  list = SkimPluginManager::self()->specialProperyObjects();
    QValueList<QObject *>::iterator it;

    QWidget * w;
    for ( it = list.begin(); it != list.end(); ++it ) {
        w = (*it)->isWidgetType()?static_cast<QWidget *>(*it) : 0;
        if(w)
            availableWindows << w->name();
    }

    m_compSetting.clear();
    for(uint i=0; i < availableWindows.size(); i++)
    {
        fillWidgetSetting(availableWindows[i]);
    }
}
开发者ID:scim-im,项目名称:skim,代码行数:32,代码来源:compmgrclient.cpp

示例9: updateCompositeSettings

void CompMgrClient::updateCompositeSettings(QString widgetname)
{
    if(m_enableComposite)
    {
        QValueList<QObject *>  list = SkimPluginManager::self()->specialProperyObjects();   //TODO: add a property name
        QValueList<QObject *>::iterator it;

        QWidget * w;
        for ( it = list.begin(); it != list.end(); ++it ) {
            w = (*it)->isWidgetType()?static_cast<QWidget *>(*it) : 0;
            if(w)
            {
                if( widgetname == QString::null || w->name() == widgetname)
                {
                    fillWidgetSetting(QString(w->name()), false);
                    if(m_compSetting[w->name()].translucencyEnabled)
                    {
                        setOpacity(w, m_compSetting[w->name()].translucency);
                        kdDebug() << "Updating transparent window '" << w->name() << "'\n";
                    } else
                        setOpacity(w, 100);
                }
            }
        }
    }
}
开发者ID:scim-im,项目名称:skim,代码行数:26,代码来源:compmgrclient.cpp

示例10: cloneProblemList

QValueList<Problem> cloneProblemList( const QValueList<Problem>& list ) {
	QValueList<Problem> ret;
	for( QValueList<Problem>::const_iterator it = list.begin(); it != list.end(); ++it ) {
		ret << Problem( *it, true );
	}
	return ret;
}
开发者ID:serghei,项目名称:kde3-kdevelop,代码行数:7,代码来源:backgroundparser.cpp

示例11: substitute

void CodeManager::substitute() {
    Q_ASSERT(templateIsSubstitutable());

    QString substTxt("/*!POA!*/\n");

    QValueList<PinModel*> pins = model_->pins();
    for (QValueListIterator<PinModel *> it = pins.begin();
         it != pins.end(); ++it)
    {
        PinModel *pin = *it;
        substTxt.append(QString("    np_pio *%1 = (np_pio*) 0x%2;\n")
                            .arg(pin->name())
                            .arg(pin->address(), 0, 16));
    }

    QString source = sourceCode();
    // Note: fucking QRegExp doesn't work over newlines, so
    // we've to double-match... - so QRegExp is useless indeed :((
    int firstIndex = source.find("/*!POA!*/");
    int lastIndex = source.find("/*!AOP!*/");

    Q_ASSERT(firstIndex < lastIndex);
    source.replace(firstIndex, lastIndex - firstIndex, substTxt);
    model_->setSource(source);
    saveSource();
}
开发者ID:BackupTheBerlios,项目名称:poa,代码行数:26,代码来源:codemanager.cpp

示例12: printDebug

// public
void kpDocumentMetaInfo::printDebug (const QString &prefix) const
{
    const QString usedPrefix = !prefix.isEmpty () ?
                                   prefix + QString::fromLatin1 (":") :
                                   QString::null;

    kdDebug () << usedPrefix << endl;

    kdDebug () << "dotsPerMeter X=" << dotsPerMeterX ()
               << " Y=" << dotsPerMeterY ()
               << " offset=" << offset () << endl;

    QValueList <QImageTextKeyLang> keyList = textList ();
    for (QValueList <QImageTextKeyLang>::const_iterator it = keyList.begin ();
         it != keyList.end ();
         it++)
    {
        kdDebug () << "key=" << (*it).key
                   << " lang=" << (*it).lang
                   << " text=" << text (*it)
                   << endl;
    }

    kdDebug () << usedPrefix << "ENDS" << endl;
}
开发者ID:serghei,项目名称:kde3-kdegraphics,代码行数:26,代码来源:kpdocumentmetainfo.cpp

示例13: showMirrorList

void CDDBConfigWidget::showMirrorList()
{
    KCDDB::Sites s;

    QValueList<KCDDB::Mirror> sites = s.siteList();
    QMap<QString, KCDDB::Mirror> keys;
    for (QValueList<KCDDB::Mirror>::Iterator it = sites.begin(); it != sites.end(); ++it)
      if ((*it).transport == KCDDB::Lookup::CDDBP)
        keys[(*it).address + "(CDDBP, " + QString::number((*it).port) + ") " + (*it).description] = *it;
      else
        keys[(*it).address + "(HTTP, " + QString::number((*it).port) + ") " + (*it).description] = *it;

    bool ok;

    if (keys.isEmpty())
    {
      KMessageBox::information(this, i18n("Could not fetch mirror list."), i18n("Could Not Fetch"));
      return;
    }

    QStringList result = KInputDialog::getItemList(i18n("Select mirror"),
      i18n("Select one of these mirrors"), keys.keys(),
      QStringList(), false, &ok, this);

    if (ok && result.count() == 1)
    {
      KCDDB::Mirror m = keys[*(result.begin())];

      kcfg_lookupTransport->setCurrentItem(m.transport == KCDDB::Lookup::CDDBP ? 0 : 1);
      kcfg_hostname->setText(m.address);
      kcfg_port->setValue(m.port);
    }
}
开发者ID:serghei,项目名称:kde3-kdemultimedia,代码行数:33,代码来源:cddbconfigwidget.cpp

示例14: drawClusters

void ClusterView::drawClusters(QPainter& painter,const QValueList<int>& clustersList,bool drawCircles){  
  //Loop on the clusters to be drawn
  QValueList<int>::const_iterator clusterIterator;

  ItemColors& clusterColors = doc.clusterColors();
  Data& clusteringData = doc.data();
         
  for(clusterIterator = clustersList.begin(); clusterIterator != clustersList.end(); ++clusterIterator){        
    //Get the color associated with the cluster and set the color to use to this color
    painter.setPen(clusterColors.color(*clusterIterator));
    //Get the iterator on the spikes of the current cluster
    Data::Iterator spikeIterator = clusteringData.iterator(static_cast<dataType>(*clusterIterator));
    //Iterate over the spikes of the cluster and draw them
    if(drawCircles) for(;spikeIterator.hasNext();spikeIterator.next()){
     QPoint point = spikeIterator(dimensionX,dimensionY);
     painter.setBrush(clusterColors.color(*clusterIterator));
     painter.drawEllipse(point.x() - 1,point.y() - 1,2,2);
    }
    else for(;spikeIterator.hasNext();spikeIterator.next()){
     painter.drawPoint(spikeIterator(dimensionX,dimensionY));
    }
  }

  painter.setBrush(NoBrush);
}
开发者ID:caffeine-xx,项目名称:klusters,代码行数:25,代码来源:clusterview.cpp

示例15: parseQueryResult

void MrmlPart::parseQueryResult( QDomElement& queryResult )
{
    QDomNode child = queryResult.firstChild();
    for ( ; !child.isNull(); child = child.nextSibling() ) {
        if ( child.isElement() ) {
            QDomElement elem = child.toElement();
            QString tagName = elem.tagName();

            if ( tagName == "query-result-element-list" ) {
                QValueList<QDomElement> list =
                    KMrml::directChildElements( elem, "query-result-element" );

                QValueListConstIterator<QDomElement> it = list.begin();
                for ( ; it != list.end(); ++it )
                {
                    QDomNamedNodeMap a = (*it).attributes();
                    m_view->addItem( KURL( (*it).attribute("image-location" ) ),
                                     KURL( (*it).attribute("thumbnail-location" ) ),
                                     (*it).attribute("calculated-similarity"));

                }
            }

            else if ( tagName == "query-result" )
                parseQueryResult( elem );
        }
    }
}
开发者ID:serghei,项目名称:kde3-kdegraphics,代码行数:28,代码来源:mrml_part.cpp


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