summaryrefslogtreecommitdiffstats
path: root/smtreeitem.h
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-06-16 22:45:24 +0200
committerArno <am@disconnect.de>2010-06-16 22:45:24 +0200
commitf5a7d411051d3112a90e26f1e382dc1e00fb9a00 (patch)
tree568cb272df4a645d5208a2177b2e09647b689be3 /smtreeitem.h
parentc7e25a4bb75417f1615b71940694f5f4479f9043 (diff)
downloadSheMov-f5a7d411051d3112a90e26f1e382dc1e00fb9a00.tar.gz
SheMov-f5a7d411051d3112a90e26f1e382dc1e00fb9a00.tar.bz2
SheMov-f5a7d411051d3112a90e26f1e382dc1e00fb9a00.zip
Treemodel Development
-Changed the database schema. Attached quality to files -Subclassed SmTreeModel for SeriesTreeModel -Made SmTreeModel virtual for that Well, it seems there is a serious problem with the database schema. Curiously everything inside the model works beside the db update. Seems I have it wrong with the fks :(
Diffstat (limited to 'smtreeitem.h')
-rw-r--r--smtreeitem.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/smtreeitem.h b/smtreeitem.h
index 807e3d7..402d73f 100644
--- a/smtreeitem.h
+++ b/smtreeitem.h
@@ -17,15 +17,17 @@ class SmTreeItem {
SmTreeItem(int rows, SmTreeItem *parent = 0);
~SmTreeItem();
void appendChild(SmTreeItem *child);
- SmTreeItem *child(int row);
+ SmTreeItem *child(int row) const;
int childCount() const;
int columnCount() const;
int row() const;
SmTreeItem *parent();
+ void setParent(SmTreeItem *parent);
QVariant data(int column) const;
void setData(int column, const QVariant &data);
bool insertChild(int where, SmTreeItem *child);
- bool removeChild(int where);
+ bool removeChild(int where, bool deleteChild = true);
+
private:
QList<SmTreeItem*> mChildren;