本文整理汇总了C++中kurl::List::end方法的典型用法代码示例。如果您正苦于以下问题:C++ List::end方法的具体用法?C++ List::end怎么用?C++ List::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kurl::List
的用法示例。
在下文中一共展示了List::end方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: svnLog
// Right now, only one item for each action.
void subversionCore::svnLog( const KURL::List& list,
int revstart, QString revKindStart, int revend, QString revKindEnd,
bool discorverChangedPath, bool strictNodeHistory )
{
// ensure that part has repository information. This info is used to retrieve root repository URL
if( m_part->m_prjInfoMap.count() < 1 )
clientInfo( KURL(m_part->project()->projectDirectory()), false, m_part->m_prjInfoMap );
KURL servURL = m_part->baseURL();
if ( servURL.isEmpty() ) servURL="kdevsvn+svn://blah/";
if ( ! servURL.protocol().startsWith( "kdevsvn+" ) ) {
servURL.setProtocol( "kdevsvn+" + servURL.protocol() ); //make sure it starts with "svn"
}
kdDebug(9036) << "servURL : " << servURL.prettyURL() << endl;
QByteArray parms;
QDataStream s( parms, IO_WriteOnly );
// prepare arguments
int cmd = 4;
// int revstart = -1, revend = 0;
// QString revKindStart = "HEAD", revKindEnd = "";
// bool repositLog = true, discorverChangedPath = true, strictNodeHistory = true;
s << cmd << revstart << revKindStart << revend << revKindEnd;
s << discorverChangedPath << strictNodeHistory;
for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
kdDebug(9036) << "svnCore: adding to list: " << (*it).prettyURL() << endl;
s << *it;
}
SimpleJob * job = KIO::special(servURL, parms, false);
connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotLogResult( KIO::Job * ) ) );
// progress info. LogView is allowed and meaninful only for one url in KDev3.4
initProcessDlg( (KIO::Job*)job, (*(list.begin())).prettyURL() , i18n("Subversion Log View") );
}
示例2: slotInsertFolderAfterCopying
void ProjectNewLocal::slotInsertFolderAfterCopying(const KURL::List& a_urlList)
{
KURL::List::ConstIterator it;
KURL dirURL;
for (it = a_urlList.begin(); it != a_urlList.end(); ++it)
{
dirURL = *it;
// dirURL.adjustPath(1);
KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*", this, false);
progressBar->setTotalSteps(files.count() - 1);
progressBar->setTextEnabled(true);
KURL u;
for (uint i = 0; i < files.count(); i++)
{
u = files[i];
if ( !fileList.contains(u) && u.path() != "." && u.path() != ".." )
{
fileList.append(u);
listView->addItem(u, KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
QListViewItem *it = listView->itemByUrl(u);
if (it)
{
it->setSelected(true);
listView->slotSelectFile(it);
}
progressBar->setValue(i);
}
}
//listView->selectAll(false);
progressBar->setTotalSteps(1);
progressBar->setValue(0);
progressBar->setTextEnabled(false);
}
}
示例3: dropEvent
void ItemView::dropEvent(QDropEvent *event) {
removeDragItem();
KURL::List urls;
if (KURLDrag::decode(event, urls)) {
// Then it is URLs that we can decode :)
const KURL::List::iterator end = urls.end();
for (KURL::List::iterator it = urls.begin(); it != end; ++it) {
DocManager::self()->openURL(*it);
}
return;
}
if (!QString(event->format()).startsWith("ktechlab/"))
return;
QString text;
QDataStream stream(event->encodedData(event->format()), IO_ReadOnly);
stream >> text;
// Get a new component item
p_itemDocument->addItem(text, mousePosToCanvasPos(event->pos()), true);
setFocus();
}
示例4: eventFilter
bool ToolsConfigWidget::eventFilter(QObject *o, QEvent *e)
{
if (e->type() == QEvent::DragEnter || e->type() == QEvent::DragMove) {
QDragMoveEvent *dme = static_cast<QDragMoveEvent*>(e);
if (KURLDrag::canDecode(dme))
dme->accept();
return true;
} else if (e->type() == QEvent::Drop) {
QDropEvent *de = static_cast<QDropEvent*>(e);
KURL::List fileList;
if (KURLDrag::decode(de, fileList)) {
KURL::List::ConstIterator it;
for (it = fileList.begin(); it != fileList.end(); ++it) {
if ((*it).isLocalFile() && KDesktopFile::isDesktopFile((*it).path())) {
KDesktopFile df((*it).path());
ToolsConfigEntry *entry = new ToolsConfigEntry;
entry->menutext = df.readName();
entry->cmdline = (*it).path();
entry->isdesktopfile = true;
entry->captured = false;
addEntry(entry, &m_toolsmenuEntries);
}
}
}
return true;
}
return ToolsConfigWidgetBase::eventFilter(o, e);
}
示例5: slotUpdateFileList
void PICComponent::slotUpdateFileList()
{
QStringList preFileList = KTechlab::self()->recentFiles();
QStringList fileList;
if ( ProjectInfo * info = ProjectManager::self()->currentProject() )
{
const KUrl::List urls = info->childOutputURLs( ProjectItem::AllTypes, ProjectItem::ProgramOutput );
KUrl::List::const_iterator urlsEnd = urls.end();
for ( KUrl::List::const_iterator it = urls.begin(); it != urlsEnd; ++it )
fileList << (*it).path();
}
const QStringList::iterator end = preFileList.end();
for ( QStringList::iterator it = preFileList.begin(); it != end; ++it )
{
QString file = KUrl(*it).path();
if ( (file.endsWith(".flowcode") || file.endsWith(".asm") || file.endsWith(".cod") || file.endsWith(".basic") || file.endsWith(".microbe") ) && !fileList.contains(file) ) {
fileList.append(file);
}
}
QString fileName = dataString("program");
property("program")->setAllowed(fileList);
property("program")->setValue( fileName.isEmpty() ? _def_PICComponent_fileName : fileName );
}
示例6: setImages
void GPSSyncDialog::setImages(const KUrl::List& images)
{
for ( KUrl::List::ConstIterator it = images.begin(); it != images.end(); ++it )
{
KipiImageItem* const newItem = new KipiImageItem(iface(), *it);
newItem->loadImageData(true, false);
d->imageModel->addItem(newItem);
}
QList<QPersistentModelIndex> imagesToLoad;
for (int i=0; i<d->imageModel->rowCount(); ++i)
{
imagesToLoad << d->imageModel->index(i, 0);
}
slotSetUIEnabled(false);
slotProgressSetup(imagesToLoad.count(), i18n("Loading metadata - %p%"));
// initiate the saving
d->fileIOCountDone = 0;
d->fileIOCountTotal = imagesToLoad.count();
d->fileIOFutureWatcher = new QFutureWatcher<QPair<KUrl, QString> >(this);
connect(d->fileIOFutureWatcher, SIGNAL(resultsReadyAt(int,int)),
this, SLOT(slotFileMetadataLoaded(int,int)));
d->fileIOFuture = QtConcurrent::mapped(imagesToLoad, LoadFileMetadataHelper(d->imageModel));
d->fileIOFutureWatcher->setFuture(d->fileIOFuture);
}
示例7: slotFilesDropped
//-----------------------------------------------------------------------------
void SplashInstaller::slotFilesDropped(const KUrl::List &urls)
{
for(KUrl::List::ConstIterator it = urls.constBegin();
it != urls.end();
++it)
addNewTheme(*it);
}
示例8: contentsDropEvent
void KonqSidebarTree::contentsDropEvent( QDropEvent *ev )
{
if (d->m_dropMode == SidebarTreeMode) {
m_autoOpenTimer->stop();
if ( !selectedItem() )
{
// KonqOperations::doDrop( 0L, m_dirtreeDir.dir, ev, this );
KURL::List urls;
if ( KURLDrag::decode( ev, urls ) )
{
for(KURL::List::ConstIterator it = urls.begin();
it != urls.end(); ++it)
{
addURL(0, *it);
}
}
}
else
{
KonqSidebarTreeItem *selection = static_cast<KonqSidebarTreeItem *>( selectedItem() );
selection->drop( ev );
}
} else {
KListView::contentsDropEvent(ev);
}
}
示例9: f
void K3b::MovixDoc::addUrlsAt( const KUrl::List& urls, int pos )
{
QList<K3b::MovixFileItem*> items;
for( KUrl::List::ConstIterator it = urls.begin(); it != urls.end(); ++it ) {
KUrl url = K3b::convertToLocalUrl( *it );
QFileInfo f( url.toLocalFile() );
if( !f.isFile() || !url.isLocalFile() )
continue;
QString newName = f.fileName();
bool ok = true;
while( ok && nameAlreadyInDir( newName, root() ) ) {
newName = KInputDialog::getText( i18n("Enter New Filename"),
i18n("A file with that name already exists. Please enter a new name:"),
newName, &ok, view() );
}
if( ok ) {
MovixFileItem* newItem = new MovixFileItem( f.absoluteFilePath(), *this, newName );
root()->addDataItem( newItem );
items.append( newItem );
}
}
addMovixItems( items, pos );
}
示例10: slotInsertFilesAfterCopying
void ProjectNewLocal::slotInsertFilesAfterCopying(const KURL::List& a_urlList)
{
KURL::List::ConstIterator it;
KURL u;
progressBar->setTotalSteps(a_urlList.count() - 1);
progressBar->setTextEnabled(true);
for (it = a_urlList.begin(); it != a_urlList.end(); ++it)
{
u = QExtFileInfo::toRelative(*it, baseURL, false);
if ( !fileList.contains(u))
{
fileList.append(u);
QListViewItem *it = listView->addItem(u, KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
if (it)
{
it->setSelected(true);
listView->slotSelectFile(it);
}
progressBar->advance(1);
}
}
progressBar->setTotalSteps(1);
progressBar->setValue(0);
progressBar->setTextEnabled(false);
}
示例11: switch
void K3bExporter::exportViaCmdLine( const KURL::List &urls, int openmode )
{
QCString cmdOption;
switch( openmode ) {
case AudioCD:
cmdOption = "--audiocd";
break;
case DataCD:
cmdOption = "--datacd";
break;
case Abort:
return;
}
KProcess *process = new KProcess;
*process << "k3b";
*process << cmdOption;
KURL::List::ConstIterator it;
KURL::List::ConstIterator end( urls.end() );
for( it = urls.begin(); it != end; ++it )
*process << ( *it ).path();
if( !process->start( KProcess::DontCare ) )
KMessageBox::error( 0, i18n("Unable to start K3b.") );
}
示例12: slotRemoveImagesDesc
void WmWidget::slotRemoveImagesDesc(const KUrl::List urls)
{
for (KUrl::List::const_iterator it = urls.begin(); it != urls.end(); ++it)
{
QString path = (*it).path();
d->imagesDescInfo.remove(path);
kDebug() << "Remove" << path << "; new length:" << d->imagesDescInfo.size();
}
}
示例13: dlg
int K3bDataUrlAddingDialog::addUrls( const KURL::List& urls,
K3bDirItem* dir,
QWidget* parent )
{
if( urls.isEmpty() )
return 0;
//
// A common mistake by beginners is to try to burn an iso image
// with a data project. Let's warn them
//
if( urls.count() == 1 ) {
K3bIso9660 isoF( urls.first().path() );
if( isoF.open() ) {
if( KMessageBox::warningYesNo( parent,
i18n("<p>The file you are about to add to the project is an ISO9660 image. As such "
"it can be burned to a medium directly since it already contains a file "
"system.<br>"
"Are you sure you want to add this file to the project?"),
i18n("Adding image file to project"),
i18n("Add the file to the project"),
i18n("Burn the image directly") ) == KMessageBox::No ) {
// very rough dvd image size test
if( K3b::filesize( urls.first() ) > 1000*1024*1024 )
k3bappcore->k3bMainWindow()->slotWriteDvdIsoImage( urls.first() );
else
k3bappcore->k3bMainWindow()->slotWriteCdImage( urls.first() );
return 0;
}
}
}
K3bDataUrlAddingDialog dlg( dir->doc(), parent );
dlg.m_urls = urls;
for( KURL::List::ConstIterator it = urls.begin(); it != urls.end(); ++it )
dlg.m_urlQueue.append( qMakePair( K3b::convertToLocalUrl(*it), dir ) );
dlg.slotAddUrls();
int ret = QDialog::Accepted;
if( !dlg.m_urlQueue.isEmpty() ) {
dlg.m_dirSizeJob->setUrls( urls );
dlg.m_dirSizeJob->setFollowSymlinks( dir->doc()->isoOptions().followSymbolicLinks() );
dlg.m_dirSizeJob->start();
ret = dlg.exec();
}
// make sure the dir size job is finished
dlg.m_dirSizeJob->cancel();
K3bSignalWaiter::waitForJob( dlg.m_dirSizeJob );
QString message = dlg.resultMessage();
if( !message.isEmpty() )
KMessageBox::detailedSorry( parent, i18n("Problems while adding files to the project."), message );
return ret;
}
示例14: addSong
void CollectionDialog::addSong()
{
KURL::List urls = KFileDialog::getOpenURLs(":MidiFiles",
"*.kar *.mid *.kar.gz *.mid.gz\n*.kar *.kar.gz\n*.mid *.mid.gz\n*",this);
KURL::List::Iterator it;
for( it = urls.begin(); it != urls.end(); ++it )
addSong(*it);
}
示例15: dropEvent
void panaWidget::dropEvent(QDropEvent* event)
{
KURL::List urlList;
if( KURLDrag::decode(event, urlList) )
{
KURL::List::iterator it;
KURL::List::iterator end( urlList.end() );
for (it = urlList.begin(); it != end; ++it )
emit emitURL(*it);
}
}