summaryrefslogtreecommitdiffstats
path: root/lib/widgets/propeditor/psymbolcombo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/widgets/propeditor/psymbolcombo.cpp')
-rw-r--r--lib/widgets/propeditor/psymbolcombo.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/widgets/propeditor/psymbolcombo.cpp b/lib/widgets/propeditor/psymbolcombo.cpp
index 24f4259c..087f7a8d 100644
--- a/lib/widgets/propeditor/psymbolcombo.cpp
+++ b/lib/widgets/propeditor/psymbolcombo.cpp
@@ -35,16 +35,16 @@
namespace PropertyLib{
-PSymbolCombo::PSymbolCombo(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PSymbolCombo::PSymbolCombo(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
l = new TQHBoxLayout(this);
m_edit = new KLineEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
m_edit->setMaxLength(1);
l->addWidget(m_edit);
m_select = new TQPushButton("...", this);
- m_select->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
+ m_select->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
l->addWidget(m_select);
#ifdef PURE_QT
@@ -58,18 +58,14 @@ PSymbolCombo::PSymbolCombo(MultiProperty *property, TQWidget *parent, const char
TQVariant PSymbolCombo::value() const
{
if (!(m_edit->text().isNull()))
- return TQVariant(TQString("%1").arg(m_edit->text().at(0).unicode()));
+ return TQVariant(TQString("%1").tqarg(m_edit->text().tqat(0).tqunicode()));
else
return TQVariant(0);
}
void PSymbolCombo::setValue(const TQVariant &value, bool emitChange)
{
-#if QT_VERSION >= 0x030100
if (!(value.isNull()))
-#else
- if (value.canCast(TQVariant::Int))
-#endif
{
disconnect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));
m_edit->setText(TQChar(value.toInt()));
@@ -113,15 +109,15 @@ void PSymbolCombo::selectChar()
void PSymbolCombo::updateProperty(const TQString& val)
{
- emit propertyChanged(m_property, TQVariant(TQString("%1").arg(val.at(0).unicode())));
+ emit propertyChanged(m_property, TQVariant(TQString("%1").tqarg(val.tqat(0).tqunicode())));
}
void PSymbolCombo::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
p->setBrush(cg.background());
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQChar(value.toInt()));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TQChar(value.toInt()));
}
}