mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
some style changes in same step
This commit is contained in:
@@ -7,17 +7,17 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "ui_dbaircrafticaoselectorcomponent.h"
|
||||
#include "blackcore/application.h"
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "blackgui/components/dbaircrafticaoselectorcomponent.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/uppercasevalidator.h"
|
||||
#include "blackmisc/aviation/aircrafticaocodelist.h"
|
||||
#include "blackmisc/db/datastoreutility.h"
|
||||
#include "blackmisc/compare.h"
|
||||
#include "blackmisc/datastoreutility.h"
|
||||
#include "blackmisc/stringutils.h"
|
||||
#include "blackmisc/variant.h"
|
||||
#include "ui_dbaircrafticaoselectorcomponent.h"
|
||||
|
||||
#include <QCompleter>
|
||||
#include <QDragEnterEvent>
|
||||
|
||||
@@ -60,6 +60,5 @@ namespace BlackGui
|
||||
if (!sGui) { return; }
|
||||
sGui->getWebDataServices()->triggerRead(CEntityFlags::AirlineIcaoEntity, QDateTime());
|
||||
}
|
||||
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -56,6 +56,6 @@ namespace BlackGui
|
||||
private:
|
||||
QScopedPointer<Ui::CDbAirlineIcaoComponent> ui;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
#endif // guard
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "blackgui/components/dbairlineicaoselectorbase.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "blackmisc/aviation/airlineicaocodelist.h"
|
||||
#include "blackmisc/db/datastoreutility.h"
|
||||
#include "blackmisc/compare.h"
|
||||
#include "blackmisc/datastoreutility.h"
|
||||
#include "blackmisc/variant.h"
|
||||
|
||||
#include <QCompleter>
|
||||
@@ -42,7 +42,17 @@ namespace BlackGui
|
||||
this->setAcceptedMetaTypeIds({qMetaTypeId<CAirlineIcaoCode>(), qMetaTypeId<CAirlineIcaoCodeList>()});
|
||||
|
||||
connect(sGui->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbAirlineIcaoSelectorBase::ps_codesRead);
|
||||
this->ps_codesRead(CEntityFlags::AirlineIcaoEntity, CEntityFlags::ReadFinished, sGui->getWebDataServices()->getAirlineIcaoCodesCount());
|
||||
|
||||
// when we already have data, init completers. This can not be done directly in the
|
||||
// constructor due to virtual functions
|
||||
const int c = sGui->getWebDataServices()->getAirlineIcaoCodesCount();
|
||||
if (c > 0)
|
||||
{
|
||||
QTimer::singleShot(500, [this, c]()
|
||||
{
|
||||
this->ps_codesRead(CEntityFlags::AirlineIcaoEntity, CEntityFlags::ReadFinished, c);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
CDbAirlineIcaoSelectorBase::~CDbAirlineIcaoSelectorBase()
|
||||
@@ -135,6 +145,5 @@ namespace BlackGui
|
||||
if (dbKey < 0) { return; }
|
||||
this->setAirlineIcao(dbKey);
|
||||
}
|
||||
|
||||
}// class
|
||||
} // ns
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "ui_dbairlineicaoselectorcomponent.h"
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "blackgui/components/dbairlineicaoselectorcomponent.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/uppercasevalidator.h"
|
||||
#include "blackmisc/db/datastoreutility.h"
|
||||
#include "blackmisc/aviation/airlineicaocodelist.h"
|
||||
#include "blackmisc/datastoreutility.h"
|
||||
#include "blackmisc/stringutils.h"
|
||||
#include "ui_dbairlineicaoselectorcomponent.h"
|
||||
|
||||
#include <QCompleter>
|
||||
#include <QLabel>
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "ui_dbairlinenameselectorcomponent.h"
|
||||
#include "blackgui/components/dbairlinenameselectorcomponent.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "blackmisc/aviation/airlineicaocodelist.h"
|
||||
#include "blackmisc/datastoreutility.h"
|
||||
#include "ui_dbairlinenameselectorcomponent.h"
|
||||
#include "blackmisc/db/datastoreutility.h"
|
||||
|
||||
#include <QCompleter>
|
||||
#include <QLineEdit>
|
||||
|
||||
@@ -260,7 +260,7 @@ namespace BlackGui
|
||||
this->m_state = Completed;
|
||||
}
|
||||
|
||||
bool CDbAutoStashingComponent::tryToStashModel(Simulation::CAircraftModel &model)
|
||||
bool CDbAutoStashingComponent::tryToStashModel(CAircraftModel &model)
|
||||
{
|
||||
bool stashed = false;
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <QtGlobal>
|
||||
|
||||
using namespace BlackCore;
|
||||
using namespace BlackCore::Db;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Network;
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
#ifndef BLACKGUI_COMPONENTS_DBLOGINCOMPONENT_H
|
||||
#define BLACKGUI_COMPONENTS_DBLOGINCOMPONENT_H
|
||||
|
||||
#include "blackcore/databaseauthentication.h"
|
||||
#include "blackcore/db/databaseauthentication.h"
|
||||
#include "blackcore/data/globalsetup.h"
|
||||
#include "blackgui/blackguiexport.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
|
||||
@@ -20,8 +21,6 @@
|
||||
#include <QObject>
|
||||
#include <QScopedPointer>
|
||||
|
||||
class QWidget;
|
||||
|
||||
namespace BlackMisc { namespace Network { class CAuthenticatedUser; } }
|
||||
namespace Ui { class CDbLoginComponent; }
|
||||
|
||||
@@ -45,7 +44,7 @@ namespace BlackGui
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CDbLoginComponent> ui;
|
||||
BlackCore::CDatabaseAuthenticationService m_loginService {this}; //!< login service
|
||||
BlackCore::Db::CDatabaseAuthenticationService m_loginService {this}; //!< login service
|
||||
|
||||
//! Overlay messages
|
||||
void displayOverlayMessages(const BlackMisc::CStatusMessageList &msgs);
|
||||
@@ -62,7 +61,6 @@ namespace BlackGui
|
||||
|
||||
//! User authentication completed
|
||||
void ps_AuthenticationFinished(const BlackMisc::Network::CAuthenticatedUser &user, const BlackMisc::CStatusMessageList &status);
|
||||
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <QWidget>
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Simulation;
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
@@ -37,7 +38,7 @@ namespace BlackGui
|
||||
return (ui->editor_ModelMappingModify->getValues());
|
||||
}
|
||||
|
||||
void CDbModelMappingModifyComponent::setValue(const Simulation::CAircraftModel &model)
|
||||
void CDbModelMappingModifyComponent::setValue(const CAircraftModel &model)
|
||||
{
|
||||
this->ui->editor_ModelMappingModify->setValue(model);
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackcore/db/databasewriter.h"
|
||||
#include "blackcore/application.h"
|
||||
#include "blackcore/databasewriter.h"
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "blackgui/components/dbmappingcomponent.h"
|
||||
#include "blackgui/components/dbstashcomponent.h"
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <iterator>
|
||||
|
||||
using namespace BlackCore;
|
||||
using namespace BlackCore::Db;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Simulation;
|
||||
using namespace BlackMisc::Aviation;
|
||||
|
||||
Reference in New Issue
Block a user