From 8fba0fcb81e7b517804f34a5c8ad3741f92926da Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 27 Jul 2013 05:01:09 +0200 Subject: Fix window title Set the main window title according to selected tab. --- shemov.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'shemov.cpp') diff --git a/shemov.cpp b/shemov.cpp index 8865d0c..40ad231 100644 --- a/shemov.cpp +++ b/shemov.cpp @@ -105,6 +105,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla //experimental archive connect(c, SIGNAL(sizeChanged(qint64)), this, SLOT(setSize(qint64))); connect(c, SIGNAL(durationChanged(qint64,bool)), this, SLOT(setDuration(qint64,bool))); + connect(c->archiveTreeModel(), SIGNAL(windowTitle(QString)), this, SLOT(setWindowTitle(QString))); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(mTab); @@ -143,10 +144,10 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla splash.finish(this); mATree->readSettings(); mFSWidget->readSettings(); - readSettings(); mFSWidget->fileView()->setFocus(Qt::ActiveWindowFocusReason); mPicWidget->readSettings(); mArchive->readSettings(); + readSettings(); Helper::centerWidget(picViewer); } @@ -206,12 +207,15 @@ void SheMov::tabChanged(int newTab){ case FileManager: connect(mPVSelectAllA, SIGNAL(triggered()), mFSWidget, SLOT(selectAllPV())); mFSWidget->fileView()->selectedFilesChanged(); + mFSWidget->setWindowTitle(); break; case Experimental: c->fileSelectionChanged(QItemSelection(), QItemSelection()); + c->archiveTreeModel()->setWindowTitle(); break; case Pictures: connect(mPVSelectAllA, SIGNAL(triggered()), mPicWidget->picView(), SLOT(setPVAll())); + mPicWidget->constructWindowTitle(); default: setDuration(0x0, false); ;; -- cgit v1.2.3-70-g09d2