refs #377 usability improvements

* allow to toggle between single, multi and extended selection
* all DB data can be read by menu
* fixed load/save (test data) from disk
This commit is contained in:
Klaus Basan
2016-01-20 01:05:02 +01:00
parent ef259539c5
commit 551f3348f4
7 changed files with 85 additions and 24 deletions

View File

@@ -82,8 +82,14 @@ namespace BlackGui
bool CDataInfoAreaComponent::writeDbDataToResourceDir() const
{
bool s = hasProvider() &&
this->writeDbDataToDisk(CProject::getSwiftStaticDbFilesDir());
if (!this->hasProvider() || !this->canConnectSwiftDb())
{
CLogMessage(this).warning("No connection to DB yet, no new data loaded which can be written");
return false;
}
// write to disk
bool s = this->writeDbDataToDisk(CProject::getSwiftStaticDbFilesDir());
if (s)
{
CLogMessage(this).info("Written DB data");
@@ -103,7 +109,7 @@ namespace BlackGui
// info
if (s)
{
CLogMessage(this).info("Read DB data: %1") << CProject::getSwiftStaticDbFilesDir();
CLogMessage(this).info("Read DB data from directory: %1") << CProject::getSwiftStaticDbFilesDir();
this->ui->comp_DbAircraftIcao->showLoadIndicator();
this->ui->comp_DbAirlineIcao->showLoadIndicator();
this->ui->comp_DbCountries->showLoadIndicator();
@@ -155,6 +161,11 @@ namespace BlackGui
}
}
void CDataInfoAreaComponent::requestUpdateOfAllDbData()
{
this->triggerRead(CEntityFlags::AllDbEntities, QDateTime());
}
void CDataInfoAreaComponent::requestUpdatedData(CEntityFlags::Entity entity)
{
bool requested = false;