summaryrefslogtreecommitdiffstats
path: root/krecipes/src/dialogs/conversiondialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'krecipes/src/dialogs/conversiondialog.cpp')
-rw-r--r--krecipes/src/dialogs/conversiondialog.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/krecipes/src/dialogs/conversiondialog.cpp b/krecipes/src/dialogs/conversiondialog.cpp
index 7746a43..78edc09 100644
--- a/krecipes/src/dialogs/conversiondialog.cpp
+++ b/krecipes/src/dialogs/conversiondialog.cpp
@@ -10,15 +10,15 @@
#include "conversiondialog.h"
-#include <qvariant.h>
-#include <qpushbutton.h>
+#include <ntqvariant.h>
+#include <ntqpushbutton.h>
#include <kcombobox.h>
-#include <qlabel.h>
+#include <ntqlabel.h>
#include <klineedit.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qvbox.h>
+#include <ntqlayout.h>
+#include <ntqtooltip.h>
+#include <ntqwhatsthis.h>
+#include <ntqvbox.h>
#include <kcombobox.h>
#include <klineedit.h>
@@ -30,7 +30,7 @@
#include "widgets/prepmethodcombobox.h"
#include "widgets/fractioninput.h"
-ConversionDialog::ConversionDialog( QWidget* parent, RecipeDB *db, const char* name )
+ConversionDialog::ConversionDialog( TQWidget* parent, RecipeDB *db, const char* name )
: KDialogBase( parent, name, false, i18n( "Measurement Converter" ),
KDialogBase::Close | KDialogBase::User1 | KDialogBase::Help, KDialogBase::Close ),
m_database(db)
@@ -40,12 +40,12 @@ ConversionDialog::ConversionDialog( QWidget* parent, RecipeDB *db, const char* n
setSizeGripEnabled( TRUE );
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
- QHBox *vbox = new QVBox(page);
+ TQHBox *vbox = new TQVBox(page);
- QHBox *fromTopBox = new QHBox(vbox);
- convertLabel = new QLabel( fromTopBox, "convertLabel" );
+ TQHBox *fromTopBox = new TQHBox(vbox);
+ convertLabel = new TQLabel( fromTopBox, "convertLabel" );
amountEdit = new FractionInput( fromTopBox );
@@ -54,7 +54,7 @@ ConversionDialog::ConversionDialog( QWidget* parent, RecipeDB *db, const char* n
fromTopBox->setStretchFactor( fromUnitBox, 2 );
fromTopBox->setSpacing(3);
- QHBox *fromBottomBox = new QHBox(vbox);
+ TQHBox *fromBottomBox = new TQHBox(vbox);
ingredientBox = new IngredientComboBox( FALSE, fromBottomBox, db, i18n( "--Ingredient (optional)--" ) );
ingredientBox->reload();
@@ -63,23 +63,23 @@ ConversionDialog::ConversionDialog( QWidget* parent, RecipeDB *db, const char* n
prepMethodBox->reload();
fromBottomBox->setSpacing(3);
- QHBox *toBox = new QHBox(vbox);
+ TQHBox *toBox = new TQHBox(vbox);
- toLabel = new QLabel( toBox, "toLabel" );
+ toLabel = new TQLabel( toBox, "toLabel" );
toUnitBox = new UnitComboBox( toBox, db );
toUnitBox->reload();
toBox->setStretchFactor( toUnitBox, 2 );
toBox->setSpacing(8);
- QHBox *resultBox = new QHBox(vbox);
- resultLabel = new QLabel( resultBox, "resultLabel" );
- resultText = new QLabel( resultBox, "resultText" );
+ TQHBox *resultBox = new TQHBox(vbox);
+ resultLabel = new TQLabel( resultBox, "resultLabel" );
+ resultText = new TQLabel( resultBox, "resultText" );
resultBox->setStretchFactor( resultText, 2 );
languageChange();
- setInitialSize( QSize(300, 200).expandedTo(minimumSizeHint()) );
+ setInitialSize( TQSize(300, 200).expandedTo(minimumSizeHint()) );
// signals and slots connections
connect ( this, SIGNAL( closeClicked() ), this, SLOT( accept() ) );
@@ -94,7 +94,7 @@ void ConversionDialog::languageChange()
convertLabel->setText( i18n( "Convert" ) );
toLabel->setText( i18n( "To" ) );
resultLabel->setText( i18n( "<b>Result:</b>" ) );
- resultText->setText( QString::null );
+ resultText->setText( TQString::null );
}
void ConversionDialog::show()
@@ -105,7 +105,7 @@ void ConversionDialog::show()
void ConversionDialog::reset()
{
- resultText->setText( QString::null );
+ resultText->setText( TQString::null );
ingredientBox->setCurrentItem( 0 );
prepMethodBox->setCurrentItem( 0 );
toUnitBox->setCurrentItem( 0 );
@@ -129,16 +129,16 @@ void ConversionDialog::convert()
int prepID = prepMethodBox->id(prepMethodBox->currentItem());
if ( prepID != -1 )
- ing.prepMethodList.append(Element(QString::null,prepID));
+ ing.prepMethodList.append(Element(TQString::null,prepID));
switch ( m_database->convertIngredientUnits( ing, unit, result ) ) {
case RecipeDB::Success:
resultLabel->setText( i18n( "<b>Result:</b>" ) );
- resultText->setText(QString::number(result.amount)+" "+((result.amount>1)?result.units.plural:result.units.name));
+ resultText->setText(TQString::number(result.amount)+" "+((result.amount>1)?result.units.plural:result.units.name));
break;
case RecipeDB::MismatchedPrepMethodUsingApprox:
resultLabel->setText( i18n( "<b>Approximated result:</b>" ) );
- resultText->setText(QString::number(result.amount)+" "+((result.amount>1)?result.units.plural:result.units.name));
+ resultText->setText(TQString::number(result.amount)+" "+((result.amount>1)?result.units.plural:result.units.name));
break;
case RecipeDB::MissingUnitConversion:
resultLabel->setText( i18n( "<b>Error:</b>" ) );