diff options
Diffstat (limited to 'kexi/widget/kexifieldcombobox.cpp')
-rw-r--r-- | kexi/widget/kexifieldcombobox.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/kexi/widget/kexifieldcombobox.cpp b/kexi/widget/kexifieldcombobox.cpp index c0355e9c..fcf81036 100644 --- a/kexi/widget/kexifieldcombobox.cpp +++ b/kexi/widget/kexifieldcombobox.cpp @@ -19,16 +19,16 @@ #include "kexifieldcombobox.h" -#include <qheader.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qcursor.h> -#include <qpoint.h> -#include <qapplication.h> -#include <qbitmap.h> -#include <qstyle.h> -#include <qlistbox.h> +#include <tqheader.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqcursor.h> +#include <tqpoint.h> +#include <tqapplication.h> +#include <tqbitmap.h> +#include <tqstyle.h> +#include <tqlistbox.h> #include <kdebug.h> #include <kiconloader.h> @@ -59,26 +59,26 @@ class KexiFieldComboBox::Private { // delete schema; } - QGuardedPtr<KexiProject> prj; + TQGuardedPtr<KexiProject> prj; // KexiDB::TableOrQuerySchema* schema; - QPixmap keyIcon, noIcon; - QString tableOrQueryName; - QString fieldOrExpression; - QMap<QString, QString> captions; + TQPixmap keyIcon, noIcon; + TQString tableOrQueryName; + TQString fieldOrExpression; + TQMap<TQString, TQString> captions; bool table : 1; }; //------------------------ -KexiFieldComboBox::KexiFieldComboBox(QWidget *parent, const char *name) - : KComboBox(true/*rw*/, parent, name) +KexiFieldComboBox::KexiFieldComboBox(TQWidget *tqparent, const char *name) + : KComboBox(true/*rw*/, tqparent, name) , d(new Private()) { setInsertionPolicy(NoInsertion); setCompletionMode(KGlobalSettings::CompletionPopupAuto); setSizeLimit( 16 ); - connect(this, SIGNAL(activated(int)), this, SLOT(slotActivated(int))); - connect(this, SIGNAL(returnPressed(const QString &)), this, SLOT(slotReturnPressed(const QString &))); + connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int))); + connect(this, TQT_SIGNAL(returnPressed(const TQString &)), this, TQT_SLOT(slotReturnPressed(const TQString &))); // setAcceptDrops(true); // viewport()->setAcceptDrops(true); @@ -102,7 +102,7 @@ KexiProject* KexiFieldComboBox::project() const return d->prj; } -void KexiFieldComboBox::setTableOrQuery(const QString& name, bool table) +void KexiFieldComboBox::setTableOrQuery(const TQString& name, bool table) { d->tableOrQueryName = name; d->table = table; @@ -127,7 +127,7 @@ void KexiFieldComboBox::setTableOrQuery(const QString& name, bool table) (colinfo && (colinfo->field->isPrimaryKey() || colinfo->field->isUniqueKey())) ? d->keyIcon : d->noIcon - , colinfo->aliasOrName()); + , TQString(colinfo->aliasOrName())); completionObject()->addItem(colinfo->aliasOrName()); //store user-friendly caption (used by fieldOrExpressionCaption()) d->captions.insert( colinfo->aliasOrName(), colinfo->captionOrAliasOrName() ); @@ -137,7 +137,7 @@ void KexiFieldComboBox::setTableOrQuery(const QString& name, bool table) setFieldOrExpression(d->fieldOrExpression); } -QString KexiFieldComboBox::tableOrQueryName() const +TQString KexiFieldComboBox::tableOrQueryName() const { return d->tableOrQueryName; } @@ -147,15 +147,15 @@ bool KexiFieldComboBox::isTableAssigned() const return d->table; } -void KexiFieldComboBox::setFieldOrExpression(const QString& string) +void KexiFieldComboBox::setFieldOrExpression(const TQString& string) { - const QString name(string); //string.stripWhiteSpace().lower()); - const int pos = name.find('.'); + const TQString name(string); //string.stripWhiteSpace().lower()); + const int pos = name.tqfind('.'); if (pos==-1) { d->fieldOrExpression = name; } else { - QString objectName = name.left(pos); + TQString objectName = name.left(pos); if (d->tableOrQueryName!=objectName) { d->fieldOrExpression = name; setCurrentItem(0); @@ -167,7 +167,7 @@ void KexiFieldComboBox::setFieldOrExpression(const QString& string) d->fieldOrExpression = name.mid(pos+1); } - QListBoxItem *item = listBox()->findItem(d->fieldOrExpression); + TQListBoxItem *item = listBox()->tqfindItem(d->fieldOrExpression); if (!item) { setCurrentItem(0); setCurrentText(d->fieldOrExpression); @@ -181,13 +181,13 @@ void KexiFieldComboBox::setFieldOrExpression(int index) { index++; //skip 1st empty item if (index>=count()) { - kexiwarn << QString("KexiFieldComboBox::setFieldOrExpression(int index): index %1 " - "out of range (0..%2)").arg(index).arg(count()-1) << endl; + kexiwarn << TQString("KexiFieldComboBox::setFieldOrExpression(int index): index %1 " + "out of range (0..%2)").tqarg(index).tqarg(count()-1) << endl; index = -1; } if (index<=0) { setCurrentItem(0); - d->fieldOrExpression = QString::null; + d->fieldOrExpression = TQString(); } else { setCurrentItem(index); @@ -195,7 +195,7 @@ void KexiFieldComboBox::setFieldOrExpression(int index) } } -QString KexiFieldComboBox::fieldOrExpression() const +TQString KexiFieldComboBox::fieldOrExpression() const { return d->fieldOrExpression; } @@ -209,7 +209,7 @@ int KexiFieldComboBox::indexOfField() const return currentItem()>0 ? (currentItem()-1) : -1; } -QString KexiFieldComboBox::fieldOrExpressionCaption() const +TQString KexiFieldComboBox::fieldOrExpressionCaption() const { return d->captions[ d->fieldOrExpression ]; } @@ -220,7 +220,7 @@ void KexiFieldComboBox::slotActivated(int i) emit selected(); } -void KexiFieldComboBox::slotReturnPressed(const QString & text) +void KexiFieldComboBox::slotReturnPressed(const TQString & text) { //text is available: select item for this text: int index; @@ -228,7 +228,7 @@ void KexiFieldComboBox::slotReturnPressed(const QString & text) index = 0; } else { - QListBoxItem *item = listBox()->findItem( text, Qt::ExactMatch ); + TQListBoxItem *item = listBox()->tqfindItem( text, TQt::ExactMatch ); if (!item) return; index = listBox()->index( item ); @@ -239,11 +239,11 @@ void KexiFieldComboBox::slotReturnPressed(const QString & text) slotActivated( index ); } -void KexiFieldComboBox::focusOutEvent( QFocusEvent *e ) +void KexiFieldComboBox::focusOutEvent( TQFocusEvent *e ) { KComboBox::focusOutEvent( e ); // accept changes if the focus is moved - if (!KexiUtils::hasParent(this, focusWidget())) //(a check needed because drop-down listbox also causes a focusout) + if (!KexiUtils::hasParent(TQT_TQOBJECT(this), TQT_TQOBJECT(tqfocusWidget()))) //(a check needed because drop-down listbox also causes a focusout) slotReturnPressed(currentText()); } |