summaryrefslogtreecommitdiffstats
path: root/kexi/widget/kexiqueryparameters.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/widget/kexiqueryparameters.cpp')
-rw-r--r--kexi/widget/kexiqueryparameters.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kexi/widget/kexiqueryparameters.cpp b/kexi/widget/kexiqueryparameters.cpp
index 449c265c5..bcef819f1 100644
--- a/kexi/widget/kexiqueryparameters.cpp
+++ b/kexi/widget/kexiqueryparameters.cpp
@@ -29,14 +29,14 @@
#include "utils/kexidatetimeformatter.h"
//static
-QValueList<QVariant> KexiQueryParameters::getParameters(QWidget *parent,
+TQValueList<TQVariant> KexiQueryParameters::getParameters(TQWidget *tqparent,
const KexiDB::Driver &driver, KexiDB::QuerySchema& querySchema, bool &ok)
{
Q_UNUSED(driver);
ok = false;
const KexiDB::QuerySchemaParameterList params( querySchema.parameters() );
- QValueList<QVariant> values;
- const QString caption( i18n("Enter Query Parameter Value", "Enter Parameter Value") );
+ TQValueList<TQVariant> values;
+ const TQString caption( i18n("Enter Query Parameter Value", "Enter Parameter Value") );
foreach(KexiDB::QuerySchemaParameterListConstIterator, it, params) {
switch ((*it).type) {
case KexiDB::Field::Byte:
@@ -48,53 +48,53 @@ QValueList<QVariant> KexiQueryParameters::getParameters(QWidget *parent,
//! @todo add support for unsigned parameter here
KexiDB::getLimitsForType((*it).type, minValue, maxValue);
const int result = KInputDialog::getInteger(
- caption, (*it).message, 0, minValue, maxValue, 1/*step*/, 10/*base*/, &ok, parent);
+ caption, (*it).message, 0, minValue, maxValue, 1/*step*/, 10/*base*/, &ok, tqparent);
if (!ok)
- return QValueList<QVariant>(); //cancelled
+ return TQValueList<TQVariant>(); //cancelled
values.append(result);
break;
}
case KexiDB::Field::Boolean: {
- QStringList list;
+ TQStringList list;
list << i18n("Boolean True - Yes", "Yes") << i18n("Boolean False - No", "No");
- const QString result = KInputDialog::getItem(
- caption, (*it).message, list, 0/*current*/, false /*!editable*/, &ok, parent);
+ const TQString result = KInputDialog::getItem(
+ caption, (*it).message, list, 0/*current*/, false /*!editable*/, &ok, tqparent);
if (!ok || result.isEmpty())
- return QValueList<QVariant>(); //cancelled
- values.append( QVariant( result==list.first(), 1 ) );
+ return TQValueList<TQVariant>(); //cancelled
+ values.append( TQVariant( result==list.first(), 1 ) );
break;
}
case KexiDB::Field::Date: {
KexiDateFormatter df;
- const QString result = KInputDialog::getText(
- caption, (*it).message, QString::null, &ok, parent, 0/*name*/,
+ const TQString result = KInputDialog::getText(
+ caption, (*it).message, TQString(), &ok, tqparent, 0/*name*/,
//! @todo add validator
0/*validator*/, df.inputMask() );
if (!ok)
- return QValueList<QVariant>(); //cancelled
+ return TQValueList<TQVariant>(); //cancelled
values.append( df.stringToDate(result) );
break;
}
case KexiDB::Field::DateTime: {
KexiDateFormatter df;
KexiTimeFormatter tf;
- const QString result = KInputDialog::getText(
- caption, (*it).message, QString::null, &ok, parent, 0/*name*/,
+ const TQString result = KInputDialog::getText(
+ caption, (*it).message, TQString(), &ok, tqparent, 0/*name*/,
//! @todo add validator
0/*validator*/, dateTimeInputMask(df, tf) );
if (!ok)
- return QValueList<QVariant>(); //cancelled
+ return TQValueList<TQVariant>(); //cancelled
values.append( stringToDateTime(df, tf, result) );
break;
}
case KexiDB::Field::Time: {
KexiTimeFormatter tf;
- const QString result = KInputDialog::getText(
- caption, (*it).message, QString::null, &ok, parent, 0/*name*/,
+ const TQString result = KInputDialog::getText(
+ caption, (*it).message, TQString(), &ok, tqparent, 0/*name*/,
//! @todo add validator
0/*validator*/, tf.inputMask() );
if (!ok)
- return QValueList<QVariant>(); //cancelled
+ return TQValueList<TQVariant>(); //cancelled
values.append( tf.stringToTime(result) );
break;
}
@@ -102,35 +102,35 @@ QValueList<QVariant> KexiQueryParameters::getParameters(QWidget *parent,
case KexiDB::Field::Double: {
// KInputDialog::getDouble() does not work well, use getText and double validator
KDoubleValidator validator(0);
- const QString textResult = KInputDialog::getText( caption, (*it).message, QString::null, &ok,
- parent, 0, &validator);
+ const TQString textResult = KInputDialog::getText( caption, (*it).message, TQString(), &ok,
+ tqparent, 0, &validator);
if (!ok || textResult.isEmpty())
- return QValueList<QVariant>(); //cancelled
+ return TQValueList<TQVariant>(); //cancelled
//! @todo this value will be still rounded: consider storing them as a decimal type
-//! (e.g. using a special Q_LLONG+decimalplace class)
+//! (e.g. using a special TQ_LLONG+decimalplace class)
const double result = textResult.toDouble(&ok); //this is also good for float (to avoid rounding)
if (!ok)
- return QValueList<QVariant>();
+ return TQValueList<TQVariant>();
values.append( result );
break;
}
case KexiDB::Field::Text:
case KexiDB::Field::LongText: {
- const QString result = KInputDialog::getText(
- caption, (*it).message, QString::null, &ok, parent);
+ const TQString result = KInputDialog::getText(
+ caption, (*it).message, TQString(), &ok, tqparent);
if (!ok)
- return QValueList<QVariant>(); //cancelled
+ return TQValueList<TQVariant>(); //cancelled
values.append( result );
break;
}
case KexiDB::Field::BLOB: {
//! @todo BLOB input unsupported
- values.append( QByteArray() );
+ values.append( TQByteArray() );
}
default:
kexiwarn << "KexiQueryParameters::getParameters() unsupported type " << KexiDB::Field::typeName((*it).type)
<< " for parameter \"" << (*it).message << "\" - aborting query execution!" << endl;
- return QValueList<QVariant>();
+ return TQValueList<TQVariant>();
}
}
ok = true;