[Kde-bindings] KDE/kdebindings/qtruby
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Sat Mar 17 14:56:04 UTC 2007
SVN commit 643470 by rdale:
* The code to allow the type() method to be used for Qt::GraphicsItem
classes had the wrong names for the classes
* Improved the resolution of QGraphicsItem classes in resolve_classname()
CCMAIL: kde-bindings at kde.org
M +6 -0 ChangeLog
M +26 -0 rubylib/qtruby/handlers.cpp
M +10 -10 rubylib/qtruby/lib/Qt/qtruby4.rb
--- trunk/KDE/kdebindings/qtruby/ChangeLog #643469:643470
@@ -1,3 +1,9 @@
+2007-03-17 Richard Dale <rdale at foton.es>
+
+ * The code to allow the type() method to be used for Qt::GraphicsItem
+ classes had the wrong names for the classes
+ * Improved the resolution of QGraphicsItem classes in resolve_classname()
+
2007-03-13 Richard Dale <rdale at foton.es>
* When a ruby string was converted to a 'char *' arg, a copy was malloc'd
--- trunk/KDE/kdebindings/qtruby/rubylib/qtruby/handlers.cpp #643469:643470
@@ -533,6 +533,32 @@
meta = meta->superClass();
}
+ } else if (isDerivedFromByName(smoke, smoke->classes[classId].className, "QGraphicsItem")) {
+ QGraphicsItem * item = (QGraphicsItem *) smoke->cast(ptr, classId, smoke->idClass("QGraphicsItem"));
+ switch (item->type()) {
+ case 1:
+ return "Qt::QGraphicsItem";
+ case 2:
+ return "Qt::QGraphicsPathItem";
+ case 3:
+ return "Qt::QGraphicsRectItem";
+ case 4:
+ return "Qt::QGraphicsEllipseItem";
+ case 5:
+ return "Qt::QGraphicsPolygonItem";
+ case 6:
+ return "Qt::QGraphicsLineItem";
+ case 7:
+ return "Qt::QGraphicsPixmapItem";
+ case 8:
+ return "Qt::QGraphicsTextItem";
+ case 9:
+ return "Qt::QGraphicsSimpleTextItem";
+ case 10:
+ return "Qt::QGraphicsItemGroup";
+ default:
+ return "Qt::QGraphicsItem";
+ }
} else if (isDerivedFromByName(smoke, smoke->classes[classId].className, "QLayoutItem")) {
QLayoutItem * item = (QLayoutItem *) smoke->cast(ptr, classId, smoke->idClass("QLayoutItem"));
if (item->widget() != 0) {
--- trunk/KDE/kdebindings/qtruby/rubylib/qtruby/lib/Qt/qtruby4.rb #643469:643470
@@ -679,49 +679,49 @@
end
end
- class QGraphicsEllipseItem < Qt::Base
+ class GraphicsEllipseItem < Qt::Base
def type(*args)
method_missing(:type, *args)
end
end
- class QGraphicsItem < Qt::Base
+ class GraphicsItem < Qt::Base
def type(*args)
method_missing(:type, *args)
end
end
- class QGraphicsItemGroup < Qt::Base
+ class GraphicsItemGroup < Qt::Base
def type(*args)
method_missing(:type, *args)
end
end
- class QGraphicsLineItem < Qt::Base
+ class GraphicsLineItem < Qt::Base
def type(*args)
method_missing(:type, *args)
end
end
- class QGraphicsPathItem < Qt::Base
+ class GraphicsPathItem < Qt::Base
def type(*args)
method_missing(:type, *args)
end
end
- class QGraphicsPixmapItem < Qt::Base
+ class GraphicsPixmapItem < Qt::Base
def type(*args)
method_missing(:type, *args)
end
end
- class QGraphicsPolygonItem < Qt::Base
+ class GraphicsPolygonItem < Qt::Base
def type(*args)
method_missing(:type, *args)
end
end
- class QGraphicsRectItem < Qt::Base
+ class GraphicsRectItem < Qt::Base
def type(*args)
method_missing(:type, *args)
end
@@ -757,13 +757,13 @@
end
end
- class QGraphicsSimpleTextItem < Qt::Base
+ class GraphicsSimpleTextItem < Qt::Base
def type(*args)
method_missing(:type, *args)
end
end
- class QGraphicsTextItem < Qt::Base
+ class GraphicsTextItem < Qt::Base
def type(*args)
method_missing(:type, *args)
end
More information about the Kde-bindings
mailing list