[Kde-bindings] playground/bindings/kimono
Arno Rehn
kde at arnorehn.de
Fri Apr 6 17:06:51 UTC 2007
SVN commit 651139 by arnorehn:
* Added more helper classes for abstract base classes which are returned by
public methods.
* Fixed little bug in qdbus/chat/chat.cs.
CCMAIL: kde-bindings at kde.org
M +3 -0 ChangeLog
M +1 -1 examples/qdbus/chat/chat.cs
A gui/QAbstractButtonHelper.cs
A gui/QAbstractItemDelegateHelper.cs
A gui/QAbstractItemViewHelper.cs
A gui/QAbstractProxyModelHelper.cs
A gui/QAbstractTextDocumentLayoutHelper.cs
M +11 -0 handlers.cpp
M +146 -0 qyoto.cpp
--- trunk/playground/bindings/kimono/ChangeLog #651138:651139
@@ -1,6 +1,9 @@
2007-04-06 Arno Rehn <arno at arnorehn.de>
* Added missing QItemModel.cs. Forgot to do a 'svn add' last time.
+ * Added more helper classes for abstract base classes which are returned by
+ public methods.
+ * Fixed little bug in qdbus/chat/chat.cs.
2007-04-06 Richard Dale <rdale at foton.es>
--- trunk/playground/bindings/kimono/examples/qdbus/chat/chat.cs #651138:651139
@@ -67,7 +67,7 @@
foreach(string element in m_messages) {
history.Append(element + "\n");
}
- m_ui.chatHistory.SetPlainText(history.ToString());
+ m_ui.chatHistory.PlainText = history.ToString();
}
[Q_SLOT]
--- trunk/playground/bindings/kimono/handlers.cpp #651138:651139
@@ -436,6 +436,17 @@
if (strcmp(smoke->classes[classId].className, "QAbstractItemModel") == 0)
return "Qyoto.QItemModel";
+ if (strcmp(smoke->classes[classId].className, "QAbstractButton") == 0)
+ return "Qyoto.QAbstractButtonHelper";
+ if (strcmp(smoke->classes[classId].className, "QAbstractProxyModel") == 0)
+ return "Qyoto.QAbstractProxyModelHelper";
+ if (strcmp(smoke->classes[classId].className, "QAbstractItemDelegate") == 0)
+ return "Qyoto.QAbstractItemDelegateHelper";
+ if (strcmp(smoke->classes[classId].className, "QAbstractItemView") == 0)
+ return "Qyoto.QAbstractItemViewHelper";
+ if (strcmp(smoke->classes[classId].className, "QAbstractTextDocumentLayout") == 0)
+ return "Qyoto.QAbstractTextDocumentLayoutHelper";
+
while (meta != 0) {
Smoke::Index classId = smoke->idClass(meta->className());
if (classId != 0) {
--- trunk/playground/bindings/kimono/qyoto.cpp #651138:651139
@@ -29,6 +29,10 @@
#include <QtCore/qstringlist.h>
#include <QMetaMethod>
#include <QModelIndex>
+#include <QAbstractProxyModel>
+#include <QAbstractItemDelegate>
+#include <QAbstractItemView>
+#include <QAbstractTextDocumentLayout>
#undef DEBUG
#ifndef __USE_POSIX
@@ -1410,6 +1414,148 @@
return ret;
}
+void*
+QAbstractProxyModelMapFromSource(void* obj, void* sourceIndex)
+{
+ smokeqyoto_object *o = (smokeqyoto_object*) (*GetSmokeObject)(obj);
+ smokeqyoto_object *i = (smokeqyoto_object*) (*GetSmokeObject)(sourceIndex);
+ QModelIndex result = ((QAbstractProxyModel*) o->ptr)->mapFromSource(*(((QModelIndex*) i->ptr)));
+ (*FreeGCHandle)(obj);
+ (*FreeGCHandle)(sourceIndex);
+ smokeqyoto_object *ret = alloc_smokeqyoto_object(true, o->smoke, o->smoke->idClass("QModelIndex"), &result);
+ return ret;
+}
+
+void*
+QAbstractProxyModelMapToSource(void* obj, void* proxyIndex)
+{
+ smokeqyoto_object *o = (smokeqyoto_object*) (*GetSmokeObject)(obj);
+ smokeqyoto_object *i = (smokeqyoto_object*) (*GetSmokeObject)(proxyIndex);
+ QModelIndex result = ((QAbstractProxyModel*) o->ptr)->mapToSource(*(((QModelIndex*) i->ptr)));
+ (*FreeGCHandle)(obj);
+ (*FreeGCHandle)(proxyIndex);
+ smokeqyoto_object *ret = alloc_smokeqyoto_object(true, o->smoke, o->smoke->idClass("QModelIndex"), &result);
+ return ret;
+}
+
+void
+QAbstractItemDelegatePaint(void* obj, void* painter, void* option, void* index)
+{
+ smokeqyoto_object *o = (smokeqyoto_object*) (*GetSmokeObject)(obj);
+ smokeqyoto_object *p = (smokeqyoto_object*) (*GetSmokeObject)(painter);
+ smokeqyoto_object *opt = (smokeqyoto_object*) (*GetSmokeObject)(option);
+ smokeqyoto_object *i = (smokeqyoto_object*) (*GetSmokeObject)(index);
+ ((QAbstractItemDelegate*) o->ptr)->paint((QPainter*) p->ptr, *((QStyleOptionViewItem*) opt->ptr),
+ *(((QModelIndex*) i->ptr)));
+ (*FreeGCHandle)(obj);
+ (*FreeGCHandle)(painter);
+ (*FreeGCHandle)(option);
+ (*FreeGCHandle)(index);
+}
+
+void*
+QAbstractItemDelegateSizeHint(void* obj, void* option, void* index)
+{
+ smokeqyoto_object *o = (smokeqyoto_object*) (*GetSmokeObject)(obj);
+ smokeqyoto_object *opt = (smokeqyoto_object*) (*GetSmokeObject)(option);
+ smokeqyoto_object *i = (smokeqyoto_object*) (*GetSmokeObject)(index);
+ QSize result = ((QAbstractItemDelegate*) o->ptr)->sizeHint(*((QStyleOptionViewItem*) opt->ptr),
+ *(((QModelIndex*) i->ptr)));
+ (*FreeGCHandle)(obj);
+ (*FreeGCHandle)(option);
+ (*FreeGCHandle)(index);
+ smokeqyoto_object *ret = alloc_smokeqyoto_object(true, o->smoke, o->smoke->idClass("QSize"), &result);
+ return ret;
+}
+
+void*
+QAbstractItemViewIndexAt(void* obj, void* point)
+{
+ smokeqyoto_object *o = (smokeqyoto_object*) (*GetSmokeObject)(obj);
+ smokeqyoto_object *p = (smokeqyoto_object*) (*GetSmokeObject)(point);
+ QModelIndex result = ((QAbstractItemView*) o->ptr)->indexAt(*((QPoint*) p->ptr));
+ (*FreeGCHandle)(obj);
+ (*FreeGCHandle)(point);
+ smokeqyoto_object *ret = alloc_smokeqyoto_object(true, o->smoke, o->smoke->idClass("QModelIndex"), &result);
+ return ret;
+}
+
+void
+QAbstractItemViewScrollTo(void* obj, void* index, int hint)
+{
+ smokeqyoto_object *o = (smokeqyoto_object*) (*GetSmokeObject)(obj);
+ smokeqyoto_object *i = (smokeqyoto_object*) (*GetSmokeObject)(index);
+ ((QAbstractItemView*) o->ptr)->scrollTo(*((QModelIndex*) i->ptr), (QAbstractItemView::ScrollHint) hint);
+ (*FreeGCHandle)(obj);
+ (*FreeGCHandle)(index);
+}
+
+void*
+QAbstractItemViewVisualRect(void* obj, void* index)
+{
+ smokeqyoto_object *o = (smokeqyoto_object*) (*GetSmokeObject)(obj);
+ smokeqyoto_object *i = (smokeqyoto_object*) (*GetSmokeObject)(index);
+ QRect result = ((QAbstractItemView*) o->ptr)->visualRect(*((QModelIndex*) i->ptr));
+ (*FreeGCHandle)(obj);
+ (*FreeGCHandle)(index);
+ smokeqyoto_object *ret = alloc_smokeqyoto_object(true, o->smoke, o->smoke->idClass("QRect"), &result);
+ return ret;
+}
+
+void*
+QAbstractTextDocumentLayoutBlockBoundingRect(void* obj, void* block)
+{
+ smokeqyoto_object *o = (smokeqyoto_object*) (*GetSmokeObject)(obj);
+ smokeqyoto_object *b = (smokeqyoto_object*) (*GetSmokeObject)(block);
+ QRectF result = ((QAbstractTextDocumentLayout*) o->ptr)->blockBoundingRect(*((QTextBlock*) b->ptr));
+ (*FreeGCHandle)(obj);
+ (*FreeGCHandle)(block);
+ smokeqyoto_object *ret = alloc_smokeqyoto_object(true, o->smoke, o->smoke->idClass("QRectF"), &result);
+ return ret;
+}
+
+void*
+QAbstractTextDocumentLayoutDocumentSize(void* obj)
+{
+ smokeqyoto_object *o = (smokeqyoto_object*) (*GetSmokeObject)(obj);
+ QSizeF result = ((QAbstractTextDocumentLayout*) o->ptr)->documentSize();
+ (*FreeGCHandle)(obj);
+ smokeqyoto_object *ret = alloc_smokeqyoto_object(true, o->smoke, o->smoke->idClass("QSizeF"), &result);
+ return ret;
+}
+
+void*
+QAbstractTextDocumentLayoutFrameBoundingRect(void* obj, void* frame)
+{
+ smokeqyoto_object *o = (smokeqyoto_object*) (*GetSmokeObject)(obj);
+ smokeqyoto_object *f = (smokeqyoto_object*) (*GetSmokeObject)(frame);
+ QRectF result = ((QAbstractTextDocumentLayout*) o->ptr)->frameBoundingRect((QTextFrame*) f->ptr);
+ (*FreeGCHandle)(obj);
+ (*FreeGCHandle)(frame);
+ smokeqyoto_object *ret = alloc_smokeqyoto_object(true, o->smoke, o->smoke->idClass("QRectF"), &result);
+ return ret;
+}
+
+int
+QAbstractTextDocumentLayoutHitTest(void* obj, void* point, int accuracy)
+{
+ smokeqyoto_object *o = (smokeqyoto_object*) (*GetSmokeObject)(obj);
+ smokeqyoto_object *p = (smokeqyoto_object*) (*GetSmokeObject)(point);
+ int result = ((QAbstractTextDocumentLayout*) o->ptr)->hitTest(*((QPointF*) p->ptr), (Qt::HitTestAccuracy) accuracy);
+ (*FreeGCHandle)(obj);
+ (*FreeGCHandle)(point);
+ return result;
+}
+
+int
+QAbstractTextDocumentLayoutPageCount(void* obj)
+{
+ smokeqyoto_object *o = (smokeqyoto_object*) (*GetSmokeObject)(obj);
+ int result = ((QAbstractTextDocumentLayout*) o->ptr)->pageCount();
+ (*FreeGCHandle)(obj);
+ return result;
+}
+
bool QyotoRegisterResourceData(int flag, const unsigned char * s, const unsigned char *n, const unsigned char *d)
{
qRegisterResourceData(flag, s, n, d);
More information about the Kde-bindings
mailing list