summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/designer/uilib/qui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtruby/rubylib/designer/uilib/qui.cpp')
-rw-r--r--qtruby/rubylib/designer/uilib/qui.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/qtruby/rubylib/designer/uilib/qui.cpp b/qtruby/rubylib/designer/uilib/qui.cpp
index 9aa7513f..e587eee8 100644
--- a/qtruby/rubylib/designer/uilib/qui.cpp
+++ b/qtruby/rubylib/designer/uilib/qui.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- qui.cpp - A ruby wrapper for the QWidgetFactory class
+ qui.cpp - A ruby wrapper for the TQWidgetFactory class
-------------------
begin : Wed Mar 14 2004
copyright : (C) 2004 by Richard Dale
@@ -15,8 +15,8 @@
* *
***************************************************************************/
-#include <qwidgetfactory.h>
-#include <qwidget.h>
+#include <tqwidgetfactory.h>
+#include <tqwidget.h>
#include "smoke.h"
@@ -47,31 +47,31 @@ static VALUE qwidget_factory_class;
static VALUE
create(int argc, VALUE * argv, VALUE /*klass*/)
{
- QWidget * topLevelWidget = 0;
+ TQWidget * topLevelWidget = 0;
VALUE result = Qnil;
if (argc == 0 || argc > 4) {
rb_raise(rb_eArgError, "wrong number of arguments (%d)\n", argc);
}
- QObject * connector = 0;
+ TQObject * connector = 0;
if (argc >= 2) {
if (TYPE(argv[1]) == T_DATA) {
smokeruby_object *o = value_obj_info(argv[1]);
if (o != 0) {
- connector = (QObject *) o->ptr;
+ connector = (TQObject *) o->ptr;
}
} else {
rb_raise(rb_eArgError, "invalid argument type\n");
}
}
- QWidget * parent = 0;
+ TQWidget * parent = 0;
if (argc >= 3) {
if (TYPE(argv[2]) == T_DATA) {
smokeruby_object *o = value_obj_info(argv[2]);
if (o != 0) {
- parent = (QWidget *) o->ptr;
+ parent = (TQWidget *) o->ptr;
}
} else {
rb_raise(rb_eArgError, "invalid argument type\n");
@@ -88,18 +88,18 @@ create(int argc, VALUE * argv, VALUE /*klass*/)
}
if (TYPE(argv[0]) == T_STRING) {
- topLevelWidget = QWidgetFactory::create(QString(StringValuePtr(argv[0])), connector, parent, name);
+ topLevelWidget = TQWidgetFactory::create(TQString(StringValuePtr(argv[0])), connector, parent, name);
} else if (TYPE(argv[0]) == T_DATA) {
- QIODevice * dev = 0;
+ TQIODevice * dev = 0;
smokeruby_object *o = value_obj_info(argv[0]);
- if (o != 0 && o->ptr != 0 && o->classId == qt_Smoke->idClass("QIODevice")) {
- dev = (QIODevice *) o->ptr;
+ if (o != 0 && o->ptr != 0 && o->classId == qt_Smoke->idClass("TQIODevice")) {
+ dev = (TQIODevice *) o->ptr;
} else {
rb_raise(rb_eArgError, "invalid argument type\n");
}
- topLevelWidget = QWidgetFactory::create(dev, connector, parent, name);
+ topLevelWidget = TQWidgetFactory::create(dev, connector, parent, name);
} else {
rb_raise(rb_eArgError, "invalid argument type\n");
}
@@ -121,7 +121,7 @@ create(int argc, VALUE * argv, VALUE /*klass*/)
static VALUE
load_images(VALUE klass, VALUE dir)
{
- QWidgetFactory::loadImages(QString(StringValuePtr(dir)));
+ TQWidgetFactory::loadImages(TQString(StringValuePtr(dir)));
return klass;
}
@@ -129,14 +129,14 @@ static VALUE
widgets(VALUE /*self*/)
{
VALUE result = rb_ary_new();
- QStringList widgetList = QWidgetFactory::widgets();
+ TQStringList widgetList = TQWidgetFactory::widgets();
- for (QStringList::Iterator it = widgetList.begin(); it != widgetList.end(); ++it) {
- QString widgetName = *it;
+ for (TQStringList::Iterator it = widgetList.begin(); it != widgetList.end(); ++it) {
+ TQString widgetName = *it;
if (widgetName.startsWith("Q")) {
- widgetName.replace(0, 1, QString("Qt::"));
+ widgetName.replace(0, 1, TQString("Qt::"));
} else if (widgetName.startsWith("K")) {
- widgetName.replace(0, 1, QString("KDE::"));
+ widgetName.replace(0, 1, TQString("KDE::"));
}
rb_ary_push(result, rb_str_new2(widgetName.latin1()));
}
@@ -147,15 +147,15 @@ widgets(VALUE /*self*/)
static VALUE
supports_widget(VALUE /*self*/, VALUE widget)
{
- QString widgetName(StringValuePtr(widget));
+ TQString widgetName(StringValuePtr(widget));
if (widgetName.startsWith("Qt::")) {
- widgetName.replace(0, 4, QString("Q"));
+ widgetName.replace(0, 4, TQString("Q"));
} else if (widgetName.startsWith("KDE::")) {
- widgetName.replace(0, 5, QString("K"));
+ widgetName.replace(0, 5, TQString("K"));
}
- return QWidgetFactory::supportsWidget(widgetName) ? Qtrue : Qfalse;
+ return TQWidgetFactory::supportsWidget(widgetName) ? Qtrue : Qfalse;
}
void