本文整理汇总了C++中TQStringList::find方法的典型用法代码示例。如果您正苦于以下问题:C++ TQStringList::find方法的具体用法?C++ TQStringList::find怎么用?C++ TQStringList::find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TQStringList
的用法示例。
在下文中一共展示了TQStringList::find方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addToList
void KateSearch::addToList( TQStringList& list, const TQString& s )
{
if( list.count() > 0 ) {
TQStringList::Iterator it = list.find( s );
if( *it != 0L )
list.remove( it );
if( list.count() >= 16 )
list.remove( list.fromLast() );
}
list.prepend( s );
}
示例2: remword
TQString KStringHandler::remword( const TQString &text , const TQString &word )
{
TQString tmp = "";
if ( text.isEmpty() )
return tmp;
if ( word.isEmpty() )
return text;
// Split words and add into list
TQStringList list = TQStringList::split( " ", text, true );
TQStringList::Iterator it = list.find(word);
if (it != list.end())
list.remove( it );
// Rejoin
return list.join( " " );
}
示例3: createList
Medium::MList Medium::createList(const TQStringList &properties)
{
MList l;
if ( properties.size() % (PROPERTIES_COUNT+1) == 0)
{
int media_count = properties.size()/(PROPERTIES_COUNT+1);
TQStringList props = properties;
for(int i=0; i<media_count; i++)
{
const Medium m = create(props);
l.append(m);
TQStringList::iterator first = props.begin();
TQStringList::iterator last = props.find(SEPARATOR);
++last;
props.erase(first, last);
}
}
return l;
}
示例4: startFolderEncode
void MyView::startFolderEncode(TQStringList selec,TQStringList encryptOptions,bool ,bool symetric)
{
TQString extension;
if (compressionScheme==0)
extension=".zip";
else if (compressionScheme==1)
extension=".tar.gz";
else
extension=".tar.bz2";
if (encryptOptions.find("armor")!=encryptOptions.end () )
extension+=".asc";
else if (KGpgSettings::pgpExtension())
extension+=".pgp";
else
extension+=".gpg";
KURL encryptedFile(droppedUrls.first().path()+extension);
TQFile encryptedFolder(droppedUrls.first().path()+extension);
if (encryptedFolder.exists()) {
dialogue->hide();
TDEIO::RenameDlg *over=new TDEIO::RenameDlg(0,i18n("File Already Exists"),TQString(),encryptedFile.path(),TDEIO::M_OVERWRITE);
if (over->exec()==TQDialog::Rejected)
{
delete over;
return;
}
encryptedFile=over->newDestURL();
delete over;
dialogue->show(); /////// strange, but if dialogue is hidden, the passive popup is not displayed...
}
pop = new KPassivePopup();
pop->setView(i18n("Processing folder compression and encryption"),i18n("Please wait..."),TDEGlobal::iconLoader()->loadIcon("kgpg",TDEIcon::Desktop));
pop->setAutoDelete(false);
pop->show();
kapp->processEvents();
dialogue->slotAccept();
dialogue=0L;
KArchive *arch;
if (compressionScheme==0)
arch=new KZip(kgpgfoldertmp->name());
else if (compressionScheme==1)
arch=new KTar(kgpgfoldertmp->name(), "application/x-gzip");
else
arch=new KTar(kgpgfoldertmp->name(), "application/x-bzip2");
if (!arch->open( IO_WriteOnly )) {
KMessageBox::sorry(0,i18n("Unable to create temporary file"));
delete arch;
return;
}
arch->addLocalDirectory (droppedUrls.first().path(),droppedUrls.first().fileName());
arch->close();
delete arch;
KgpgInterface *folderprocess=new KgpgInterface();
folderprocess->KgpgEncryptFile(selec,KURL(kgpgfoldertmp->name()),encryptedFile,encryptOptions,symetric);
connect(folderprocess,TQT_SIGNAL(encryptionfinished(KURL)),TQT_TQOBJECT(this),TQT_SLOT(slotFolderFinished(KURL)));
connect(folderprocess,TQT_SIGNAL(errormessage(TQString)),TQT_TQOBJECT(this),TQT_SLOT(slotFolderFinishedError(TQString)));
}