[Kde-bindings] KDE/kdebindings/qtruby
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Wed Apr 5 19:39:44 UTC 2006
SVN commit 526861 by rdale:
* Added the itemviews/puzzle example
* Added a QModelIndexList marshaller
* Added inspect and pretty_print methods for Qt::ModelIndex
CCMAIL: kde-bindings at kde.org
M +6 -0 ChangeLog
A rubylib/examples/itemviews/puzzle (directory)
AM rubylib/examples/itemviews/puzzle/example.jpg
A rubylib/examples/itemviews/puzzle/main.rb
A rubylib/examples/itemviews/puzzle/mainwindow.rb
A rubylib/examples/itemviews/puzzle/piecesmodel.rb
A rubylib/examples/itemviews/puzzle/puzzlewidget.rb
M +36 -32 rubylib/qtruby/handlers.cpp
M +12 -0 rubylib/qtruby/lib/Qt/qtruby.rb
--- trunk/KDE/kdebindings/qtruby/ChangeLog #526860:526861
@@ -1,5 +1,11 @@
2006-04-05 Richard Dale <rdale at foton.es>
+
+ * Added the itemviews/puzzle example
+ * Added a QModelIndexList marshaller
+ * Added inspect and pretty_print methods for Qt::ModelIndex
+2006-04-05 Richard Dale <rdale at foton.es>
+
* Added the itemviews/sortingmodel example
2006-04-05 Richard Dale <rdale at foton.es>
** trunk/KDE/kdebindings/qtruby/rubylib/examples/itemviews/puzzle/example.jpg #property svn:mime-type
+ application/octet-stream
--- trunk/KDE/kdebindings/qtruby/rubylib/qtruby/handlers.cpp #526860:526861
@@ -7,38 +7,38 @@
* *
***************************************************************************/
-#include <qstring.h>
-#include <qregexp.h>
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qpalette.h>
-#include <qlistwidget.h>
-#include <qtablewidget.h>
-#include <qtoolbar.h>
-#include <qdockwidget.h>
-#include <qurlinfo.h>
-#include <qlayout.h>
-#include <qmetaobject.h>
-#include <qlinkedlist.h>
-#include <qobject.h>
-#include <qtextcodec.h>
-#include <qhostaddress.h>
-#include <qpair.h>
-#include <qevent.h>
-#include <qpixmap.h>
-#include <qaction.h>
-#include <qtreewidget.h>
-#include <qtextobject.h>
-#include <qtextlayout.h>
-#include <qabstractbutton.h>
-#include <qlistwidget.h>
-#include <qtablewidget.h>
-#include <qpolygon.h>
-#include <qurl.h>
-#include <qdir.h>
-#include <qobject.h>
-#include <qwidget.h>
-#include <qtabbar.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qregexp.h>
+#include <QtGui/qapplication.h>
+#include <QtGui/qpainter.h>
+#include <QtGui/qpalette.h>
+#include <QtGui/qlistwidget.h>
+#include <QtGui/qtablewidget.h>
+#include <QtGui/qtoolbar.h>
+#include <QtGui/qdockwidget.h>
+#include <QtNetwork/qurlinfo.h>
+#include <QtGui/qlayout.h>
+#include <QtCore/qmetaobject.h>
+#include <QtCore/qlinkedlist.h>
+#include <QtCore/qobject.h>
+#include <QtCore/qtextcodec.h>
+#include <QtNetwork/qhostaddress.h>
+#include <QtCore/qpair.h>
+#include <QtGui/qevent.h>
+#include <QtGui/qpixmap.h>
+#include <QtGui/qaction.h>
+#include <QtGui/qtreewidget.h>
+#include <QtGui/qtextobject.h>
+#include <QtGui/qtextlayout.h>
+#include <QtGui/qabstractbutton.h>
+#include <QtGui/qlistwidget.h>
+#include <QtGui/qtablewidget.h>
+#include <QtGui/qpolygon.h>
+#include <QtCore/qurl.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qobject.h>
+#include <QtGui/qwidget.h>
+#include <QtGui/qtabbar.h>
#include "smoke.h"
@@ -1627,6 +1627,7 @@
DEF_VALUELIST_MARSHALLER( QTextLayoutFormatRangeList, QList<QTextLayout::FormatRange>, QTextLayout::FormatRange)
DEF_VALUELIST_MARSHALLER( QVariantList, QList<QVariant>, QVariant )
DEF_VALUELIST_MARSHALLER( QPixmapList, QList<QPixmap>, QPixmap )
+DEF_VALUELIST_MARSHALLER( QModelIndexList, QList<QModelIndex>, QModelIndex )
DEF_VALUELIST_MARSHALLER( QHostAddressList, QList<QHostAddress>, QHostAddress )
DEF_VALUELIST_MARSHALLER( QPolygonFList, QList<QPolygonF>, QPolygonF )
DEF_VALUELIST_MARSHALLER( QImageTextKeyLangList, QLinkedList<QImageTextKeyLang>, QImageTextKeyLang )
@@ -1697,6 +1698,9 @@
{ "QList<QVariant>", marshall_QVariantList },
{ "QList<QVariant>&", marshall_QVariantList },
{ "QList<QPixmap>", marshall_QPixmapList },
+ { "QList<QModelIndex>", marshall_QModelIndexList },
+ { "QList<QModelIndex>&", marshall_QModelIndexList },
+ { "QModelIndexList&", marshall_QModelIndexList },
{ "QValueList<QImageTextKeyLang>", marshall_QImageTextKeyLangList },
{ "QList<QUrl>", marshall_QUrlList },
{ "QList<QUrl>&", marshall_QUrlList },
--- trunk/KDE/kdebindings/qtruby/rubylib/qtruby/lib/Qt/qtruby.rb #526860:526861
@@ -759,6 +759,18 @@
end
end
+ class ModelIndex < Qt::Base
+ def inspect
+ str = super
+ str.sub(/>$/, " valid?=%s, row=%s, column=%s>" % [valid?, row, column])
+ end
+
+ def pretty_print(pp)
+ str = to_s
+ pp.text str.sub(/>$/, "\n valid?=%s,\n row=%s,\n column=%s>" % [valid?, row, column])
+ end
+ end
+
class Rect < Qt::Base
def inspect
str = super
More information about the Kde-bindings
mailing list