diff options
Diffstat (limited to 'shemov.cpp')
-rw-r--r-- | shemov.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
@@ -102,6 +102,10 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla connect(mNewMovieWizard, SIGNAL(accepted()), c->archiveTreeModel(), SLOT(refresh())); mNewPicsDialog = new NewPicsDialog(this); + //experimental archive + connect(c, SIGNAL(sizeChanged(qint64)), this, SLOT(setSize(qint64))); + connect(c, SIGNAL(durationChanged(qint64,bool)), this, SLOT(setDuration(qint64,bool))); + QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(mTab); @@ -116,7 +120,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(selectedDuration(qint64,bool)), this, SLOT(setDuration(qint64,bool))); 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 &))); @@ -197,15 +201,19 @@ void SheMov::tabChanged(int newTab){ mPVShowNPDialogA->setEnabled(newTab == FileManager); mPVAddToNPA->setEnabled(newTab == FileManager); statusbarMessage(QString()); + ArchiveController *c = SmGlobals::instance()->archiveController(); switch(newTab){ case FileManager: connect(mPVSelectAllA, SIGNAL(triggered()), mFSWidget, SLOT(selectAllPV())); - setDuration(mFSWidget->fileView()->duration()); + mFSWidget->fileView()->selectedFilesChanged(); + break; + case Experimental: + c->fileSelectionChanged(QItemSelection(), QItemSelection()); break; case Pictures: connect(mPVSelectAllA, SIGNAL(triggered()), mPicWidget->picView(), SLOT(setPVAll())); default: - setDuration(QVariant()); + setDuration(0x0, false); ;; } } @@ -322,9 +330,13 @@ 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()); +void SheMov::setDuration(qint64 dur, bool maybeMore){ + Helper::Duration d(dur); + QString t = d.toString(); + if(maybeMore){ + t.append("+"); + } + mSelectedDuration->setText(t); } QAction *SheMov::createSeparator(){ |