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; }
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 ); }
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]; } }
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 ); }
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; }