WIP: Build fixes und EXTERNAL_DEPENDENCIES.md
This commit is contained in:
300 files changed
+983
-417
No files matched your search
+1
-1
@@ -7,7 +7,7 @@
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
#include <ProjectDataManagement/logger.h>
|
||||
#include <LtsSession/lts_session_data_dds.h>
|
||||
#include <LtsUtilsCore/dds_vector.h>
|
||||
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
|
||||
#include <ngltranslator/ngltranslator.h>
|
||||
|
||||
|
||||
|
||||
+8
-1
@@ -5,10 +5,15 @@
|
||||
#include "ui_charge_edit_dialog.h"
|
||||
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
#endif
|
||||
|
||||
#include <LtsSession/lts_session.h>
|
||||
#include <LtsUtils/LtsUtilsGui/LtsUtilsGuiDds/request_helper.h>
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
|
||||
namespace ProjectDataManagement
|
||||
{
|
||||
ChargeEditDialog::ChargeEditDialog(const int chargeId,
|
||||
@@ -95,4 +100,6 @@ bool ChargeEditDialog::apply()
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BUILD_WITH_EXTERNAL_DDS
|
||||
+25
-5
@@ -3,12 +3,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LtsWidgets/lts_dialog.h>
|
||||
#include <ProjectDataManagement/pdm_ftc.h>
|
||||
#include <ProjectDataManagement/logger.h>
|
||||
#include <memory>
|
||||
|
||||
namespace Ui {
|
||||
class ChargeEditDialog;
|
||||
namespace Core {
|
||||
class FunctionReplyObject;
|
||||
}
|
||||
|
||||
namespace LtsSession {
|
||||
@@ -21,6 +19,25 @@ class RequestHelper;
|
||||
|
||||
namespace ProjectDataManagement
|
||||
{
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
// Forward declarations for external dependencies
|
||||
struct ChargeType;
|
||||
#endif
|
||||
|
||||
namespace Interface {
|
||||
namespace Ftc {
|
||||
class UpdateChargeNamesReplyHandler;
|
||||
}
|
||||
}
|
||||
|
||||
// Forward declaration - LtsWidgets::LtsDialog wird in CPP definiert
|
||||
namespace LtsWidgets {
|
||||
class LtsDialog;
|
||||
}
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
|
||||
class ChargeEditDialog : public LtsWidgets::LtsDialog
|
||||
, protected ProjectDataManagement::Interface::Ftc::UpdateChargeNamesReplyHandler
|
||||
{
|
||||
@@ -50,4 +67,7 @@ private:
|
||||
ChargeType m_chargeType;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
#endif // BUILD_WITH_EXTERNAL_DDS
|
||||
|
||||
}
|
||||
+4
-3
@@ -23,8 +23,7 @@
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
|
||||
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
|
||||
namespace ProjectDataManagement
|
||||
{
|
||||
@@ -281,4 +280,6 @@ void ChargeTableDialog::onExportButtonClicked()
|
||||
m_flmGui->saveFileContent(this, FileManagement::FileType::Xml, m_session->exerciseId(), byteArray);
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace ProjectDataManagement
|
||||
|
||||
#endif // BUILD_WITH_EXTERNAL_DDS
|
||||
+35
-15
@@ -3,28 +3,22 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "charge_table_model.h"
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <QSet>
|
||||
|
||||
#include <ProjectDataManagement/pdm_ftc.h>
|
||||
#include <LtsWidgets/lts_dialog.h>
|
||||
#include <ProjectDataManagement/logger.h>
|
||||
|
||||
#include <Plugins/FileManagement/flm_explorer_gui_plugin_interface.h>
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class ChargeTableDialog;
|
||||
namespace Core {
|
||||
class FunctionReplyObject;
|
||||
}
|
||||
namespace LtsSession
|
||||
{
|
||||
|
||||
namespace LtsSession {
|
||||
class LtsSession;
|
||||
}
|
||||
|
||||
namespace LtsUtils {
|
||||
class RequestHelper;
|
||||
}
|
||||
|
||||
namespace FileManagement {
|
||||
class ForeignGuiInterface;
|
||||
}
|
||||
@@ -32,6 +26,30 @@ class ForeignGuiInterface;
|
||||
namespace ProjectDataManagement
|
||||
{
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
// Forward declarations for external dependencies
|
||||
struct GearClass;
|
||||
struct ChargeType;
|
||||
#else
|
||||
// Forward declarations for external dependencies
|
||||
struct GearClass;
|
||||
struct ChargeType;
|
||||
#endif
|
||||
|
||||
namespace Interface {
|
||||
namespace Ftc {
|
||||
class UpdateChargeTypeReplyHandler;
|
||||
class UpdateChargeNamesReplyHandler;
|
||||
}
|
||||
}
|
||||
|
||||
// Forward declaration - LtsWidgets::LtsDialog wird in CPP definiert
|
||||
namespace LtsWidgets {
|
||||
class LtsDialog;
|
||||
}
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
|
||||
class ChargeTableDialog : public LtsWidgets::LtsDialog
|
||||
, protected ProjectDataManagement::Interface::Ftc::UpdateChargeTypeReplyHandler
|
||||
{
|
||||
@@ -75,4 +93,6 @@ private slots:
|
||||
void onExportButtonClicked();
|
||||
};
|
||||
|
||||
#endif // BUILD_WITH_EXTERNAL_DDS
|
||||
|
||||
}
|
||||
+5
-1
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "charge_table_model.h"
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
|
||||
#include <QIcon>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
@@ -429,4 +431,6 @@ int ChargeTableDialogModel::baseCharge(int chargeTypeId)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BUILD_WITH_EXTERNAL_DDS
|
||||
+12
-3
@@ -3,24 +3,31 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
#include <ProjectDataManagement/logger.h>
|
||||
|
||||
#include <LtsWidgets/lts_abstract_table_model.h>
|
||||
#include <QSet>
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
#endif
|
||||
|
||||
#include <ProjectDataManagement/logger.h>
|
||||
|
||||
namespace ProjectDataManagement
|
||||
{
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
inline uint qHash(GearClass gc)
|
||||
{
|
||||
return ::qHash(gc.underlying());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
|
||||
class ChargeTableDialogModel final : public LtsWidgets::LtsAbstractTableModel<ProjectDataManagement::ChargeType>
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -189,4 +196,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif // BUILD_WITH_EXTERNAL_DDS
|
||||
|
||||
}
|
||||
+7
-2
@@ -3,11 +3,14 @@
|
||||
|
||||
|
||||
#include "pdm_charge_selector.h"
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPushButton>
|
||||
#include <ProjectDataManagement/pdm_translation.h>
|
||||
#include <LtsUtils/LtsUtilsCore/json_object.h>
|
||||
#include <LtsUtilsCore/json_object.h>
|
||||
|
||||
namespace ProjectDataManagement
|
||||
{
|
||||
@@ -70,4 +73,6 @@ void ChargeSelector::reject()
|
||||
LtsWidgets::LtsFramelessDialog::reject();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BUILD_WITH_EXTERNAL_DDS
|
||||
+13
@@ -7,28 +7,41 @@
|
||||
#include <ProjectDataManagement/logger.h>
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
#include <QSet>
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
#include <ProjectDataManagement/pdm_gear_class.h>
|
||||
#endif
|
||||
|
||||
#include "ui_pdm_charge_selector.h"
|
||||
|
||||
namespace ProjectDataManagement
|
||||
{
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
class ChargeSelector final : public LtsWidgets::LtsFramelessDialog
|
||||
#else
|
||||
class ChargeSelector;
|
||||
#endif
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ChargeSelector(QWidget *parent = nullptr);
|
||||
~ChargeSelector();
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
bool init(const std::shared_ptr<ProjectDataManagement::Interface::Dtc> &dtc,
|
||||
GearClass gearClass,
|
||||
const QSet<int> &preselectedCharges);
|
||||
#endif
|
||||
Q_SIGNALS:
|
||||
void chargesSelected(const QSet<int> &selectedCharges);
|
||||
private:
|
||||
void chargeCheckBoxChanged(int chargeId, bool bChecked);
|
||||
void reject() override;
|
||||
private:
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
QSet<int> m_selectedCharges;
|
||||
QSet<int> m_selectedChargesOriginal;
|
||||
Ui::ChargeSelector m_ui;
|
||||
#endif
|
||||
};
|
||||
}
|
||||
+14
-2
@@ -11,6 +11,12 @@
|
||||
#include <LtsWidgets/lts_combo_box.h>
|
||||
#include <ProjectDataManagement/pdm_translation.h>
|
||||
|
||||
// External DDS types - only available when external dependencies are present
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
#include <training_area_telegrams.h>
|
||||
#endif
|
||||
|
||||
namespace ProjectDataManagement
|
||||
{
|
||||
namespace PdmComboBox
|
||||
@@ -56,6 +62,7 @@ bool ChargeTypeFilterProxyModel::filterAcceptsRow(int source_row, const QModelIn
|
||||
return obj.value(m_property) == m_value;
|
||||
}
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
void fillGearClass(QComboBox *cbx, GearClass gearClass, const std::shared_ptr<Interface::Dtc> &dtc)
|
||||
{
|
||||
QStandardItemModel *itemModel = new QStandardItemModel(cbx);
|
||||
@@ -205,6 +212,7 @@ void fillFirePurpose(QComboBox *cbx, const std::shared_ptr<Interface::Dtc> &dtc)
|
||||
}
|
||||
itemModel->sort(0, Qt::AscendingOrder);
|
||||
}
|
||||
#endif // BUILD_WITH_EXTERNAL_DDS
|
||||
|
||||
bool fill(QComboBox *cbx, PdmComboBoxType type)
|
||||
{
|
||||
@@ -218,13 +226,14 @@ bool fill(QComboBox *cbx, PdmComboBoxType type)
|
||||
|
||||
switch (type)
|
||||
{
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
case PdmComboBoxType::CbLanguage:
|
||||
{
|
||||
const QString languages = LtsUtils::ProjectSettings::getInstance()->value(QStringLiteral("pdm"), QStringLiteral("EquipmentLanguages")).toString();
|
||||
const QStringList slLang = languages.split(QLatin1Char(','));
|
||||
QSet<int> alreadySeen;
|
||||
alreadySeen += LanguageConfiguration::NoChange;
|
||||
cbx->addItem(toString(LanguageConfiguration::NoChange), LanguageConfiguration::NoChange);
|
||||
alreadySeen += Language::NoChange;
|
||||
cbx->addItem(toString(Language::NoChange), Language::NoChange);
|
||||
for (const QString &r : slLang)
|
||||
{
|
||||
const int langId = r.toInt();
|
||||
@@ -289,6 +298,7 @@ bool fill(QComboBox *cbx, PdmComboBoxType type)
|
||||
cbx->addItem(toString(ABCProtectionMode::Off), ABCProtectionMode::Off);
|
||||
break;
|
||||
}
|
||||
#endif // BUILD_WITH_EXTERNAL_DDS
|
||||
case PdmComboBoxType::CbUnkown:
|
||||
break;
|
||||
}
|
||||
@@ -302,6 +312,7 @@ bool fill(QComboBox *cbx, PdmComboBoxType type)
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
bool fill(QComboBox *cbx, GearClass gearClass, const std::shared_ptr<Interface::Dtc> &dtc)
|
||||
{
|
||||
if (!cbx)
|
||||
@@ -321,6 +332,7 @@ bool fill(QComboBox *cbx, GearClass gearClass, const std::shared_ptr<Interface::
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif // BUILD_WITH_EXTERNAL_DDS
|
||||
|
||||
bool setChargeTypePropertyFilter(QComboBox *cbx, const QString &property, const QVariant &value)
|
||||
{
|
||||
|
||||
+20
-2
@@ -5,8 +5,7 @@
|
||||
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
#include <Lts/Proxies/TrainingAreaBase/training_area_telegrams.h>
|
||||
#include <memory>
|
||||
|
||||
class QComboBox;
|
||||
class QStandardItemModel;
|
||||
@@ -27,6 +26,23 @@ enum class PdmComboBoxType
|
||||
CbABCProtectionMode,
|
||||
};
|
||||
|
||||
// Forward declarations for external DDS types - only available when external dependencies are present
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
}
|
||||
enum class GearClass;
|
||||
enum class HandgrenadeSearchMode;
|
||||
enum class InternationalMode;
|
||||
enum class ABCProtectionMode;
|
||||
enum class PersonalProtection;
|
||||
enum class ProtectionLevel;
|
||||
enum class Language; // from training_area_telegrams.h
|
||||
enum class OperationMode; // from training_area_telegrams.h
|
||||
enum class WphMode; // from training_area_telegrams.h
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -66,6 +82,7 @@ enum Role
|
||||
}
|
||||
|
||||
bool fill(QComboBox *cbx, PdmComboBoxType type);
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
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);
|
||||
@@ -73,6 +90,7 @@ void fillLoadType(QComboBox *cbx, int chargeTypeId, const std::shared_ptr<Interf
|
||||
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);
|
||||
#endif
|
||||
|
||||
bool setChargeTypePropertyFilter(QComboBox *cbx, const QString &property, const QVariant &value);
|
||||
|
||||
|
||||
+6
-1
@@ -2,6 +2,9 @@
|
||||
|
||||
|
||||
#include "pdm_combobox_foreign_gui_interface_impl.h"
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
|
||||
#include "pdm_charge_selector.h"
|
||||
#include "pdm_combobox.h"
|
||||
|
||||
@@ -172,4 +175,6 @@ bool ForeignGuiInterfaceImpl::fillABCProtectionComboBox(QComboBox *cbx)
|
||||
return PdmComboBox::fill(cbx, PdmComboBoxType::CbABCProtectionMode);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BUILD_WITH_EXTERNAL_DDS
|
||||
+12
@@ -6,10 +6,18 @@
|
||||
#include <ProjectDataManagement/pdm_gui_plugin_interface.h>
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
#include <ProjectDataManagement/pdm_gear_class.h>
|
||||
#endif
|
||||
|
||||
namespace ProjectDataManagement
|
||||
{
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
class ForeignGuiInterfaceImpl : public ForeignGuiInterface
|
||||
#else
|
||||
class ForeignGuiInterfaceImpl
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
ForeignGuiInterfaceImpl();
|
||||
@@ -17,6 +25,7 @@ public:
|
||||
bool init(const std::shared_ptr<ProjectDataManagement::Interface::Dtc> &dtc);
|
||||
void uninit();
|
||||
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
bool fillBComboBox(QComboBox *cbx) override;
|
||||
bool fillCComboBox(QComboBox *cbx) override;
|
||||
bool fillNComboBox(QComboBox *cbx) override;
|
||||
@@ -51,9 +60,12 @@ public:
|
||||
GearClass gearClass,
|
||||
const std::function<void(const QSet<int>&)> &cb,
|
||||
QWidget *parent) override;
|
||||
#endif
|
||||
|
||||
private:
|
||||
#ifdef BUILD_WITH_EXTERNAL_DDS
|
||||
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_dtc;
|
||||
#endif
|
||||
};
|
||||
|
||||
}
|
||||
+12
-7
@@ -3,20 +3,25 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
#include <ProjectDataManagement/pdm_ftc.h>
|
||||
#include <PluginInterfaces/data_plugin_interface.h>
|
||||
#include <memory>
|
||||
|
||||
namespace ProjectDataManagement
|
||||
{
|
||||
|
||||
// Forward declarations for external dependencies
|
||||
namespace Interface {
|
||||
namespace Dtc {
|
||||
}
|
||||
namespace Ftc {
|
||||
}
|
||||
}
|
||||
|
||||
class ForeignDataInterface;
|
||||
|
||||
|
||||
|
||||
class DataInterface : public DataPluginBase::Interface
|
||||
class DataInterface //: public DataPluginBase::Interface
|
||||
{
|
||||
public:
|
||||
using DataPluginBase::Interface::Interface;
|
||||
//using DataPluginBase::Interface::Interface;
|
||||
|
||||
virtual std::shared_ptr<ProjectDataManagement::Interface::Dtc> getDtc() = 0;
|
||||
virtual std::shared_ptr<ProjectDataManagement::Interface::Ftc> getFtc() = 0;
|
||||
|
||||
Reference in new issue
Block a user