summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-06-18 15:52:01 +0200
committerArno <am@disconnect.de>2010-06-18 15:52:01 +0200
commitb153f90a4c7f76a5ce5f4985bdbd687ba1602fdb (patch)
tree7e2bfc14e62e24b56a77b3afd2e40003956fb49d /shemov.cpp
parenta8bd9a2310bd630dd4e72fe0ff54a8be17e80064 (diff)
downloadSheMov-b153f90a4c7f76a5ce5f4985bdbd687ba1602fdb.tar.gz
SheMov-b153f90a4c7f76a5ce5f4985bdbd687ba1602fdb.tar.bz2
SheMov-b153f90a4c7f76a5ce5f4985bdbd687ba1602fdb.zip
Created frontend for SeriesTreeModel::deleteFromSeries
Implemented frontend for SeriesTreeModel::deleteFromSeries. I hope QPersistentModelIndexes work as advertised. From the qt-sources it seems that a QPersistentModelIndex is automatically updated by QAbstractItemModel when calling begin(Remove|Insert)Rows. Testing worked out fine. While at it I found a bug in SmTreeModel. removeRows has to be called with (i - 1) instead of (i) to remove the correct nodes.
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/shemov.cpp b/shemov.cpp
index d735ba3..8e5c54c 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -357,11 +357,12 @@ void SheMov::createActions(){
connect(mStatisticsA, SIGNAL(triggered()), this, SLOT(showStatistics()));
//Tree context menu
- mNewSeriesA = new QAction(tr("New series"), this);
+ mNewSeriesA = new QAction(tr("New series..."), this);
mATree->seriesWidget()->seriesTree()->addAction(mNewSeriesA);
connect(mNewSeriesA, SIGNAL(triggered()), mATree->seriesWidget(), SLOT(newSeries()));
- mDeleteFromSeriesA = new QAction(tr("Delete entry..."), this);
+ mDeleteFromSeriesA = new QAction(tr("Delete entries..."), this);
mATree->seriesWidget()->seriesTree()->addAction(mDeleteFromSeriesA);
+ connect(mDeleteFromSeriesA, SIGNAL(triggered()), mATree->seriesWidget(), SLOT(deleteFromSeries()));
// misc