summaryrefslogtreecommitdiffstats
path: root/krecipes/src/widgets/ingredientcombobox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'krecipes/src/widgets/ingredientcombobox.cpp')
-rw-r--r--krecipes/src/widgets/ingredientcombobox.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/krecipes/src/widgets/ingredientcombobox.cpp b/krecipes/src/widgets/ingredientcombobox.cpp
index 7423f22..dbff22d 100644
--- a/krecipes/src/widgets/ingredientcombobox.cpp
+++ b/krecipes/src/widgets/ingredientcombobox.cpp
@@ -10,8 +10,8 @@
#include "ingredientcombobox.h"
-#include <qlistbox.h>
-#include <qtimer.h>
+#include <ntqlistbox.h>
+#include <ntqtimer.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -21,8 +21,8 @@
#include "backends/recipedb.h"
#include "datablocks/elementlist.h"
-IngredientComboBox::IngredientComboBox( bool b, QWidget *parent, RecipeDB *db, const QString &specialItem ) : KComboBox( b, parent ),
- database( db ), loading_at(0), load_timer(new QTimer(this)), m_specialItem(specialItem)
+IngredientComboBox::IngredientComboBox( bool b, TQWidget *parent, RecipeDB *db, const TQString &specialItem ) : KComboBox( b, parent ),
+ database( db ), loading_at(0), load_timer(new TQTimer(this)), m_specialItem(specialItem)
{
connect( load_timer, SIGNAL(timeout()), SLOT(loadMore()) );
completionObject()->setIgnoreCase(true);
@@ -30,7 +30,7 @@ IngredientComboBox::IngredientComboBox( bool b, QWidget *parent, RecipeDB *db, c
void IngredientComboBox::reload()
{
- QString remember_text;
+ TQString remember_text;
if ( editable() )
remember_text = lineEdit()->text();
@@ -110,7 +110,7 @@ int IngredientComboBox::id( int row )
return ingredientComboRows[ row ];
}
-int IngredientComboBox::id( const QString &ing )
+int IngredientComboBox::id( const TQString &ing )
{
for ( int i = 0; i < count(); i++ ) {
if ( ing == text( i ) )
@@ -124,7 +124,7 @@ void IngredientComboBox::createIngredient( const Element &element )
{
int row = findInsertionPoint( element.name );
- QString remember_text;
+ TQString remember_text;
if ( editable() )
remember_text = lineEdit()->text();
@@ -135,8 +135,8 @@ void IngredientComboBox::createIngredient( 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 = ingredientComboRows.begin(); it != ingredientComboRows.end(); ++it ) {
+ TQMap<int, int> new_map;
+ for ( TQMap<int, int>::iterator it = ingredientComboRows.begin(); it != ingredientComboRows.end(); ++it ) {
if ( it.key() >= row ) {
new_map.insert( it.key() + 1, it.data() );
}
@@ -150,7 +150,7 @@ void IngredientComboBox::createIngredient( const Element &element )
void IngredientComboBox::removeIngredient( int id )
{
int row = -1;
- for ( QMap<int, int>::iterator it = ingredientComboRows.begin(); it != ingredientComboRows.end(); ++it ) {
+ for ( TQMap<int, int>::iterator it = ingredientComboRows.begin(); it != ingredientComboRows.end(); ++it ) {
if ( it.data() == id ) {
row = it.key();
completionObject()->removeItem( text(row) );
@@ -164,8 +164,8 @@ void IngredientComboBox::removeIngredient( 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 = ingredientComboRows.begin(); it != ingredientComboRows.end(); ++it ) {
+ TQMap<int, int> new_map;
+ for ( TQMap<int, int>::iterator it = ingredientComboRows.begin(); it != ingredientComboRows.end(); ++it ) {
if ( it.key() > row ) {
new_map.insert( it.key() - 1, it.data() );
}
@@ -175,10 +175,10 @@ void IngredientComboBox::removeIngredient( int id )
ingredientComboRows = new_map;
}
-int IngredientComboBox::findInsertionPoint( const QString &name )
+int IngredientComboBox::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;
}