本文整理汇总了C++中TQStringList::prepend方法的典型用法代码示例。如果您正苦于以下问题:C++ TQStringList::prepend方法的具体用法?C++ TQStringList::prepend怎么用?C++ TQStringList::prepend使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TQStringList
的用法示例。
在下文中一共展示了TQStringList::prepend方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: list
TQStringList TDECompletionMatches::list( bool sort_P ) const
{
if( _sorting && sort_P )
const_cast< TDECompletionMatches* >( this )->sort();
TQStringList stringList;
// high weight == sorted last -> reverse the sorting here
for ( ConstIterator it = begin(); it != end(); ++it )
stringList.prepend( (*it).value() );
return stringList;
}
示例2: 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 );
}
示例3: loadConfig
void QuickLauncher::loadConfig()
{
DEBUGSTR << "QuickLauncher::loadConfig()" << endl << flush;
//TDEConfig *c = config();
//c->setGroup("General");
setConserveSpace(m_settings->conserveSpace());
setDragEnabled(m_settings->dragEnabled());
/*DEBUGSTR << " IconDim="<<m_iconDim << endl << flush;
DEBUGSTR << " ConserveSpace=" << (m_manager->conserveSpace()) <<
endl << flush;
DEBUGSTR << " DragEnabled=" << isDragEnabled() << endl << flush;*/
TQStringList volatileButtons = m_settings->volatileButtons();
TQStringList urls = m_settings->buttons();
if (m_settings->showDesktopEnabled()) {
if (!urls.contains("SPECIAL_BUTTON__SHOW_DESKTOP"))
urls.prepend("SPECIAL_BUTTON__SHOW_DESKTOP");
}
else {
if (urls.contains("SPECIAL_BUTTON__SHOW_DESKTOP"))
urls.remove("SPECIAL_BUTTON__SHOW_DESKTOP");
}
kdDebug() << "GetButtons " << urls.join("/") << endl;
TQStringList::Iterator iter(urls.begin());
int n = 0;
while (iter != urls.end()) {
TQString url = *iter;
addApp(url, n, false);
++iter;
++n;
}
// Restore sticky state
for (n=0; n<int(m_buttons->size()); ++n)
{
QuickButton* button = (*m_buttons)[n];
if (volatileButtons.contains(button->menuId()) == false)
{
button->setSticky(true);
}
button->setDynamicModeEnabled(m_settings->autoAdjustEnabled());
}
m_popularity->readConfig(m_settings);
m_popularity->setHistoryHorizon(m_settings->historyHorizon()/100.0);
TQStringList serviceNames = m_settings->serviceNames();
TQValueList<int> insPos = m_settings->serviceInspos();
for (int n=std::min(serviceNames.size(),insPos.size())-1; n>=0; --n)
{
m_appOrdering[serviceNames[n]] = insPos[n];
}
}
示例4: cmbPathReturnPressed
void KateFileSelector::cmbPathReturnPressed( const TQString& u )
{
KURL typedURL( u );
if ( typedURL.hasPass() )
typedURL.setPass( TQString::null );
TQStringList urls = cmbPath->urls();
urls.remove( typedURL.url() );
urls.prepend( typedURL.url() );
cmbPath->setURLs( urls, KURLComboBox::RemoveBottom );
dir->setFocus();
dir->setURL( KURL(u), true );
}
示例5: reverse
TQStringList KStringHandler::reverse( const TQStringList &list )
{
TQStringList tmp;
if ( list.count() == 0 )
return tmp;
for ( TQStringList::ConstIterator it= list.begin();
it != list.end();
it++)
tmp.prepend( *it );
return tmp;
}