summaryrefslogtreecommitdiffstats
path: root/lib/widgets/propeditor/psymbolcombo.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /lib/widgets/propeditor/psymbolcombo.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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()));
}
}