Adds initial intermediate qt6 porting state
This commit is contained in:
11247 files changed
+1891537
No files matched your search
Executable
+80
@@ -0,0 +1,80 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
|
||||
class QComboBox;
|
||||
class QStandardItemModel;
|
||||
|
||||
namespace ProjectDataManagement
|
||||
{
|
||||
enum class PdmComboBoxType
|
||||
{
|
||||
CbUnkown = 0,
|
||||
CbLanguage,
|
||||
CbOperationMode,
|
||||
CbModeHelmet,
|
||||
CbModeVest,
|
||||
CbPersonalProtection,
|
||||
CbProtectionLevel,
|
||||
CbHandgrenadeSearchMode,
|
||||
CbInternationalMode,
|
||||
CbABCProtectionMode,
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
namespace PdmComboBox
|
||||
{
|
||||
class ChargeTypeFilterProxyModel final : public QSortFilterProxyModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
using QSortFilterProxyModel::QSortFilterProxyModel;
|
||||
|
||||
void setPropertyFilter(const QString &property, const QVariant &value);
|
||||
void setSourceModel(QAbstractItemModel *model) override;
|
||||
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
|
||||
|
||||
private:
|
||||
QStandardItemModel *m_model = nullptr;
|
||||
QString m_property;
|
||||
QVariant m_value;
|
||||
};
|
||||
|
||||
namespace CBUserRoles
|
||||
{
|
||||
enum Role
|
||||
{
|
||||
Id = Qt::UserRole,
|
||||
Properties
|
||||
};
|
||||
}
|
||||
namespace TargetSubTypeRole
|
||||
{
|
||||
enum Role
|
||||
{
|
||||
Id = Qt::UserRole,
|
||||
Abbreviation
|
||||
};
|
||||
}
|
||||
|
||||
bool fill(QComboBox *cbx, PdmComboBoxType type);
|
||||
bool fill(QComboBox *cbx, GearClass gearClass, const std::shared_ptr<Interface::Dtc> &dtc);
|
||||
void fillIgniterType(QComboBox *cbx, int chargeTypeId, const std::shared_ptr<Interface::Dtc> &dtc);
|
||||
void fillIgniterFunction(QComboBox *cbx, int chargeTypeId, int igniterTypeId, const std::shared_ptr<Interface::Dtc> &dtc);
|
||||
void fillLoadType(QComboBox *cbx, int chargeTypeId, const std::shared_ptr<Interface::Dtc> &dtc);
|
||||
void fillTargetType(QComboBox *cbx, const std::shared_ptr<Interface::Dtc> &dtc);
|
||||
void fillTargetSubType(QComboBox *cbx, int targetTypeId, const std::shared_ptr<Interface::Dtc> &dtc);
|
||||
void fillFirePurpose(QComboBox *cbx, const std::shared_ptr<Interface::Dtc> &dtc);
|
||||
|
||||
bool setChargeTypePropertyFilter(QComboBox *cbx, const QString &property, const QVariant &value);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user