[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bindings
Subject: [Kde-bindings] playground/bindings/kimono
From: Richard Dale <Richard_Dale () tipitina ! demon ! co ! uk>
Date: 2007-03-07 10:27:43
Message-ID: 1173263263.018150.32354.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 640199 by rdale:
* Made the simpletreemodel example use the csrcc resource compiler
CCMAIL: kde-bindings@kde.org
M +4 -0 ChangeLog
M +5 -5 examples/itemviews/simpletreemodel/main.cs
M +2 -6 examples/itemviews/simpletreemodel/treeitem.cs
M +2 -2 examples/itemviews/simpletreemodel/treemodel.cs
--- trunk/playground/bindings/kimono/ChangeLog #640198:640199
@@ -1,3 +1,7 @@
+2007-03-07 Richard Dale <rdale@foton.es>
+
+ * Made the simpletreemodel example use the csrcc resource compiler
+
2007-03-06 Richard Dale <rdale@foton.es>
* A GCHandle was being used to hold the 'internalPointer' value in a
--- trunk/playground/bindings/kimono/examples/itemviews/simpletreemodel/main.cs #640198:640199
@@ -2,15 +2,15 @@
using System.IO;
using Qyoto;
-class MainClass {
+class MainClass : Qt {
public static int Main(string[] args) {
-// Q_INIT_RESOURCE("simpletreemodel");
+ Q_INIT_RESOURCE("simpletreemodel");
new QApplication(args);
- StreamReader file = new StreamReader("default.txt");
-// Debug.SetDebug(QtDebugChannel.QTDB_TRANSPARENT_PROXY | QtDebugChannel.QTDB_VIRTUAL);
- TreeModel model = new TreeModel(file.ReadToEnd());
+ QFile file = new QFile(":/default.txt");
+ file.Open((int) QIODevice.OpenModeFlag.ReadOnly);
+ TreeModel model = new TreeModel(new QTextStream(file.ReadAll()).ReadAll());
file.Close();
QTreeView view = new QTreeView();
--- trunk/playground/bindings/kimono/examples/itemviews/simpletreemodel/treeitem.cs #640198:640199
@@ -24,15 +24,11 @@
}
public int ChildCount() {
-// if (childItems != null)
- return childItems.Count;
-// return 0;
+ return childItems.Count;
}
public int ColumnCount() {
-// if (itemData != null)
- return itemData.Count;
-// return 0;
+ return itemData.Count;
}
public QVariant Data(int column) {
--- trunk/playground/bindings/kimono/examples/itemviews/simpletreemodel/treemodel.cs #640198:640199
@@ -84,11 +84,11 @@
else
return new QModelIndex();
}
-
+
public override QModelIndex Index(int row, int column) {
return Index(row, column, new QModelIndex());
}
-
+
public override QModelIndex Parent(QModelIndex index) {
if (!index.IsValid())
return new QModelIndex();
_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic