diff options
Diffstat (limited to 'shemov.cpp')
-rw-r--r-- | shemov.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -127,6 +127,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla splash.showMessage(tr("Finishing..."), Qt::AlignHCenter, Qt::yellow); qApp->processEvents(); connect(mFSWidget->fileView(), SIGNAL(selectedSize(qint64)), this, SLOT(setSize(qint64))); + connect(mFSWidget->fileView(), SIGNAL(selectedDuration(QVariant)), this, SLOT(setDuration(QVariant))); connect(mFSWidget->fileView(), SIGNAL(numSelected(int)), this, SLOT(updateSelectedCount(int))); connect(mFSWidget, SIGNAL(windowTitle(QString)), this, SLOT(setWindowTitle(QString))); connect(mFSWidget->fileView(), SIGNAL(statusbarMessage(const QString &)), this, SLOT(statusbarMessage(const QString &))); @@ -202,14 +203,16 @@ void SheMov::tabChanged(int newTab){ mPVSelectAllA->disconnect(); mPVShowNPDialogA->setEnabled(newTab == 0); mPVAddToNPA->setEnabled(newTab == 0); + statusbarMessage(QString()); switch(newTab){ case 0: connect(mPVSelectAllA, SIGNAL(triggered()), mFSWidget, SLOT(selectAllPV())); + setDuration(mFSWidget->fileView()->duration()); break; case 2: connect(mPVSelectAllA, SIGNAL(triggered()), mPicWidget->picView(), SLOT(setPVAll())); - break; default: + setDuration(QVariant()); ;; } } @@ -327,6 +330,11 @@ void SheMov::setSize(qint64 size){ mSelectedSize->setText(val); } +void SheMov::setDuration(const QVariant dur){ + Helper::Duration d = dur.value<Helper::Duration>(); + mSelectedDuration->setText(d.toString()); +} + QAction *SheMov::createSeparator(){ QAction *tmp = new QAction(this); tmp->setSeparator(true); @@ -349,6 +357,11 @@ QSignalMapper *SheMov::createHeaderMapper(SmTreeModel *model, QActionGroup *grou } void SheMov::createStatusbar(){ + QLabel *selDurL = new QLabel(tr("Duration")); + mSelectedDuration = new QLabel("00:00:00"); + mSelectedDuration->setFrameStyle(QFrame::Panel | QFrame::Sunken); + statusBar()->addPermanentWidget(selDurL); + statusBar()->addPermanentWidget(mSelectedDuration); QLabel *selSizeL = new QLabel(tr("Sel. Size")); mSelectedSize = new QLabel(tr("nothing selected yet")); mSelectedSize->setFrameStyle(QFrame::Panel | QFrame::Sunken); |