mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 11:05:44 +08:00
Ref T529, style
This commit is contained in:
committed by
Mat Sutcliffe
parent
f363d4f41b
commit
aa47d7bb03
@@ -171,7 +171,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
bool CColumns::isSortable(int column) const
|
bool CColumns::isSortable(int column) const
|
||||||
{
|
{
|
||||||
if (!isValidColumn(column)) return false;
|
if (!isValidColumn(column)) { return false; }
|
||||||
return m_columns.at(column).isSortable();
|
return m_columns.at(column).isSortable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,10 +18,7 @@
|
|||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
class QObject;
|
|
||||||
|
|
||||||
namespace BlackMisc { namespace Simulation { class CDistributor; } }
|
namespace BlackMisc { namespace Simulation { class CDistributor; } }
|
||||||
|
|
||||||
namespace BlackGui
|
namespace BlackGui
|
||||||
{
|
{
|
||||||
namespace Models
|
namespace Models
|
||||||
@@ -47,7 +44,7 @@ namespace BlackGui
|
|||||||
explicit CDistributorListModel(QObject *parent = nullptr);
|
explicit CDistributorListModel(QObject *parent = nullptr);
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
virtual ~CDistributorListModel() {}
|
virtual ~CDistributorListModel() override {}
|
||||||
|
|
||||||
//! Set mode
|
//! Set mode
|
||||||
void setDistributorMode(DistributorMode distributorMode);
|
void setDistributorMode(DistributorMode distributorMode);
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
const bool changedColumn = this->setSortColumnByPropertyIndex(propertyIndex);
|
const bool changedColumn = this->setSortColumnByPropertyIndex(propertyIndex);
|
||||||
const bool changedOrder = (m_sortOrder == order);
|
const bool changedOrder = (m_sortOrder == order);
|
||||||
m_sortOrder = order;
|
m_sortOrder = order;
|
||||||
return changedColumn || changedOrder;
|
return changedColumn || changedOrder;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,12 +12,10 @@
|
|||||||
#ifndef BLACKGUI_MODELS_STATUSMESSAGELISTMODEL_H
|
#ifndef BLACKGUI_MODELS_STATUSMESSAGELISTMODEL_H
|
||||||
#define BLACKGUI_MODELS_STATUSMESSAGELISTMODEL_H
|
#define BLACKGUI_MODELS_STATUSMESSAGELISTMODEL_H
|
||||||
|
|
||||||
#include "blackgui/blackguiexport.h"
|
|
||||||
#include "blackgui/models/listmodeltimestampobjects.h"
|
#include "blackgui/models/listmodeltimestampobjects.h"
|
||||||
|
#include "blackgui/blackguiexport.h"
|
||||||
#include "blackmisc/statusmessagelist.h"
|
#include "blackmisc/statusmessagelist.h"
|
||||||
|
|
||||||
class QObject;
|
|
||||||
|
|
||||||
namespace BlackGui
|
namespace BlackGui
|
||||||
{
|
{
|
||||||
namespace Models
|
namespace Models
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace BlackGui
|
|||||||
explicit CStatusMessageView(QWidget *parent = nullptr);
|
explicit CStatusMessageView(QWidget *parent = nullptr);
|
||||||
|
|
||||||
//! Set mode
|
//! Set mode
|
||||||
void setMode(BlackGui::Models::CStatusMessageListModel::Mode mode);
|
void setMode(Models::CStatusMessageListModel::Mode mode);
|
||||||
|
|
||||||
//! Add my own filter dialog
|
//! Add my own filter dialog
|
||||||
void addFilterDialog();
|
void addFilterDialog();
|
||||||
|
|||||||
@@ -538,7 +538,7 @@ namespace BlackGui
|
|||||||
bool m_acceptDoubleClickSelection = false; //!< double clicked
|
bool m_acceptDoubleClickSelection = false; //!< double clicked
|
||||||
bool m_displayAutomatically = true; //!< display directly when loaded
|
bool m_displayAutomatically = true; //!< display directly when loaded
|
||||||
bool m_enableDeleteSelectedRows = false; //!< selected rows can be deleted
|
bool m_enableDeleteSelectedRows = false; //!< selected rows can be deleted
|
||||||
bool m_dropIndicator = false; //!< draw indicator
|
bool m_dropIndicator = false; //!< drop indicator
|
||||||
bool m_forceColumnsToMaxSize = true; //!< force that columns are extended to full viewport width
|
bool m_forceColumnsToMaxSize = true; //!< force that columns are extended to full viewport width
|
||||||
bool m_allowCacheFileJson = true; //!< allow Cache format JSON to be loaded
|
bool m_allowCacheFileJson = true; //!< allow Cache format JSON to be loaded
|
||||||
QWidget *m_filterWidget = nullptr; //!< filter widget or dialog
|
QWidget *m_filterWidget = nullptr; //!< filter widget or dialog
|
||||||
@@ -548,7 +548,7 @@ namespace BlackGui
|
|||||||
CLoadIndicator *m_loadIndicator = nullptr; //!< load indicator if needed
|
CLoadIndicator *m_loadIndicator = nullptr; //!< load indicator if needed
|
||||||
Components::CTextEditDialog *m_textEditDialog = nullptr; //!< text edit dialog
|
Components::CTextEditDialog *m_textEditDialog = nullptr; //!< text edit dialog
|
||||||
QMap<MenuFlag, Menus::CMenuActions> m_menuFlagActions; //!< initialized actions for menu flag (enum)
|
QMap<MenuFlag, Menus::CMenuActions> m_menuFlagActions; //!< initialized actions for menu flag (enum)
|
||||||
QString m_saveFileName; //!< save file name (JSON)
|
QString m_saveFileName; //!< save file name (JSON)
|
||||||
BlackMisc::CDirectories::ColumnIndex m_dirSettingsIndex = BlackMisc::CDirectories::IndexDirLastViewJsonOrDefault; //!< allows to set more specialized directories //!< remember last JSON directory, having this member allows to have specific dir
|
BlackMisc::CDirectories::ColumnIndex m_dirSettingsIndex = BlackMisc::CDirectories::IndexDirLastViewJsonOrDefault; //!< allows to set more specialized directories //!< remember last JSON directory, having this member allows to have specific dir
|
||||||
BlackMisc::CSetting<BlackMisc::Settings::TDirectorySettings> m_dirSettings { this }; //!< directory for load/save
|
BlackMisc::CSetting<BlackMisc::Settings::TDirectorySettings> m_dirSettings { this }; //!< directory for load/save
|
||||||
BlackMisc::CSettingReadOnly<Settings::TGeneralGui> m_guiSettings { this, &CViewBaseNonTemplate::settingsChanged }; //!< general GUI settings
|
BlackMisc::CSettingReadOnly<Settings::TGeneralGui> m_guiSettings { this, &CViewBaseNonTemplate::settingsChanged }; //!< general GUI settings
|
||||||
|
|||||||
@@ -695,7 +695,7 @@ namespace BlackGui
|
|||||||
int CViewBaseNonTemplate::showLoadIndicator(int containerSizeDependent, int timeoutMs, bool processEvents)
|
int CViewBaseNonTemplate::showLoadIndicator(int containerSizeDependent, int timeoutMs, bool processEvents)
|
||||||
{
|
{
|
||||||
if (!m_enabledLoadIndicator) { return -1; }
|
if (!m_enabledLoadIndicator) { return -1; }
|
||||||
if (m_showingLoadIndicator) { return -1; }
|
if (m_showingLoadIndicator) { return -1; }
|
||||||
if (this->hasDockWidgetArea())
|
if (this->hasDockWidgetArea())
|
||||||
{
|
{
|
||||||
if (!this->isVisibleWidget()) { return -1; }
|
if (!this->isVisibleWidget()) { return -1; }
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace BlackMisc
|
|||||||
bool hasValidOrder() const;
|
bool hasValidOrder() const;
|
||||||
|
|
||||||
//! Can given index be handled
|
//! Can given index be handled
|
||||||
static bool canHandleIndex(const BlackMisc::CPropertyIndex &index);
|
static bool canHandleIndex(const CPropertyIndex &index);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
@@ -54,12 +54,12 @@ namespace BlackMisc
|
|||||||
IOrderable(int order);
|
IOrderable(int order);
|
||||||
|
|
||||||
//! \copydoc BlackMisc::Mixin::Index::propertyByIndex
|
//! \copydoc BlackMisc::Mixin::Index::propertyByIndex
|
||||||
CVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const;
|
CVariant propertyByIndex(const CPropertyIndex &index) const;
|
||||||
|
|
||||||
//! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex
|
//! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex
|
||||||
void setPropertyByIndex(const BlackMisc::CPropertyIndex &index, const CVariant &variant);
|
void setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant);
|
||||||
|
|
||||||
//! Compare for index
|
//! \copydoc BlackMisc::Mixin::Index::comparePropertyByIndex
|
||||||
int comparePropertyByIndex(const CPropertyIndex &index, const IOrderable &compareValue) const;
|
int comparePropertyByIndex(const CPropertyIndex &index, const IOrderable &compareValue) const;
|
||||||
|
|
||||||
int m_order = -1; //!< order number
|
int m_order = -1; //!< order number
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
#define BLACKMISC_ORDERABLELIST_H
|
#define BLACKMISC_ORDERABLELIST_H
|
||||||
|
|
||||||
#include "blackmisc/blackmiscexport.h"
|
#include "blackmisc/blackmiscexport.h"
|
||||||
|
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
|
||||||
namespace BlackMisc
|
namespace BlackMisc
|
||||||
|
|||||||
@@ -225,16 +225,16 @@ namespace BlackMisc
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
//! \copydoc IAircraftModelLoader::loadingFinished
|
//! \copydoc IAircraftModelLoader::loadingFinished
|
||||||
void loadingFinished(const BlackMisc::CStatusMessageList &status, const BlackMisc::Simulation::CSimulatorInfo &simulator, BlackMisc::Simulation::IAircraftModelLoader::LoadFinishedInfo info);
|
void loadingFinished(const BlackMisc::CStatusMessageList &status, const CSimulatorInfo &simulator, IAircraftModelLoader::LoadFinishedInfo info);
|
||||||
|
|
||||||
//! \copydoc IAircraftModelLoader::diskLoadingStarted
|
//! \copydoc IAircraftModelLoader::diskLoadingStarted
|
||||||
void diskLoadingStarted(const BlackMisc::Simulation::CSimulatorInfo &simulator, BlackMisc::Simulation::IAircraftModelLoader::LoadMode mode);
|
void diskLoadingStarted(const CSimulatorInfo &simulator, IAircraftModelLoader::LoadMode mode);
|
||||||
|
|
||||||
//! \copydoc IAircraftModelLoader::loadingProgress
|
//! \copydoc IAircraftModelLoader::loadingProgress
|
||||||
void loadingProgress(const BlackMisc::Simulation::CSimulatorInfo &simulator, const QString &message, int progressPercentage);
|
void loadingProgress(const CSimulatorInfo &simulator, const QString &message, int progressPercentage);
|
||||||
|
|
||||||
//! \copydoc IAircraftModelLoader::cacheChanged
|
//! \copydoc IAircraftModelLoader::cacheChanged
|
||||||
void cacheChanged(const BlackMisc::Simulation::CSimulatorInfo &simulator);
|
void cacheChanged(const CSimulatorInfo &simulator);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IAircraftModelLoader *m_loaderFsx = nullptr;
|
IAircraftModelLoader *m_loaderFsx = nullptr;
|
||||||
|
|||||||
@@ -12,12 +12,13 @@
|
|||||||
#ifndef BLACKMISC_STATUSMESSAGE_H
|
#ifndef BLACKMISC_STATUSMESSAGE_H
|
||||||
#define BLACKMISC_STATUSMESSAGE_H
|
#define BLACKMISC_STATUSMESSAGE_H
|
||||||
|
|
||||||
#include "blackmiscexport.h"
|
|
||||||
#include "icon.h"
|
|
||||||
#include "propertyindex.h"
|
|
||||||
#include "logcategorylist.h"
|
#include "logcategorylist.h"
|
||||||
#include "timestampbased.h"
|
#include "timestampbased.h"
|
||||||
|
#include "orderable.h"
|
||||||
|
#include "icon.h"
|
||||||
|
#include "propertyindex.h"
|
||||||
#include "typetraits.h"
|
#include "typetraits.h"
|
||||||
|
#include "blackmiscexport.h"
|
||||||
|
|
||||||
#include <QReadWriteLock>
|
#include <QReadWriteLock>
|
||||||
|
|
||||||
|
|||||||
@@ -12,14 +12,15 @@
|
|||||||
#ifndef BLACKMISC_STATUSMESSAGELIST_H
|
#ifndef BLACKMISC_STATUSMESSAGELIST_H
|
||||||
#define BLACKMISC_STATUSMESSAGELIST_H
|
#define BLACKMISC_STATUSMESSAGELIST_H
|
||||||
|
|
||||||
#include "blackmisc/blackmiscexport.h"
|
|
||||||
#include "blackmisc/collection.h"
|
|
||||||
#include "blackmisc/logcategory.h"
|
|
||||||
#include "blackmisc/logcategorylist.h"
|
|
||||||
#include "blackmisc/sequence.h"
|
|
||||||
#include "blackmisc/statusmessage.h"
|
#include "blackmisc/statusmessage.h"
|
||||||
|
#include "blackmisc/logcategorylist.h"
|
||||||
|
#include "blackmisc/logcategory.h"
|
||||||
|
#include "blackmisc/collection.h"
|
||||||
|
#include "blackmisc/sequence.h"
|
||||||
#include "blackmisc/timestampobjectlist.h"
|
#include "blackmisc/timestampobjectlist.h"
|
||||||
|
#include "blackmisc/orderablelist.h"
|
||||||
#include "blackmisc/variant.h"
|
#include "blackmisc/variant.h"
|
||||||
|
#include "blackmisc/blackmiscexport.h"
|
||||||
|
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
|
|||||||
Reference in New Issue
Block a user