From 93c3e2c912b548d7b81d06a988677ceedf54e83d Mon Sep 17 00:00:00 2001 From: Arno Date: Thu, 17 Jun 2010 20:39:30 +0200 Subject: Finished New series in SeriesTreeWidget Another not so atomic commit. Inserting a new serie by triggering the action in the context menu now works. While at it I revamped setData and put the if/elses into functions. Also fixed a bug in setData: Use TypeRole instead of the Fields enum. --- seriestreemodel.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'seriestreemodel.h') diff --git a/seriestreemodel.h b/seriestreemodel.h index 507761c..f2a6f9f 100644 --- a/seriestreemodel.h +++ b/seriestreemodel.h @@ -36,11 +36,15 @@ class SeriesTreeModel : public SmTreeModel { private: void populate(); + bool mergeSeries(const QModelIndex &from, const QModelIndex &to); + bool renameSeries(const QModelIndex &source, const QVariant &value); + bool setNewSeries(const QModelIndex &source, const QVariant &value); QSqlDatabase mDb; QSqlQuery *mSeriesPartsQuery; QSqlQuery *mUpdateSeriesIdQuery; QSqlQuery *mUpdateSeriesNameQuery; QSqlQuery *mDeleteSeriesQuery; + QSqlQuery *mSeriesInsertQuery; }; #endif // SERIESTREEMODEL_H -- cgit v1.2.3-70-g09d2