diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /lib/widgets/flagboxes.cpp | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/widgets/flagboxes.cpp')
-rw-r--r-- | lib/widgets/flagboxes.cpp | 262 |
1 files changed, 131 insertions, 131 deletions
diff --git a/lib/widgets/flagboxes.cpp b/lib/widgets/flagboxes.cpp index 92303b3f..e109a36d 100644 --- a/lib/widgets/flagboxes.cpp +++ b/lib/widgets/flagboxes.cpp @@ -24,22 +24,22 @@ #include <kdialogbase.h> #include <kdeversion.h> -#include <qapplication.h> -#include <qtooltip.h> -#include <qheader.h> -#include <qstringlist.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qregexp.h> -#include <qspinbox.h> +#include <tqapplication.h> +#include <tqtooltip.h> +#include <tqheader.h> +#include <tqstringlist.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqregexp.h> +#include <tqspinbox.h> #include "flagboxes.h" // partial copy of Qt-3.1 for back-compatibility to KDE-3.0 -QString QRegExp_escape( const QString& str ) +TQString QRegExp_escape( const TQString& str ) { static const char meta[] = "$()*+.?[\\]^{|}"; - QString quoted = str; + TQString quoted = str; int i = 0; while ( i < (int) quoted.length() ) { @@ -54,21 +54,21 @@ QString QRegExp_escape( const QString& str ) class FlagListToolTip : public QToolTip { public: - FlagListToolTip(QWidget *parent); + FlagListToolTip(TQWidget *parent); protected: - void maybeTip(const QPoint &p); + void maybeTip(const TQPoint &p); }; -FlagListToolTip::FlagListToolTip(QWidget *parent) - : QToolTip(parent) +FlagListToolTip::FlagListToolTip(TQWidget *parent) + : TQToolTip(parent) {} -void FlagListToolTip::maybeTip(const QPoint &pos) +void FlagListToolTip::maybeTip(const TQPoint &pos) { FlagListBox *listbox = static_cast<FlagListBox*>(parentWidget()); - QListViewItem *item = listbox->itemAt(pos); + TQListViewItem *item = listbox->itemAt(pos); FlagListItem *flitem = static_cast<FlagListItem*>(item); if (item) @@ -76,22 +76,22 @@ void FlagListToolTip::maybeTip(const QPoint &pos) } -FlagListItem::FlagListItem(FlagListBox *parent, const QString &flagstr, - const QString &description) - : QCheckListItem(parent, flagstr, QCheckListItem::CheckBox), +FlagListItem::FlagListItem(FlagListBox *parent, const TQString &flagstr, + const TQString &description) + : TQCheckListItem(parent, flagstr, TQCheckListItem::CheckBox), flag(flagstr), desc(description) {} -FlagListItem::FlagListItem(FlagListBox *parent, const QString &flagstr, - const QString &description, const QString &offstr) - : QCheckListItem(parent, flagstr, QCheckListItem::CheckBox), +FlagListItem::FlagListItem(FlagListBox *parent, const TQString &flagstr, + const TQString &description, const TQString &offstr) + : TQCheckListItem(parent, flagstr, TQCheckListItem::CheckBox), flag(flagstr), off(offstr), desc(description) {} -FlagListBox::FlagListBox(QWidget *parent, const char *name) - : QListView(parent, name) +FlagListBox::FlagListBox(TQWidget *parent, const char *name) + : TQListView(parent, name) { setResizeMode(LastColumn); header()->hide(); @@ -100,12 +100,12 @@ FlagListBox::FlagListBox(QWidget *parent, const char *name) } -void FlagListBox::readFlags(QStringList *list) +void FlagListBox::readFlags(TQStringList *list) { - QListViewItem *item = firstChild(); + TQListViewItem *item = firstChild(); for (; item; item = item->nextSibling()) { FlagListItem *flitem = static_cast<FlagListItem*>(item); - QStringList::Iterator sli = list->find(flitem->flag); + TQStringList::Iterator sli = list->find(flitem->flag); if (sli != list->end()) { flitem->setOn(true); list->remove(sli); @@ -119,9 +119,9 @@ void FlagListBox::readFlags(QStringList *list) } -void FlagListBox::writeFlags(QStringList *list) +void FlagListBox::writeFlags(TQStringList *list) { - QListViewItem *item = firstChild(); + TQListViewItem *item = firstChild(); for (; item; item = item->nextSibling()) { FlagListItem *flitem = static_cast<FlagListItem*>(item); if (flitem->isOn()) @@ -130,34 +130,34 @@ void FlagListBox::writeFlags(QStringList *list) } -FlagCheckBox::FlagCheckBox(QWidget *parent, FlagCheckBoxController *controller, - const QString &flagstr, const QString &description) - : QCheckBox(description, parent), flag(flagstr), includeOff(false), useDef(false), defSet(false) +FlagCheckBox::FlagCheckBox(TQWidget *parent, FlagCheckBoxController *controller, + const TQString &flagstr, const TQString &description) + : TQCheckBox(description, parent), flag(flagstr), includeOff(false), useDef(false), defSet(false) { - QToolTip::add(this, flagstr); + TQToolTip::add(this, flagstr); controller->addCheckBox(this); } -FlagCheckBox::FlagCheckBox(QWidget *parent, FlagCheckBoxController *controller, - const QString &flagstr, const QString &description, - const QString &offstr) - : QCheckBox(description, parent), flag(flagstr), off(offstr), includeOff(false), useDef(false), defSet(false) +FlagCheckBox::FlagCheckBox(TQWidget *parent, FlagCheckBoxController *controller, + const TQString &flagstr, const TQString &description, + const TQString &offstr) + : TQCheckBox(description, parent), flag(flagstr), off(offstr), includeOff(false), useDef(false), defSet(false) { - QToolTip::add(this, flagstr); + TQToolTip::add(this, flagstr); controller->addCheckBox(this); } -FlagCheckBox::FlagCheckBox(QWidget *parent, FlagCheckBoxController *controller, - const QString &flagstr, const QString &description, - const QString &offstr, const QString &defstr) - : QCheckBox(description, parent), flag(flagstr), off(offstr), def(defstr), includeOff(false), useDef(true), defSet(false) +FlagCheckBox::FlagCheckBox(TQWidget *parent, FlagCheckBoxController *controller, + const TQString &flagstr, const TQString &description, + const TQString &offstr, const TQString &defstr) + : TQCheckBox(description, parent), flag(flagstr), off(offstr), def(defstr), includeOff(false), useDef(true), defSet(false) { - QToolTip::add(this, flagstr); + TQToolTip::add(this, flagstr); controller->addCheckBox(this); } -FlagCheckBoxController::FlagCheckBoxController(QStringList multiKeys) +FlagCheckBoxController::FlagCheckBoxController(TQStringList multiKeys) :m_multiKeys(multiKeys) { } @@ -169,17 +169,17 @@ void FlagCheckBoxController::addCheckBox(FlagCheckBox *item) } -void FlagCheckBoxController::readFlags(QStringList *list) +void FlagCheckBoxController::readFlags(TQStringList *list) { //handle keys like -vxyz -> transform they into -vx -vy -vz //very "effective" algo :( -/* QStringList addons; - for (QStringList::Iterator mk = m_multiKeys.begin(); mk != m_multiKeys.end(); ++ mk) +/* TQStringList addons; + for (TQStringList::Iterator mk = m_multiKeys.begin(); mk != m_multiKeys.end(); ++ mk) { kdDebug() << "multikey " << *mk << endl; - for (QStringList::Iterator sli = list->begin(); sli != list->end(); ++sli) + for (TQStringList::Iterator sli = list->begin(); sli != list->end(); ++sli) { - QString key = *sli; + TQString key = *sli; kdDebug() << "current key: " << key << endl; if ( (key.length() > 3) && (key.startsWith(*mk)) ) { @@ -197,15 +197,15 @@ void FlagCheckBoxController::readFlags(QStringList *list) kdDebug() << "good" << endl; *list += addons; - for (QStringList::Iterator sli = list->begin(); sli != list->end(); ++sli) + for (TQStringList::Iterator sli = list->begin(); sli != list->end(); ++sli) { kdDebug() << "KEYS: " << *sli << endl; } */ - QPtrListIterator<FlagCheckBox> it(cblist); + TQPtrListIterator<FlagCheckBox> it(cblist); for (; it.current(); ++it) { FlagCheckBox *fitem = it.current(); - QStringList::Iterator sli = list->find(fitem->flag); + TQStringList::Iterator sli = list->find(fitem->flag); if (sli != list->end()) { fitem->setChecked(true); fitem->useDef = false; @@ -230,9 +230,9 @@ void FlagCheckBoxController::readFlags(QStringList *list) } -void FlagCheckBoxController::writeFlags(QStringList *list) +void FlagCheckBoxController::writeFlags(TQStringList *list) { - QPtrListIterator<FlagCheckBox> it(cblist); + TQPtrListIterator<FlagCheckBox> it(cblist); for (; it.current(); ++it) { FlagCheckBox *fitem = it.current(); if (fitem->isChecked() && (!fitem->useDef)) @@ -256,27 +256,27 @@ void FlagCheckBoxController::writeFlags(QStringList *list) { } -void FlagPathEditController::readFlags( QStringList * list ) +void FlagPathEditController::readFlags( TQStringList * list ) { // kdDebug() << "read path flags" << endl; - QPtrListIterator<FlagPathEdit> it(plist); + TQPtrListIterator<FlagPathEdit> it(plist); for (; it.current(); ++it) { FlagPathEdit *peitem = it.current(); - QStringList::Iterator sli = list->begin(); + TQStringList::Iterator sli = list->begin(); while ( sli != list->end() ) { // kdDebug() << "option: " << (*sli) << " flag is: " << peitem->flag << endl; if ((*sli).startsWith(peitem->flag)) { // kdDebug() << "Processing.." << endl; - peitem->setText((*sli).replace(QRegExp(QRegExp_escape(peitem->flag)),"")); + peitem->setText((*sli).replace(TQRegExp(QRegExp_escape(peitem->flag)),"")); sli = list->remove(sli); continue; } ++sli; } -/* QStringList::Iterator sli = list->find(peitem->flag); +/* TQStringList::Iterator sli = list->find(peitem->flag); if (sli != list->end()) { peitem->setText((*sli).remove(peitem->flag)); list->remove(sli); @@ -284,9 +284,9 @@ void FlagPathEditController::readFlags( QStringList * list ) } } -void FlagPathEditController::writeFlags( QStringList * list ) +void FlagPathEditController::writeFlags( TQStringList * list ) { - QPtrListIterator<FlagPathEdit> it(plist); + TQPtrListIterator<FlagPathEdit> it(plist); for (; it.current(); ++it) { FlagPathEdit *pitem = it.current(); if (!pitem->isEmpty()) @@ -299,14 +299,14 @@ void FlagPathEditController::addPathEdit( FlagPathEdit * item ) plist.append(item); } -FlagPathEdit::FlagPathEdit( QWidget * parent, QString pathDelimiter, - FlagPathEditController * controller, const QString & flagstr, const QString & description, +FlagPathEdit::FlagPathEdit( TQWidget * parent, TQString pathDelimiter, + FlagPathEditController * controller, const TQString & flagstr, const TQString & description, KFile::Mode mode ) - : QWidget(parent), delimiter(pathDelimiter), flag(flagstr), m_description(description) + : TQWidget(parent), delimiter(pathDelimiter), flag(flagstr), m_description(description) { - QBoxLayout *topLayout = new QVBoxLayout(this, 0, 1); - topLayout->addWidget(new QLabel(description, this)); - QBoxLayout *layout = new QHBoxLayout(topLayout, KDialog::spacingHint()); + TQBoxLayout *topLayout = new TQVBoxLayout(this, 0, 1); + topLayout->addWidget(new TQLabel(description, this)); + TQBoxLayout *layout = new TQHBoxLayout(topLayout, KDialog::spacingHint()); if (delimiter.isEmpty()) { @@ -318,15 +318,15 @@ FlagPathEdit::FlagPathEdit( QWidget * parent, QString pathDelimiter, { edit = new KLineEdit(this); layout->addWidget(edit); - details = new QPushButton("...", this); + details = new TQPushButton("...", this); details->setMaximumWidth(30); - connect(details, SIGNAL(clicked()), this, SLOT(showPathDetails())); + connect(details, TQT_SIGNAL(clicked()), this, TQT_SLOT(showPathDetails())); layout->addWidget(details); } - QApplication::sendPostedEvents(this, QEvent::ChildInserted); + TQApplication::sendPostedEvents(this, TQEvent::ChildInserted); - QToolTip::add(this, flagstr); + TQToolTip::add(this, flagstr); controller->addPathEdit(this); } @@ -335,7 +335,7 @@ void FlagPathEdit::showPathDetails( ) KDialogBase *dia = new KDialogBase(0, "flag_path_edit_dia", true, m_description, KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true); - QBoxLayout *diaLayout = new QVBoxLayout(dia, KDialog::marginHint(), KDialog::spacingHint()); + TQBoxLayout *diaLayout = new TQVBoxLayout(dia, KDialog::marginHint(), KDialog::spacingHint()); diaLayout->setAutoAdd(true); KURLRequester *req = new KURLRequester( dia ); @@ -345,9 +345,9 @@ void FlagPathEdit::showPathDetails( ) KEditListBox *elb = new KEditListBox( "", pCustomEditor, dia ); dia->setMainWidget(elb); - elb->insertStringList(QStringList::split(delimiter, text())); + elb->insertStringList(TQStringList::split(delimiter, text())); - if (dia->exec() == QDialog::Accepted) + if (dia->exec() == TQDialog::Accepted) { setText(elb->items().join(delimiter)); } @@ -355,7 +355,7 @@ void FlagPathEdit::showPathDetails( ) delete dia; } -void FlagPathEdit::setText( const QString text ) +void FlagPathEdit::setText( const TQString text ) { if (delimiter.isEmpty()) url->setURL(text); @@ -363,7 +363,7 @@ void FlagPathEdit::setText( const QString text ) edit->setText(text); } -QString FlagPathEdit::text( ) +TQString FlagPathEdit::text( ) { if (delimiter.isEmpty()) return url->url(); @@ -379,14 +379,14 @@ bool FlagPathEdit::isEmpty( ) return edit->text().isEmpty(); } -FlagRadioButton::FlagRadioButton( QWidget * parent, FlagRadioButtonController * controller, const QString & flagstr, const QString & description ) - : QRadioButton(description, parent), flag(flagstr) +FlagRadioButton::FlagRadioButton( TQWidget * parent, FlagRadioButtonController * controller, const TQString & flagstr, const TQString & description ) + : TQRadioButton(description, parent), flag(flagstr) { - QToolTip::add(this, flagstr); + TQToolTip::add(this, flagstr); controller->addRadioButton(this); } -FlagRadioButtonController::FlagRadioButtonController(QStringList multiKeys) +FlagRadioButtonController::FlagRadioButtonController(TQStringList multiKeys) :m_multiKeys(multiKeys) { } @@ -397,17 +397,17 @@ void FlagRadioButtonController::addRadioButton(FlagRadioButton *item) } -void FlagRadioButtonController::readFlags(QStringList *list) +void FlagRadioButtonController::readFlags(TQStringList *list) { //handle keys like -vxyz -> transform they into -vx -vy -vz //very "effective" algo :( -/* QStringList addons; - for (QStringList::Iterator mk = m_multiKeys.begin(); mk != m_multiKeys.end(); ++ mk) +/* TQStringList addons; + for (TQStringList::Iterator mk = m_multiKeys.begin(); mk != m_multiKeys.end(); ++ mk) { kdDebug() << "multikey " << *mk << endl; - for (QStringList::Iterator sli = list->begin(); sli != list->end(); ++sli) + for (TQStringList::Iterator sli = list->begin(); sli != list->end(); ++sli) { - QString key = *sli; + TQString key = *sli; kdDebug() << "current key: " << key << endl; if ( (key.length() > 3) && (key.startsWith(*mk)) ) { @@ -425,15 +425,15 @@ void FlagRadioButtonController::readFlags(QStringList *list) kdDebug() << "good" << endl; *list += addons; - for (QStringList::Iterator sli = list->begin(); sli != list->end(); ++sli) + for (TQStringList::Iterator sli = list->begin(); sli != list->end(); ++sli) { kdDebug() << "KEYS: " << *sli << endl; } */ - QPtrListIterator<FlagRadioButton> it(cblist); + TQPtrListIterator<FlagRadioButton> it(cblist); for (; it.current(); ++it) { FlagRadioButton *fitem = it.current(); - QStringList::Iterator sli = list->find(fitem->flag); + TQStringList::Iterator sli = list->find(fitem->flag); if (sli != list->end()) { fitem->setChecked(true); list->remove(sli); @@ -442,9 +442,9 @@ void FlagRadioButtonController::readFlags(QStringList *list) } -void FlagRadioButtonController::writeFlags(QStringList *list) +void FlagRadioButtonController::writeFlags(TQStringList *list) { - QPtrListIterator<FlagRadioButton> it(cblist); + TQPtrListIterator<FlagRadioButton> it(cblist); for (; it.current(); ++it) { FlagRadioButton *fitem = it.current(); if (fitem->isChecked()) @@ -460,18 +460,18 @@ void FlagRadioButtonController::writeFlags(QStringList *list) { } -void FlagEditController::readFlags( QStringList * list ) +void FlagEditController::readFlags( TQStringList * list ) { - QPtrListIterator<FlagListEdit> it(plist); + TQPtrListIterator<FlagListEdit> it(plist); for (; it.current(); ++it) { FlagListEdit *peitem = it.current(); - QStringList::Iterator sli = list->begin(); + TQStringList::Iterator sli = list->begin(); while (sli != list->end()) { if ((*sli).startsWith(peitem->flag)) { - peitem->appendText((*sli).replace(QRegExp(QRegExp_escape(peitem->flag)),"")); + peitem->appendText((*sli).replace(TQRegExp(QRegExp_escape(peitem->flag)),"")); sli = list->remove(sli); continue; } @@ -480,16 +480,16 @@ void FlagEditController::readFlags( QStringList * list ) } - QPtrListIterator<FlagSpinEdit> it2(slist); + TQPtrListIterator<FlagSpinEdit> it2(slist); for (; it2.current(); ++it2) { FlagSpinEdit *sitem = it2.current(); - QStringList::Iterator sli = list->begin(); + TQStringList::Iterator sli = list->begin(); while ( sli != list->end() ) { if ((*sli).startsWith(sitem->flag)) { - sitem->setText((*sli).replace(QRegExp(QRegExp_escape(sitem->flag)),"")); + sitem->setText((*sli).replace(TQRegExp(QRegExp_escape(sitem->flag)),"")); sli = list->remove(sli); continue; } @@ -498,16 +498,16 @@ void FlagEditController::readFlags( QStringList * list ) } } -void FlagEditController::writeFlags( QStringList * list ) +void FlagEditController::writeFlags( TQStringList * list ) { - QPtrListIterator<FlagListEdit> it(plist); + TQPtrListIterator<FlagListEdit> it(plist); for (; it.current(); ++it) { FlagListEdit *pitem = it.current(); if (!pitem->isEmpty()) (*list) += pitem->flags(); } - QPtrListIterator<FlagSpinEdit> it2(slist); + TQPtrListIterator<FlagSpinEdit> it2(slist); for (; it2.current(); ++it2) { FlagSpinEdit *sitem = it2.current(); if (!sitem->isDefault()) @@ -526,31 +526,31 @@ void FlagEditController::addSpinBox(FlagSpinEdit *item) } -FlagListEdit::FlagListEdit( QWidget * parent, QString listDelimiter, FlagEditController * controller, - const QString & flagstr, const QString & description) - : QWidget(parent), delimiter(listDelimiter), flag(flagstr), m_description(description) +FlagListEdit::FlagListEdit( TQWidget * parent, TQString listDelimiter, FlagEditController * controller, + const TQString & flagstr, const TQString & description) + : TQWidget(parent), delimiter(listDelimiter), flag(flagstr), m_description(description) { - QBoxLayout *topLayout = new QVBoxLayout(this, 0, 1); - topLayout->addWidget(new QLabel(description, this)); - QBoxLayout *layout = new QHBoxLayout(topLayout, KDialog::spacingHint()); + TQBoxLayout *topLayout = new TQVBoxLayout(this, 0, 1); + topLayout->addWidget(new TQLabel(description, this)); + TQBoxLayout *layout = new TQHBoxLayout(topLayout, KDialog::spacingHint()); edit = new KLineEdit(this); layout->addWidget(edit); if (! listDelimiter.isEmpty()) { - details = new QPushButton("...", this); + details = new TQPushButton("...", this); details->setMaximumWidth(30); - connect(details, SIGNAL(clicked()), this, SLOT(showListDetails())); + connect(details, TQT_SIGNAL(clicked()), this, TQT_SLOT(showListDetails())); layout->addWidget(details); } - QApplication::sendPostedEvents(this, QEvent::ChildInserted); + TQApplication::sendPostedEvents(this, TQEvent::ChildInserted); - QToolTip::add(this, flagstr); + TQToolTip::add(this, flagstr); controller->addListEdit(this); } -void FlagListEdit::setText( const QString text ) +void FlagListEdit::setText( const TQString text ) { edit->setText(text); } @@ -560,7 +560,7 @@ bool FlagListEdit::isEmpty( ) return edit->text().isEmpty(); } -QString FlagListEdit::text( ) +TQString FlagListEdit::text( ) { return edit->text(); } @@ -570,15 +570,15 @@ void FlagListEdit::showListDetails( ) KDialogBase *dia = new KDialogBase(0, "flag_list_edit_dia", true, m_description, KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true); - QBoxLayout *diaLayout = new QVBoxLayout(dia, KDialog::marginHint(), KDialog::spacingHint()); + TQBoxLayout *diaLayout = new TQVBoxLayout(dia, KDialog::marginHint(), KDialog::spacingHint()); diaLayout->setAutoAdd(true); KEditListBox *elb = new KEditListBox( "", dia ); dia->setMainWidget(elb); - elb->insertStringList(QStringList::split(delimiter, text())); + elb->insertStringList(TQStringList::split(delimiter, text())); - if (dia->exec() == QDialog::Accepted) + if (dia->exec() == TQDialog::Accepted) { setText(elb->items().join(delimiter)); } @@ -586,48 +586,48 @@ void FlagListEdit::showListDetails( ) delete dia; } -void FlagListEdit::appendText( const QString text ) +void FlagListEdit::appendText( const TQString text ) { - edit->setText(edit->text() + (edit->text().isEmpty()?QString(""):delimiter) + text); + edit->setText(edit->text() + (edit->text().isEmpty()?TQString(""):delimiter) + text); } -QStringList FlagListEdit::flags( ) +TQStringList FlagListEdit::flags( ) { - QStringList fl = QStringList::split(delimiter, text()); - for (QStringList::iterator it = fl.begin(); it != fl.end(); ++it) + TQStringList fl = TQStringList::split(delimiter, text()); + for (TQStringList::iterator it = fl.begin(); it != fl.end(); ++it) { (*it).prepend(flag); } return fl; } -FlagSpinEdit::FlagSpinEdit( QWidget * parent, int minVal, int maxVal, int incr, int defaultVal, FlagEditController * controller, const QString & flagstr, const QString & description ) - :QWidget(parent), m_defaultVal(defaultVal), flag(flagstr) +FlagSpinEdit::FlagSpinEdit( TQWidget * parent, int minVal, int maxVal, int incr, int defaultVal, FlagEditController * controller, const TQString & flagstr, const TQString & description ) + :TQWidget(parent), m_defaultVal(defaultVal), flag(flagstr) { - QBoxLayout *topLayout = new QVBoxLayout(this, 0, 1); - topLayout->addWidget(new QLabel(description, this)); + TQBoxLayout *topLayout = new TQVBoxLayout(this, 0, 1); + topLayout->addWidget(new TQLabel(description, this)); - spb = new QSpinBox(minVal, maxVal, incr, this); + spb = new TQSpinBox(minVal, maxVal, incr, this); spb->setValue(defaultVal); topLayout->addWidget(spb); - QApplication::sendPostedEvents(this, QEvent::ChildInserted); + TQApplication::sendPostedEvents(this, TQEvent::ChildInserted); - QToolTip::add(this, flagstr); + TQToolTip::add(this, flagstr); controller->addSpinBox(this); } -void FlagSpinEdit::setText( const QString text ) +void FlagSpinEdit::setText( const TQString text ) { spb->setValue(text.toInt()); } -QString FlagSpinEdit::text( ) +TQString FlagSpinEdit::text( ) { - return QString("%1").arg(spb->value()); + return TQString("%1").arg(spb->value()); } -QString FlagSpinEdit::flags( ) +TQString FlagSpinEdit::flags( ) { return flag + text(); } |