diff options
Diffstat (limited to 'shemov.cpp')
-rw-r--r-- | shemov.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -71,6 +71,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla mTab->addTab(mATree, "Tree"); connect(mATree->filesWidget(), SIGNAL(statusMessage(QString)), this, SLOT(statusbarMessage(QString))); connect(mATree->filesWidget(), SIGNAL(sizeChanged(qint64)), this, SLOT(setSize(qint64))); + connect(mATree, SIGNAL(needWindowTitleChange(QString)), this, SLOT(setWindowTitle(QString))); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(mTab); @@ -81,7 +82,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla setFsFree(); connect(mFSWidget->fileView()->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), this, SLOT(updateSelectionCount(const QItemSelection &, const QItemSelection &))); - connect(mFSWidget, SIGNAL(windowTitle(const QString &)), this, SLOT(newWindowTitle(const QString &))); + connect(mFSWidget, SIGNAL(windowTitle(QString)), this, SLOT(setWindowTitle(QString))); connect(mFSWidget->fileView(), SIGNAL(statusbarMessage(const QString &)), this, SLOT(statusbarMessage(const QString &))); connect(mFSWidget, SIGNAL(statusbarMessage(const QString &)), this, SLOT(statusbarMessage(const QString &))); connect(mFSWidget, SIGNAL(newTemplate(const QString &)), this, SLOT(setTemplate(const QString &))); @@ -129,10 +130,6 @@ void SheMov::updateSelectionCount(const QItemSelection & /* sel */, const QItemS } } -void SheMov::newWindowTitle(const QString &title){ - setWindowTitle(title); -} - void SheMov::statusbarMessage(const QString &message){ statusBar()->showMessage(message); } @@ -153,6 +150,9 @@ void SheMov::tabChanged(int newTab){ if(newTab == 0){ setWindowTitle(mFSWidget->windowTitle()); } + if(newTab == 1){ + setWindowTitle(mATree->windowTitle()); + } updateSelectionCount(QItemSelection(), QItemSelection()); } |