6#include <QStringBuilder>
8#include "ui_dbaircraftcategorycomponent.h"
14using namespace swift::misc::network;
15using namespace swift::misc::aviation;
27 ui->tvp_AircraftCategoryView->allowDragDrop(
true,
false);
32 &CDbAircraftCategoryComponent::onReload);
38 sGui->getWebDataServices()->getAircraftCategoriesCount());
43 void CDbAircraftCategoryComponent::onCategoryRead(CEntityFlags::Entity entity,
CEntityFlags::ReadState readState,
46 using namespace std::chrono_literals;
48 if (!sGui || sGui->isShuttingDown() || !sGui->getWebDataServices())
61 ui->tvp_AircraftCategoryView->updateContainerMaybeAsync(categories);
62 ui->tvp_AircraftCategoryTree->updateContainer(categories);
72 void CDbAircraftCategoryComponent::onEntityDownloadProgress(CEntityFlags::Entity entity,
int logId,
int progress,
73 qint64 current, qint64 max,
const QUrl &url)
75 using namespace std::chrono_literals;
85 void CDbAircraftCategoryComponent::onReload()
bool isShuttingDown() const
Is application shutting down?
CWebDataServices * getWebDataServices() const
Get the web data services.
void entityDownloadProgress(swift::misc::network::CEntityFlags::Entity entity, int logId, int progress, qint64 current, qint64 max, const QUrl &url)
Download progress for an entity.
swift::misc::network::CEntityFlags::Entity triggerLoadingDirectlyFromDb(swift::misc::network::CEntityFlags::Entity whatToRead, const QDateTime &newerThan=QDateTime())
Trigger reload from DB, loads the DB data and bypasses the caches checks and info objects.
void dataRead(swift::misc::network::CEntityFlags::Entity entity, swift::misc::network::CEntityFlags::ReadState state, int number, const QUrl &url)
Combined read signal.
void setViewWithIndicator(swift::gui::views::CViewBaseNonTemplate *viewWithIndicator)
Set the corresponding view.
bool showOverlayHTMLMessage(const QString &htmlMessage, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
void showDownloadProgress(int progress, qint64 current, qint64 max, const QUrl &url, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
COverlayMessagesFrame(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Constructor.
~CDbAircraftCategoryComponent()
Destructor.
CDbAircraftCategoryComponent(QWidget *parent=nullptr)
Constructor.
void requestNewBackendData()
Load data from backend (where it makes sense).
@ MenuCopy
copy (for copy/paste)
Value object encapsulating a list of ICAO codes.
static bool isFinishedReadState(ReadState state)
Any finished state.
@ AircraftCategoryEntity
aircraft category entities
ReadState
State of operation.
@ ReadFinished
reading done
static const QString & stateToString(ReadState flag)
Convert to string.
static QString entitiesToString(CEntityFlags::Entity entities, const QString &separator=", ")
Entities to string list.
SWIFT_GUI_EXPORT swift::gui::CGuiApplication * sGui
Single instance of GUI application object.
Backend services of the swift project, like dealing with the network or the simulators.
High level reusable GUI components.
Views, mainly QTableView.
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const