summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-07-24 14:14:18 +0200
committerArno <am@disconnect.de>2010-07-24 14:14:18 +0200
commite0e15dd1e2da1c2ce77e7629d5023b1d02bb237e (patch)
treee62e7396026198bcd441fe08a6b527bed6883ccf /shemov.cpp
parentd617e0679b42680d5068513a951b6f6db10b0565 (diff)
downloadSheMov-e0e15dd1e2da1c2ce77e7629d5023b1d02bb237e.tar.gz
SheMov-e0e15dd1e2da1c2ce77e7629d5023b1d02bb237e.tar.bz2
SheMov-e0e15dd1e2da1c2ce77e7629d5023b1d02bb237e.zip
Set window title in ArchiveTreeView
Construct a window title in ArchiveTreeView and show it when Tab is activated or file mode is changed. Also deleted the unneded slot newWindowTitle in SheMov: setWindowTitle is a slot by itself.
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/shemov.cpp b/shemov.cpp
index 6778f0d..5cda0c1 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -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());
}