本文整理汇总了C++中kurl::List::empty方法的典型用法代码示例。如果您正苦于以下问题:C++ List::empty方法的具体用法?C++ List::empty怎么用?C++ List::empty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kurl::List
的用法示例。
在下文中一共展示了List::empty方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setPostURLS
void MailingList::setPostURLS ( const KUrl::List& lst )
{
mFeatures |= Post;
if ( lst.empty() ) {
mFeatures ^= Post;
}
mPostURLS = lst;
}
示例2: setUnsubscribeURLS
void MailingList::setUnsubscribeURLS( const KUrl::List& lst )
{
mFeatures |= Unsubscribe;
if ( lst.empty() ) {
mFeatures ^= Unsubscribe;
}
mUnsubscribeURLS = lst;
}
示例3: setArchiveURLS
void MailingList::setArchiveURLS( const KUrl::List& lst )
{
mFeatures |= Archive;
if ( lst.empty() ) {
mFeatures ^= Archive;
}
mArchiveURLS = lst;
}
示例4: setHelpURLS
void MailingList::setHelpURLS( const KUrl::List& lst )
{
mFeatures |= Help;
if ( lst.empty() ) {
mFeatures ^= Help;
}
mHelpURLS = lst;
}
示例5: setOwnerURLS
void MailingList::setOwnerURLS( const KUrl::List& lst )
{
mFeatures |= Owner;
if ( lst.empty() ) {
mFeatures ^= Owner;
}
mOwnerURLS = lst;
}
示例6: slotAddItems
void ExpoBlendingDlg::slotAddItems(const KUrl::List& urls)
{
if (!urls.empty())
{
d->mngr->thread()->identifyFiles(urls);
if (!d->mngr->thread()->isRunning())
d->mngr->thread()->start();
}
}
示例7:
void
MailingList::setSubscribeURLS( const KURL::List& lst )
{
mFeatures |= Subscribe;
if ( lst.empty() ) {
mFeatures ^= Subscribe;
}
mSubscribeURLS = lst;
}
示例8: slotAddItems
void ItemsPage::slotAddItems(const KUrl::List& urls)
{
if (!urls.empty())
{
d->mngr->thread()->identifyFiles(urls);
if (!d->mngr->thread()->isRunning())
d->mngr->thread()->start();
}
slotImageListChanged();
}
示例9: slotFileEnc
void KgpgLibrary::slotFileEnc(KURL::List urls,QStringList opts,QStringList defaultKey,KShortcut goDefaultKey)
{
///////////////////////////////////////////////////////////////////////// encode file file
if (!urls.empty()) {
urlselecteds=urls;
if (defaultKey.isEmpty()) {
QString fileNames=urls.first().fileName();
if (urls.count()>1) fileNames+=",...";
popupPublic *dialogue=new popupPublic(0,"Public keys",fileNames,true,goDefaultKey);
connect(dialogue,SIGNAL(selectedKey(QStringList,QStringList,bool,bool)),this,SLOT(startencode(QStringList,QStringList,bool,bool)));
dialogue->exec();
delete dialogue;
} else
示例10: addItems
void BatchDialog::addItems(const KUrl::List& itemList)
{
QString ext;
switch(d->saveSettingsBox->fileFormat())
{
case SaveSettingsWidget::OUTPUT_JPEG:
ext = "jpg";
break;
case SaveSettingsWidget::OUTPUT_TIFF:
ext = "tif";
break;
case SaveSettingsWidget::OUTPUT_PPM:
ext = "ppm";
break;
case SaveSettingsWidget::OUTPUT_PNG:
ext = "png";
break;
}
KUrl::List urlList;
QPixmap pix(SmallIcon("image-x-generic", KIconLoader::SizeLarge, KIconLoader::DisabledState));
for (KUrl::List::const_iterator it = itemList.begin();
it != itemList.end(); ++it)
{
KUrl url = *it;
QFileInfo fi(url.path());
if (fi.exists() && !findItem(url))
{
QString dest = fi.baseName() + QString(".") + ext;
new CListViewItem(d->listView, pix, url, dest);
urlList.append(url);
}
}
if (!urlList.empty())
{
if (!d->iface->hasFeature(KIPI::HostSupportsThumbnails))
d->thread->thumbRawFiles(urlList);
else
d->iface->thumbnails(urlList, 256);
d->thread->identifyRawFiles(urlList);
if (!d->thread->isRunning())
d->thread->start();
}
}
示例11: remove
DvcsJob::JobStatus GitRunner::remove(const KUrl::List &files)
{
if (files.empty())
return m_jobStatus = DvcsJob::JobCancelled;
DvcsJob *job = new DvcsJob();
initJob(*job);
*job << "rm";
QStringList stringFiles = files.toStringList();
while (!stringFiles.isEmpty()) {
*job << m_lastRepoRoot->pathOrUrl() + '/' + stringFiles.takeAt(0);
}
startJob(*job);
return m_jobStatus;
}
示例12: add
void GitRunner::add(const KUrl::List &localLocations)
{
if (localLocations.empty()) {
return;
}
QStringList command;
command << "add";
// Adding files to the runner.
QStringList stringFiles = localLocations.toStringList();
while (!stringFiles.isEmpty()) {
command.append(m_lastRepoRoot->pathOrUrl() + '/' + stringFiles.takeAt(0));
}
execSynchronously(command);
}
示例13: remove
void GitRunner::remove(const KUrl::List &files)
{
if (files.empty()) {
return;
}
QStringList command;
command << "rm ";
QStringList stringFiles = files.toStringList();
while (!stringFiles.isEmpty()) {
command.append(m_lastRepoRoot->pathOrUrl() + '/' + stringFiles.takeAt(0));
}
KJob *job = initJob(command);
connect(job, SIGNAL(result(KJob*)), this, SLOT(handleRemove(KJob*)));
job->start();
}
示例14: add
DvcsJob::JobStatus GitRunner::add(const KUrl::List &localLocations)
{
if (localLocations.empty())
return m_jobStatus = DvcsJob::JobCancelled;
DvcsJob *job = new DvcsJob();
initJob(*job);
*job << "add";
// Adding files to the runner.
QStringList stringFiles = localLocations.toStringList();
while (!stringFiles.isEmpty()) {
*job << m_lastRepoRoot->pathOrUrl() + '/' + stringFiles.takeAt(0);
}
startJob(*job);
return m_jobStatus;
}
示例15: importNext
void importNext()
{
if (mUrlList.empty()) {
q->finalizeImport();
return;
}
mCurrentUrl = mUrlList.takeFirst();
KUrl dst = mTempImportDir;
dst.addPath(mCurrentUrl.fileName());
KIO::Job* job = KIO::copy(mCurrentUrl, dst, KIO::HideProgressInfo);
if (job->ui()) {
job->ui()->setWindow(mAuthWindow);
}
QObject::connect(job, SIGNAL(result(KJob*)),
q, SLOT(slotCopyDone(KJob*)));
QObject::connect(job, SIGNAL(percent(KJob*,ulong)),
q, SLOT(slotPercent(KJob*,ulong)));
}