diff options
Diffstat (limited to 'shemov.cpp')
-rw-r--r-- | shemov.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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)); + } } } |