summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/designer/uilib
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:44:01 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:44:01 +0000
commit479f5f799523bffbcc83dff581a2299c047c6fff (patch)
tree186aae707ed02aac6c7cab2fb14e97f72aca5e36 /qtruby/rubylib/designer/uilib
parentf1dbff6145c98324ff82e34448b7483727e8ace4 (diff)
downloadtdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.tar.gz
tdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'qtruby/rubylib/designer/uilib')
-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