1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Better window title

This commit is contained in:
Martin Tůma 2016-04-19 08:51:11 +02:00
parent 5feec6ac0c
commit 1b5bdc0f07
2 changed files with 13 additions and 0 deletions

View File

@ -547,6 +547,7 @@ bool GUI::openFile(const QString &fileName)
updateNavigationActions();
updateStatusBarInfo();
updateWindowTitle();
updateGraphTabs();
updateTrackView();
@ -718,6 +719,7 @@ void GUI::reloadFile()
}
updateStatusBarInfo();
updateWindowTitle();
updateGraphTabs();
updateTrackView();
if (_files.isEmpty())
@ -748,6 +750,7 @@ void GUI::closeAll()
_fileActionGroup->setEnabled(false);
updateStatusBarInfo();
updateWindowTitle();
updateGraphTabs();
updateTrackView();
}
@ -853,6 +856,15 @@ void GUI::updateStatusBarInfo()
_timeLabel->setText(timeSpan(_time));
}
void GUI::updateWindowTitle()
{
if (_files.count() == 1)
setWindowTitle(QFileInfo(_files.at(0)).fileName()
+ QString(" - " APP_NAME));
else
setWindowTitle(APP_NAME);
}
void GUI::mapChanged(int index)
{
_currentMap = _maps.at(index);

View File

@ -83,6 +83,7 @@ private:
bool loadFile(const QString &fileName);
void saveFile(const QString &fileName);
void updateStatusBarInfo();
void updateWindowTitle();
void updateNavigationActions();
void updateGraphTabs();
void updateTrackView();