diff options
Diffstat (limited to 'lib/widgets/propeditor/psymbolcombo.cpp')
-rw-r--r-- | lib/widgets/propeditor/psymbolcombo.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/lib/widgets/propeditor/psymbolcombo.cpp b/lib/widgets/propeditor/psymbolcombo.cpp index 05ec4563..24f4259c 100644 --- a/lib/widgets/propeditor/psymbolcombo.cpp +++ b/lib/widgets/propeditor/psymbolcombo.cpp @@ -18,9 +18,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include <qlayout.h> -#include <qpainter.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqpushbutton.h> #include <klineedit.h> #ifndef PURE_QT @@ -28,52 +28,52 @@ #include <klocale.h> #include <kpushbutton.h> #include <kstdguiitem.h> -#include <qdialog.h> +#include <tqdialog.h> #endif #include "psymbolcombo.h" namespace PropertyLib{ -PSymbolCombo::PSymbolCombo(MultiProperty *property, QWidget *parent, const char *name) +PSymbolCombo::PSymbolCombo(MultiProperty *property, TQWidget *parent, const char *name) :PropertyWidget(property, parent, name) { - l = new QHBoxLayout(this); + l = new TQHBoxLayout(this); m_edit = new KLineEdit(this); - m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); + m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); m_edit->setMaxLength(1); l->addWidget(m_edit); - m_select = new QPushButton("...", this); - m_select->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::MinimumExpanding); + m_select = new TQPushButton("...", this); + m_select->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding); l->addWidget(m_select); #ifdef PURE_QT m_select->hide(); #endif - connect(m_select, SIGNAL(clicked()), this, SLOT(selectChar())); - connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); + connect(m_select, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectChar())); + connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); } -QVariant PSymbolCombo::value() const +TQVariant PSymbolCombo::value() const { if (!(m_edit->text().isNull())) - return QVariant(QString("%1").arg(m_edit->text().at(0).unicode())); + return TQVariant(TQString("%1").arg(m_edit->text().at(0).unicode())); else - return QVariant(0); + return TQVariant(0); } -void PSymbolCombo::setValue(const QVariant &value, bool emitChange) +void PSymbolCombo::setValue(const TQVariant &value, bool emitChange) { #if QT_VERSION >= 0x030100 if (!(value.isNull())) #else - if (value.canCast(QVariant::Int)) + if (value.canCast(TQVariant::Int)) #endif { - disconnect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); - m_edit->setText(QChar(value.toInt())); - connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); + disconnect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); + m_edit->setText(TQChar(value.toInt())); + connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); if (emitChange) emit propertyChanged(m_property, value); } @@ -82,19 +82,19 @@ void PSymbolCombo::setValue(const QVariant &value, bool emitChange) void PSymbolCombo::selectChar() { #ifndef PURE_QT - QDialog* dia = new QDialog(this, "select_dialog", true); - QVBoxLayout *dv = new QVBoxLayout(dia, 2); + TQDialog* dia = new TQDialog(this, "select_dialog", true); + TQVBoxLayout *dv = new TQVBoxLayout(dia, 2); KCharSelect *select = new KCharSelect(dia, "select_char"); dv->addWidget(select); - QHBoxLayout *dh = new QHBoxLayout(dv, 6); + TQHBoxLayout *dh = new TQHBoxLayout(dv, 6); KPushButton *pbOk = new KPushButton(KStdGuiItem::ok(), dia); KPushButton *pbCancel = new KPushButton(KStdGuiItem::cancel(), dia); - QSpacerItem *si = new QSpacerItem(30, 0, QSizePolicy::Expanding, QSizePolicy::Expanding); + TQSpacerItem *si = new TQSpacerItem(30, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding); - connect(pbOk, SIGNAL(clicked()), dia, SLOT(accept())); - connect(pbCancel, SIGNAL(clicked()), dia, SLOT(reject())); + connect(pbOk, TQT_SIGNAL(clicked()), dia, TQT_SLOT(accept())); + connect(pbCancel, TQT_SIGNAL(clicked()), dia, TQT_SLOT(reject())); dh->addItem(si); dh->addWidget(pbOk); @@ -103,7 +103,7 @@ void PSymbolCombo::selectChar() if (!(m_edit->text().isNull())) select->setChar(m_edit->text().at(0)); - if (dia->exec() == QDialog::Accepted) + if (dia->exec() == TQDialog::Accepted) { m_edit->setText(select->chr()); } @@ -111,17 +111,17 @@ void PSymbolCombo::selectChar() #endif } -void PSymbolCombo::updateProperty(const QString& val) +void PSymbolCombo::updateProperty(const TQString& val) { - emit propertyChanged(m_property, QVariant(QString("%1").arg(val.at(0).unicode()))); + emit propertyChanged(m_property, TQVariant(TQString("%1").arg(val.at(0).unicode()))); } -void PSymbolCombo::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value) +void PSymbolCombo::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value) { p->setBrush(cg.background()); p->setPen(Qt::NoPen); p->drawRect(r); - p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, QChar(value.toInt())); + p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQChar(value.toInt())); } } |