From a7a6b1c9f8f718b3082e6cc373459a1eba508848 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 17 Jul 2010 17:43:01 +0200 Subject: Preparation for new move to burn implementation Show size of selected items in status bar when files are selected in the FileView. Also show series name of current selected file in the general status bar. --- shemov.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'shemov.cpp') diff --git a/shemov.cpp b/shemov.cpp index 4313d53..e662bdd 100644 --- a/shemov.cpp +++ b/shemov.cpp @@ -48,6 +48,7 @@ #include "smmodelsingleton.h" #include "seriestreewidget.h" #include "newmoviewizard.h" +#include "filestreewidget.h" SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, flags), mOpenWithGroupFS(0), mOpenWithGroupAV(0) { qApp->setWindowIcon(QIcon(":/shemov.png")); @@ -80,6 +81,8 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla connect(mAVWidget, SIGNAL(windowTitle(const QString &)), this, SLOT(newWindowTitle(const QString &))); mATree = new ArchiveTreeView; mTab->addTab(mATree, "Tree"); + connect(mATree->filesWidget(), SIGNAL(statusMessage(QString)), this, SLOT(statusbarMessage(QString))); + connect(mATree->filesWidget(), SIGNAL(sizeChanged(qint64)), this, SLOT(setSize(qint64))); mAEdit = new ArchiveEditDialog(this); mFSWidget->setArchiveDialog(mAEdit); @@ -253,6 +256,17 @@ void SheMov::newMovieWizard(){ wiz.exec(); } +void SheMov::setSize(qint64 size){ + QLocale l; + QString val; + if(size < Q_INT64_C(4707319808)){ + val = QString("%1").arg(l.toString(size)); + }else{ + val = QString("%1").arg(l.toString(size)); + } + mSelectedSize->setText(val); +} + void SheMov::createStatusbar(){ QLabel *selSizeL = new QLabel(tr("Sel. Size")); mSelectedSize = new QLabel(tr("nothing selected yet")); -- cgit v1.2.3-70-g09d2