mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-27 21:24:47 +01:00
Better window title
This commit is contained in:
parent
5feec6ac0c
commit
1b5bdc0f07
12
src/gui.cpp
12
src/gui.cpp
@ -547,6 +547,7 @@ bool GUI::openFile(const QString &fileName)
|
|||||||
|
|
||||||
updateNavigationActions();
|
updateNavigationActions();
|
||||||
updateStatusBarInfo();
|
updateStatusBarInfo();
|
||||||
|
updateWindowTitle();
|
||||||
updateGraphTabs();
|
updateGraphTabs();
|
||||||
updateTrackView();
|
updateTrackView();
|
||||||
|
|
||||||
@ -718,6 +719,7 @@ void GUI::reloadFile()
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateStatusBarInfo();
|
updateStatusBarInfo();
|
||||||
|
updateWindowTitle();
|
||||||
updateGraphTabs();
|
updateGraphTabs();
|
||||||
updateTrackView();
|
updateTrackView();
|
||||||
if (_files.isEmpty())
|
if (_files.isEmpty())
|
||||||
@ -748,6 +750,7 @@ void GUI::closeAll()
|
|||||||
|
|
||||||
_fileActionGroup->setEnabled(false);
|
_fileActionGroup->setEnabled(false);
|
||||||
updateStatusBarInfo();
|
updateStatusBarInfo();
|
||||||
|
updateWindowTitle();
|
||||||
updateGraphTabs();
|
updateGraphTabs();
|
||||||
updateTrackView();
|
updateTrackView();
|
||||||
}
|
}
|
||||||
@ -853,6 +856,15 @@ void GUI::updateStatusBarInfo()
|
|||||||
_timeLabel->setText(timeSpan(_time));
|
_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)
|
void GUI::mapChanged(int index)
|
||||||
{
|
{
|
||||||
_currentMap = _maps.at(index);
|
_currentMap = _maps.at(index);
|
||||||
|
@ -83,6 +83,7 @@ private:
|
|||||||
bool loadFile(const QString &fileName);
|
bool loadFile(const QString &fileName);
|
||||||
void saveFile(const QString &fileName);
|
void saveFile(const QString &fileName);
|
||||||
void updateStatusBarInfo();
|
void updateStatusBarInfo();
|
||||||
|
void updateWindowTitle();
|
||||||
void updateNavigationActions();
|
void updateNavigationActions();
|
||||||
void updateGraphTabs();
|
void updateGraphTabs();
|
||||||
void updateTrackView();
|
void updateTrackView();
|
||||||
|
Loading…
Reference in New Issue
Block a user