From ffe8a83e053396df448e9413828527613ca3bd46 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:46:43 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kio/kfile/kurlcombobox.cpp | 62 +++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'kio/kfile/kurlcombobox.cpp') diff --git a/kio/kfile/kurlcombobox.cpp b/kio/kfile/kurlcombobox.cpp index 128e8a22c..72c7cbd07 100644 --- a/kio/kfile/kurlcombobox.cpp +++ b/kio/kfile/kurlcombobox.cpp @@ -16,8 +16,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -31,21 +31,21 @@ class KURLComboBox::KURLComboBoxPrivate { public: KURLComboBoxPrivate() { - dirpix = SmallIcon(QString::fromLatin1("folder")); + dirpix = SmallIcon(TQString::fromLatin1("folder")); } - QPixmap dirpix; + TQPixmap dirpix; }; -KURLComboBox::KURLComboBox( Mode mode, QWidget *parent, const char *name ) +KURLComboBox::KURLComboBox( Mode mode, TQWidget *parent, const char *name ) : KComboBox( parent, name ) { init( mode ); } -KURLComboBox::KURLComboBox( Mode mode, bool rw, QWidget *parent, +KURLComboBox::KURLComboBox( Mode mode, bool rw, TQWidget *parent, const char *name ) : KComboBox( rw, parent, name ) { @@ -70,20 +70,20 @@ void KURLComboBox::init( Mode mode ) defaultList.setAutoDelete( true ); setInsertionPolicy( NoInsertion ); setTrapReturnKey( true ); - setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed )); + setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); - opendirPix = SmallIcon(QString::fromLatin1("folder_open")); + opendirPix = SmallIcon(TQString::fromLatin1("folder_open")); - connect( this, SIGNAL( activated( int )), SLOT( slotActivated( int ))); + connect( this, TQT_SIGNAL( activated( int )), TQT_SLOT( slotActivated( int ))); } -QStringList KURLComboBox::urls() const +TQStringList KURLComboBox::urls() const { kdDebug(250) << "::urls()" << endl; - //static const QString &fileProt = KGlobal::staticQString("file:"); - QStringList list; - QString url; + //static const TQString &fileProt = KGlobal::staticQString("file:"); + TQStringList list; + TQString url; for ( int i = defaultList.count(); i < count(); i++ ) { url = text( i ); if ( !url.isEmpty() ) { @@ -98,14 +98,14 @@ QStringList KURLComboBox::urls() const } -void KURLComboBox::addDefaultURL( const KURL& url, const QString& text ) +void KURLComboBox::addDefaultURL( const KURL& url, const TQString& text ) { addDefaultURL( url, getPixmap( url ), text ); } -void KURLComboBox::addDefaultURL( const KURL& url, const QPixmap& pix, - const QString& text ) +void KURLComboBox::addDefaultURL( const KURL& url, const TQPixmap& pix, + const TQString& text ) { KURLComboItem *item = new KURLComboItem; item->url = url; @@ -134,12 +134,12 @@ void KURLComboBox::setDefaults() } } -void KURLComboBox::setURLs( QStringList urls ) +void KURLComboBox::setURLs( TQStringList urls ) { setURLs( urls, RemoveBottom ); } -void KURLComboBox::setURLs( QStringList urls, OverLoadResolving remove ) +void KURLComboBox::setURLs( TQStringList urls, OverLoadResolving remove ) { setDefaults(); itemList.clear(); @@ -147,10 +147,10 @@ void KURLComboBox::setURLs( QStringList urls, OverLoadResolving remove ) if ( urls.isEmpty() ) return; - QStringList::Iterator it = urls.begin(); + TQStringList::Iterator it = urls.begin(); // kill duplicates - QString text; + TQString text; while ( it != urls.end() ) { while ( urls.contains( *it ) > 1 ) { it = urls.remove( it ); @@ -181,7 +181,7 @@ void KURLComboBox::setURLs( QStringList urls, OverLoadResolving remove ) u = KURL::fromPathOrURL( *it ); // Don't restore if file doesn't exist anymore - if (u.isLocalFile() && !QFile::exists(u.path())) { + if (u.isLocalFile() && !TQFile::exists(u.path())) { ++it; continue; } @@ -210,8 +210,8 @@ void KURLComboBox::setURL( const KURL& url ) blockSignals( true ); // check for duplicates - QMap::ConstIterator mit = itemMapper.begin(); - QString urlToInsert = url.url(-1); + TQMap::ConstIterator mit = itemMapper.begin(); + TQString urlToInsert = url.url(-1); while ( mit != itemMapper.end() ) { if ( urlToInsert == mit.data()->url.url(-1) ) { setCurrentItem( mit.key() ); @@ -235,7 +235,7 @@ void KURLComboBox::setURL( const KURL& url ) setDefaults(); - QPtrListIterator it( itemList ); + TQPtrListIterator it( itemList ); for( ; it.current(); ++it ) insertURLItem( it.current() ); @@ -249,7 +249,7 @@ void KURLComboBox::setURL( const KURL& url ) kdDebug(250) << "setURL: text=" << item->text << endl; int id = count(); - QString text = /*isEditable() ? item->url.prettyURL( myMode ) : */ item->text; + TQString text = /*isEditable() ? item->url.prettyURL( myMode ) : */ item->text; if ( myMode == Directories ) KComboBox::insertItem( opendirPix, text, id ); @@ -293,7 +293,7 @@ void KURLComboBox::setMaxItems( int max ) setDefaults(); - QPtrListIterator it( itemList ); + TQPtrListIterator it( itemList ); int Overload = itemList.count() - myMaximum + defaultList.count(); for ( int i = 0; i <= Overload; i++ ) ++it; @@ -312,7 +312,7 @@ void KURLComboBox::setMaxItems( int max ) void KURLComboBox::removeURL( const KURL& url, bool checkDefaultURLs ) { - QMap::ConstIterator mit = itemMapper.begin(); + TQMap::ConstIterator mit = itemMapper.begin(); while ( mit != itemMapper.end() ) { if ( url.url(-1) == mit.data()->url.url(-1) ) { if ( !itemList.remove( mit.data() ) && checkDefaultURLs ) @@ -323,7 +323,7 @@ void KURLComboBox::removeURL( const KURL& url, bool checkDefaultURLs ) blockSignals( true ); setDefaults(); - QPtrListIterator it( itemList ); + TQPtrListIterator it( itemList ); while ( it.current() ) { insertURLItem( *it ); ++it; @@ -332,7 +332,7 @@ void KURLComboBox::removeURL( const KURL& url, bool checkDefaultURLs ) } -QPixmap KURLComboBox::getPixmap( const KURL& url ) const +TQPixmap KURLComboBox::getPixmap( const KURL& url ) const { if ( myMode == Directories ) return d->dirpix; @@ -344,9 +344,9 @@ QPixmap KURLComboBox::getPixmap( const KURL& url ) const // updates "item" with pixmap "pixmap" and sets the URL instead of text // works around a Qt bug. void KURLComboBox::updateItem( const KURLComboItem *item, - int index, const QPixmap& pixmap ) + int index, const TQPixmap& pixmap ) { - // QComboBox::changeItem() doesn't honor the pixmap when + // TQComboBox::changeItem() doesn't honor the pixmap when // using an editable combobox, so we just remove and insert if ( editable() ) { removeItem( index ); -- cgit v1.2.1