diff options
Diffstat (limited to 'krecipes/src/widgets/prepmethodcombobox.cpp')
-rw-r--r-- | krecipes/src/widgets/prepmethodcombobox.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/krecipes/src/widgets/prepmethodcombobox.cpp b/krecipes/src/widgets/prepmethodcombobox.cpp index ec5a4bb..d228673 100644 --- a/krecipes/src/widgets/prepmethodcombobox.cpp +++ b/krecipes/src/widgets/prepmethodcombobox.cpp @@ -10,7 +10,7 @@ #include "prepmethodcombobox.h" -#include <qlistbox.h> +#include <ntqlistbox.h> #include <kdebug.h> @@ -26,11 +26,11 @@ public: PrepMethodCompletion() : KCompletion() {} - virtual QString makeCompletion( const QString &string ) { + virtual TQString makeCompletion( const TQString &string ) { kdDebug()<<"original makeCompletion( "<<string<<" )"<<endl; int comma_index = string.findRev(","); - QString completion_txt = string; + TQString completion_txt = string; if ( comma_index != -1 ) completion_txt = completion_txt.right( completion_txt.length() - comma_index - 1 ).stripWhiteSpace(); if ( completion_txt.isEmpty() ) @@ -51,7 +51,7 @@ public: } }; -PrepMethodComboBox::PrepMethodComboBox( bool b, QWidget *parent, RecipeDB *db, const QString &specialItem ) : +PrepMethodComboBox::PrepMethodComboBox( bool b, TQWidget *parent, RecipeDB *db, const TQString &specialItem ) : KComboBox( b, parent ), database( db ), m_specialItem(specialItem) { @@ -61,7 +61,7 @@ PrepMethodComboBox::PrepMethodComboBox( bool b, QWidget *parent, RecipeDB *db, c void PrepMethodComboBox::reload() { - QString remember_text; + TQString remember_text; if ( editable() ) remember_text = lineEdit()->text(); @@ -96,7 +96,7 @@ int PrepMethodComboBox::id( int row ) return prepMethodComboRows[ row ]; } -int PrepMethodComboBox::id( const QString &ing ) +int PrepMethodComboBox::id( const TQString &ing ) { for ( int i = 0; i < count(); i++ ) { if ( ing == text( i ) ) @@ -110,7 +110,7 @@ void PrepMethodComboBox::createPrepMethod( const Element &element ) { int row = findInsertionPoint( element.name ); - QString remember_text; + TQString remember_text; if ( editable() ) remember_text = lineEdit()->text(); @@ -121,8 +121,8 @@ void PrepMethodComboBox::createPrepMethod( const Element &element ) lineEdit()->setText( remember_text ); //now update the map by pushing everything after this item down - QMap<int, int> new_map; - for ( QMap<int, int>::iterator it = prepMethodComboRows.begin(); it != prepMethodComboRows.end(); ++it ) { + TQMap<int, int> new_map; + for ( TQMap<int, int>::iterator it = prepMethodComboRows.begin(); it != prepMethodComboRows.end(); ++it ) { if ( it.key() >= row ) { new_map.insert( it.key() + 1, it.data() ); } @@ -136,7 +136,7 @@ void PrepMethodComboBox::createPrepMethod( const Element &element ) void PrepMethodComboBox::removePrepMethod( int id ) { int row = -1; - for ( QMap<int, int>::iterator it = prepMethodComboRows.begin(); it != prepMethodComboRows.end(); ++it ) { + for ( TQMap<int, int>::iterator it = prepMethodComboRows.begin(); it != prepMethodComboRows.end(); ++it ) { if ( it.data() == id ) { row = it.key(); completionObject()->removeItem( text(row) ); @@ -150,8 +150,8 @@ void PrepMethodComboBox::removePrepMethod( int id ) return ; //now update the map by pushing everything after this item up - QMap<int, int> new_map; - for ( QMap<int, int>::iterator it = prepMethodComboRows.begin(); it != prepMethodComboRows.end(); ++it ) { + TQMap<int, int> new_map; + for ( TQMap<int, int>::iterator it = prepMethodComboRows.begin(); it != prepMethodComboRows.end(); ++it ) { if ( it.key() > row ) { new_map.insert( it.key() - 1, it.data() ); } @@ -161,10 +161,10 @@ void PrepMethodComboBox::removePrepMethod( int id ) prepMethodComboRows = new_map; } -int PrepMethodComboBox::findInsertionPoint( const QString &name ) +int PrepMethodComboBox::findInsertionPoint( const TQString &name ) { for ( int i = 0; i < count(); i++ ) { - if ( QString::localeAwareCompare( name, text( i ) ) < 0 ) + if ( TQString::localeAwareCompare( name, text( i ) ) < 0 ) return i; } @@ -174,7 +174,7 @@ int PrepMethodComboBox::findInsertionPoint( const QString &name ) void PrepMethodComboBox::setSelected( int prepID ) { //do a reverse lookup on the row->id map - QMap<int, int>::const_iterator it; + TQMap<int, int>::const_iterator it; for ( it = prepMethodComboRows.begin(); it != prepMethodComboRows.end(); ++it ) { if ( it.data() == prepID ) { setCurrentItem(it.key()); |