diff options
author | Arno <am@disconnect.de> | 2010-07-17 17:43:01 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-07-17 17:43:01 +0200 |
commit | a7a6b1c9f8f718b3082e6cc373459a1eba508848 (patch) | |
tree | 9b78f8735222d5386a8f88b06dd5b57ee510bb70 /shemov.cpp | |
parent | 7be84b2dfb0d300ba03801f43b49364a41ed02f8 (diff) | |
download | SheMov-a7a6b1c9f8f718b3082e6cc373459a1eba508848.tar.gz SheMov-a7a6b1c9f8f718b3082e6cc373459a1eba508848.tar.bz2 SheMov-a7a6b1c9f8f718b3082e6cc373459a1eba508848.zip |
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.
Diffstat (limited to 'shemov.cpp')
-rw-r--r-- | shemov.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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("<span style=\"color:#008000\">%1</span>").arg(l.toString(size)); + }else{ + val = QString("<span style=\"color:#ff0000\">%1</span>").arg(l.toString(size)); + } + mSelectedSize->setText(val); +} + void SheMov::createStatusbar(){ QLabel *selSizeL = new QLabel(tr("Sel. Size")); mSelectedSize = new QLabel(tr("nothing selected yet")); |