summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp14
1 files changed, 14 insertions, 0 deletions
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("<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"));