summaryrefslogtreecommitdiffstats
path: root/kspy/propsview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /kspy/propsview.cpp
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspy/propsview.cpp')
-rw-r--r--kspy/propsview.cpp59
1 files changed, 32 insertions, 27 deletions
diff --git a/kspy/propsview.cpp b/kspy/propsview.cpp
index 50f60bed..a59903d5 100644
--- a/kspy/propsview.cpp
+++ b/kspy/propsview.cpp
@@ -29,26 +29,26 @@
class KSpyItem : KListViewItem
{
public:
- KSpyItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null )
- : KListViewItem(parent, label1, label2, label3, label4, label5, label6)
+ KSpyItem( TQListView * tqparent, TQString label1, TQString label2 = TQString(), TQString label3 = TQString(), TQString label4 = TQString(), TQString label5 = TQString(), TQString label6 = TQString() )
+ : KListViewItem(tqparent, label1, label2, label3, label4, label5, label6)
{
}
protected:
void paintCell( TQPainter * p, const TQColorGroup & cg,
- int column, int width, int alignment )
+ int column, int width, int tqalignment )
{
if (column == 1 && text(2) == "TQColor") {
TQColorGroup color_cg( cg.foreground(), cg.background(),
cg.light(), cg.dark(), cg.mid(),
TQColor(text(1)), TQColor(text(1)) );
- TQListViewItem::paintCell(p, color_cg, column, width, alignment);
+ TQListViewItem::paintCell(p, color_cg, column, width, tqalignment);
} else {
- KListViewItem::paintCell(p, cg, column, width, alignment);
+ KListViewItem::paintCell(p, cg, column, width, tqalignment);
}
}
};
-PropsView::PropsView(TQWidget *parent, const char *name ) : KListView(parent,name)
+PropsView::PropsView(TQWidget *tqparent, const char *name ) : KListView(tqparent,name)
{
addColumn( i18n( "Name" ) );
addColumn( i18n( "Value" ) );
@@ -69,13 +69,13 @@ PropsView::~PropsView()
void PropsView::buildList( TQObject *o )
{
- TQMetaObject *mo = o->metaObject();
+ TQMetaObject *mo = o->tqmetaObject();
TQStrList names = mo->propertyNames( true );
for ( uint i = 0; i < names.count(); i++ ) {
char *prop = names.at( i );
TQVariant v = o->property( prop );
- const TQMetaProperty *mp = mo->property( mo->findProperty(prop, true), true );
+ const TQMetaProperty *mp = mo->property( mo->tqfindProperty(prop, true), true );
TQString val( "????" );
switch( v.type() ) {
@@ -95,55 +95,60 @@ void PropsView::buildList( TQObject *o )
case TQVariant::Cursor:
{
TQCursor c = v.toCursor();
- val = TQString("shape=%1").arg(c.shape());
+ val = TQString("tqshape=%1").tqarg(c.tqshape());
break;
}
case TQVariant::Font:
{
TQFont f = v.toFont();
val = TQString("family=%1, pointSize=%2, weight=%3, italic=%4, bold=%5, underline=%6, strikeOut=%7")
- .arg(f.family())
- .arg(f.pointSize())
- .arg(f.weight())
- .arg(f.italic())
- .arg(f.bold())
- .arg(f.underline())
- .arg(f.strikeOut());
+ .tqarg(f.family())
+ .tqarg(f.pointSize())
+ .tqarg(f.weight())
+ .tqarg(f.italic())
+ .tqarg(f.bold())
+ .tqarg(f.underline())
+ .tqarg(f.strikeOut());
break;
}
case TQVariant::Int:
val.setNum( v.toInt() );
if (mp->isEnumType()) {
- TQMetaObject * metaObject = *(mp->meta);
- val = TQString("%1::%2").arg(metaObject->className()).arg(mp->valueToKey(val.toInt()));
+#ifdef USE_QT4
+// TQMetaObject * tqmetaObject = *(mp->meta); // FIXME
+ val = TQString("%1::%2").tqarg("QT4_CANNOT_FIND_TQMETAOBJECT_FOR_TQMETAPROPERTY").tqarg(mp->valueToKey(val.toInt())); // FIXME
+#else // USE_QT4
+ TQMetaObject * tqmetaObject = *(mp->meta);
+ val = TQString("%1::%2").tqarg(tqmetaObject->className()).tqarg(mp->valueToKey(val.toInt()));
+#endif // USE_QT4
}
break;
case TQVariant::Point:
{
TQPoint p = v.toPoint();
- val = TQString("x=%1, y=%2").arg(p.x()).arg(p.y());
+ val = TQString("x=%1, y=%2").tqarg(p.x()).tqarg(p.y());
break;
}
case TQVariant::Rect:
{
TQRect r = v.toRect();
val = TQString("left=%1, right=%2, top=%3, bottom=%4")
- .arg(r.left())
- .arg(r.right())
- .arg(r.top())
- .arg(r.bottom());
+ .tqarg(r.left())
+ .tqarg(r.right())
+ .tqarg(r.top())
+ .tqarg(r.bottom());
break;
}
case TQVariant::Size:
{
TQSize s = v.toSize();
- val = TQString("width=%1, height=%2").arg(s.width()).arg(s.height());
+ val = TQString("width=%1, height=%2").tqarg(s.width()).tqarg(s.height());
break;
}
case TQVariant::SizePolicy:
{
TQSizePolicy s = v.toSizePolicy();
- val = TQString("horData=%1, verData=%2").arg(s.horData()).arg(s.verData());
+ val = TQString("horData=%1, verData=%2").tqarg(s.horData()).tqarg(s.verData());
break;
}
case TQVariant::Double:
@@ -161,8 +166,8 @@ void PropsView::buildList( TQObject *o )
TQString no("No");
TQString writable = ( mp->writable() ? rw : ro );
- TQString setType = ( mp->isSetType() ? st : TQString::null );
- TQString enumType = ( mp->isEnumType() ? et : TQString::null );
+ TQString setType = ( mp->isSetType() ? st : TQString() );
+ TQString enumType = ( mp->isEnumType() ? et : TQString() );
TQString designable = ( mp->designable(o) ? yes : no );
TQString flags;