summaryrefslogtreecommitdiffstats
path: root/kspy/propsview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kspy/propsview.cpp')
-rw-r--r--kspy/propsview.cpp116
1 files changed, 58 insertions, 58 deletions
diff --git a/kspy/propsview.cpp b/kspy/propsview.cpp
index 12b855c0..50f60bed 100644
--- a/kspy/propsview.cpp
+++ b/kspy/propsview.cpp
@@ -15,12 +15,12 @@
* *
***************************************************************************/
-#include <qobjectdict.h>
-#include <qobjectlist.h>
-#include <qmetaobject.h>
-#include <qstrlist.h>
-#include <qvariant.h>
-#include <qcursor.h>
+#include <tqobjectdict.h>
+#include <tqobjectlist.h>
+#include <tqmetaobject.h>
+#include <tqstrlist.h>
+#include <tqvariant.h>
+#include <tqcursor.h>
#include <klocale.h>
@@ -29,26 +29,26 @@
class KSpyItem : KListViewItem
{
public:
- KSpyItem( QListView * parent, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null, QString label5 = QString::null, QString label6 = QString::null )
+ 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)
{
}
protected:
- void paintCell( QPainter * p, const QColorGroup & cg,
+ void paintCell( TQPainter * p, const TQColorGroup & cg,
int column, int width, int alignment )
{
- if (column == 1 && text(2) == "QColor") {
- QColorGroup color_cg( cg.foreground(), cg.background(),
+ if (column == 1 && text(2) == "TQColor") {
+ TQColorGroup color_cg( cg.foreground(), cg.background(),
cg.light(), cg.dark(), cg.mid(),
- QColor(text(1)), QColor(text(1)) );
- QListViewItem::paintCell(p, color_cg, column, width, alignment);
+ TQColor(text(1)), TQColor(text(1)) );
+ TQListViewItem::paintCell(p, color_cg, column, width, alignment);
} else {
KListViewItem::paintCell(p, cg, column, width, alignment);
}
}
};
-PropsView::PropsView(QWidget *parent, const char *name ) : KListView(parent,name)
+PropsView::PropsView(TQWidget *parent, const char *name ) : KListView(parent,name)
{
addColumn( i18n( "Name" ) );
addColumn( i18n( "Value" ) );
@@ -67,41 +67,41 @@ PropsView::~PropsView()
{
}
-void PropsView::buildList( QObject *o )
+void PropsView::buildList( TQObject *o )
{
- QMetaObject *mo = o->metaObject();
- QStrList names = mo->propertyNames( true );
+ TQMetaObject *mo = o->metaObject();
+ TQStrList names = mo->propertyNames( true );
for ( uint i = 0; i < names.count(); i++ ) {
char *prop = names.at( i );
- QVariant v = o->property( prop );
- const QMetaProperty *mp = mo->property( mo->findProperty(prop, true), true );
+ TQVariant v = o->property( prop );
+ const TQMetaProperty *mp = mo->property( mo->findProperty(prop, true), true );
- QString val( "????" );
+ TQString val( "????" );
switch( v.type() ) {
- case QVariant::String:
- case QVariant::CString:
+ case TQVariant::String:
+ case TQVariant::CString:
val = v.toString();
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
val = ( v.toBool() ? "True" : "False" );
break;
- case QVariant::Color:
+ case TQVariant::Color:
{
- QColor c = v.toColor();
+ TQColor c = v.toColor();
val = c.name();
break;
}
- case QVariant::Cursor:
+ case TQVariant::Cursor:
{
- QCursor c = v.toCursor();
- val = QString("shape=%1").arg(c.shape());
+ TQCursor c = v.toCursor();
+ val = TQString("shape=%1").arg(c.shape());
break;
}
- case QVariant::Font:
+ case TQVariant::Font:
{
- QFont f = v.toFont();
- val = QString("family=%1, pointSize=%2, weight=%3, italic=%4, bold=%5, underline=%6, strikeOut=%7")
+ 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())
@@ -111,61 +111,61 @@ void PropsView::buildList( QObject *o )
.arg(f.strikeOut());
break;
}
- case QVariant::Int:
+ case TQVariant::Int:
val.setNum( v.toInt() );
if (mp->isEnumType()) {
- QMetaObject * metaObject = *(mp->meta);
- val = QString("%1::%2").arg(metaObject->className()).arg(mp->valueToKey(val.toInt()));
+ TQMetaObject * metaObject = *(mp->meta);
+ val = TQString("%1::%2").arg(metaObject->className()).arg(mp->valueToKey(val.toInt()));
}
break;
- case QVariant::Point:
+ case TQVariant::Point:
{
- QPoint p = v.toPoint();
- val = QString("x=%1, y=%2").arg(p.x()).arg(p.y());
+ TQPoint p = v.toPoint();
+ val = TQString("x=%1, y=%2").arg(p.x()).arg(p.y());
break;
}
- case QVariant::Rect:
+ case TQVariant::Rect:
{
- QRect r = v.toRect();
- val = QString("left=%1, right=%2, top=%3, bottom=%4")
+ 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());
break;
}
- case QVariant::Size:
+ case TQVariant::Size:
{
- QSize s = v.toSize();
- val = QString("width=%1, height=%2").arg(s.width()).arg(s.height());
+ TQSize s = v.toSize();
+ val = TQString("width=%1, height=%2").arg(s.width()).arg(s.height());
break;
}
- case QVariant::SizePolicy:
+ case TQVariant::SizePolicy:
{
- QSizePolicy s = v.toSizePolicy();
- val = QString("horData=%1, verData=%2").arg(s.horData()).arg(s.verData());
+ TQSizePolicy s = v.toSizePolicy();
+ val = TQString("horData=%1, verData=%2").arg(s.horData()).arg(s.verData());
break;
}
- case QVariant::Double:
+ case TQVariant::Double:
val.setNum( v.toDouble() );
break;
default:
break;
}
- QString ro("R/O");
- QString rw("R/W");
- QString st("Set");
- QString et("Enum");
- QString yes("Yes");
- QString no("No");
+ TQString ro("R/O");
+ TQString rw("R/W");
+ TQString st("Set");
+ TQString et("Enum");
+ TQString yes("Yes");
+ TQString no("No");
- QString writable = ( mp->writable() ? rw : ro );
- QString setType = ( mp->isSetType() ? st : QString::null );
- QString enumType = ( mp->isEnumType() ? et : QString::null );
- QString designable = ( mp->designable(o) ? yes : no );
+ TQString writable = ( mp->writable() ? rw : ro );
+ TQString setType = ( mp->isSetType() ? st : TQString::null );
+ TQString enumType = ( mp->isEnumType() ? et : TQString::null );
+ TQString designable = ( mp->designable(o) ? yes : no );
- QString flags;
+ TQString flags;
bool first = true;
if ( !setType.isNull() ) {
if ( first )
@@ -188,7 +188,7 @@ void PropsView::buildList( QObject *o )
}
}
-void PropsView::setTarget( QObject *o )
+void PropsView::setTarget( TQObject *o )
{
clear();
buildList( o );