summaryrefslogtreecommitdiffstats
path: root/krecipes/src/widgets/ingredientcombobox.cpp
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2013-07-31 17:02:11 +0200
committerSlávek Banko <[email protected]>2013-07-31 17:02:11 +0200
commit5f9410ae910e73f8966318d1e1b9be03a5651118 (patch)
treed46a2a2135dbed62dc978bed61ede6376263463b /krecipes/src/widgets/ingredientcombobox.cpp
parent40d6261f7d30d372f6a0c9ffdd9fe1cd5b1d1002 (diff)
downloadkrecipes-5f9410ae910e73f8966318d1e1b9be03a5651118.tar.gz
krecipes-5f9410ae910e73f8966318d1e1b9be03a5651118.zip
Initial TQt conversion
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;
}