summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/shemov.cpp b/shemov.cpp
index 8b3e82b..03b9271 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -58,6 +58,8 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
connect(mATree->filesWidget(), SIGNAL(statusMessage(QString)), this, SLOT(statusbarMessage(QString)));
connect(mATree->filesWidget(), SIGNAL(sizeChanged(qint64)), this, SLOT(setSize(qint64)));
connect(mATree, SIGNAL(needWindowTitleChange(QString)), this, SLOT(setWindowTitle(QString)));
+ connect(mATree->filesWidget()->filesTree()->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), this, SLOT(updateSelectionCount(const QItemSelection &, const QItemSelection &)));
+ connect(mATree->seriesWidget()->seriesTree()->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(updateSelectionCount(QItemSelection,QItemSelection)));
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(mTab);
@@ -113,6 +115,10 @@ void SheMov::updateSelectionCount(const QItemSelection & /* sel */, const QItemS
mSelectedSize->setText(QString(tr("<span style=\"color:#000000\">%1</span>")).arg(l.toString((selSize))));
break;
}
+ case 1: {
+ int selCount = mATree->filesWidget()->filesTree()->selectionModel()->selectedRows().count();
+ mSelectedItems->setText(QString::number(selCount));
+ }
}
}