Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Plugins/BuildingViewer/Common/bdv_controller.h
T
torstenandCopilot d6b6ffce7c Apply clang-format to Lts/Common and DTC/enum headers
- Formatted all CodeGen module files (9 files)
- Formatted LtsAppDescriptor module files
- Formatted LtsAppManager/AppChooser files
- Applied clang-format to all DTC and enum headers across modules
- Removed coordTransTests from CommonUnitTestsPlaceholder (moved to tests/)

Cosmetic changes only, no functional modifications.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-19 14:46:29 +02:00

123 lines
4.0 KiB
C++

#pragma once
#include "BgViewer/viewerCtrl/mainloop.h"
#include "bdv_helper.h"
#include "buildingviewercommon_export.h"
#include "logger.h"
#include <BuildingViewer/share/exccommands.h>
#include <LtsSession/lts_session_data_dds.h>
#include <LtsWidgets/lts_dialog.h>
#include <QObject>
#include <QString>
#include <QTimer>
#include <memory>
class QWidget;
namespace LtsPluginManager
{
class LtsPluginManager;
}
namespace BuildingViewer
{
class CommunicationInterfaceInternal;
class BuildingViewerDdsController;
class PluginProvider;
class BUILDINGVIEWERCOMMON_EXPORT BgViewerController : public QObject
{
Q_OBJECT
public:
explicit BgViewerController(QObject* parent = nullptr);
~BgViewerController();
void clearInterfaces(const LtsSession::DdsConnectionParams& conParams);
bool isBgViewerApplicationRunning() const;
LtsSession::DdsConnectionParams currentDdsConnParams() const;
bool startBgViewerAppInSession(PluginProvider* pStartingSession);
void openBuilding(const QString& strBuildingFeatureId);
void closeBuilding(const QString& strBuildingFeatureId = QString());
bool forceInit(PluginProvider* pSession);
void updatePlayerSymbols(int size);
void closeAll();
QWidget* getBgViewerWidget();
bool init(PluginProvider* pSession, bool bStartRendering = false, const QString& modelPath = buildingModelPath());
PluginProvider* activeSession() const;
void excConnect(const std::vector<std::string>& paths, const QString& strXMLFile = QString());
void excGetBuildingList();
void excGetViewState();
void excHighlightView(const QString& strFeatureID);
void excRestoreViewState(const QJsonValue& state);
void excSetGlobalDotsMode(bool useDots);
void excSetGlobalTransparency(double transparency);
void excSetGlobalViewMode(bool useOrtho);
void excSetHitlineDuration(uint32_t duration_s);
void excStartRecording(const QString& strPathOutputFolder, const QString& strFeatureID = QStringLiteral("all"),
int w = 800, int h = 600, int framerate = 20, int quality = 100);
void excStopRecording(const QString& strFeatureID = QStringLiteral("all"));
static QString buildingModelPath();
LtsPluginManager::LtsPluginManager* app()
{
return m_bgvApp;
}
Q_SIGNALS:
void bgvAppIsInitialized();
void signalBgViewerInitFinished();
void signalReceivedBuildingList(const QVector<BuildingTuple>& list);
void signalReceivedViewState(const QJsonValue& state);
void signalViewerEventButton();
void signalPlayerPicked(int playerId);
void signalAssetPicked(int structureElementId);
void signalViewerEventWidgetClosed(const QString& featureID);
void signalViewerEventWidgetMaximized(const QString& featureID);
void signalViewerEventWidgetMinimized(const QString& featureID);
void signalViewerEventWidgetFocused(const QString& featureID);
void signalViewerEventRoomNameClicked(const QString& featureID, const QString& roomID);
void signalViewerZoomChanged(const QString& featureId, double top, double left, double bottom, double right);
public slots:
void slotStartRecording(const QString& strFolderPath, const QJsonValue& state);
void slotStopRecording();
void hideLiveVideo();
private slots:
void slotLoadBuilding();
void slotWidgetReleased();
private:
NGL::INGLLogger& m_logger;
void showBgViewerInfoMessageBox();
private:
VCtrl::MainLoop m_mainloop;
bool m_widgetStolen;
std::vector<std::string> m_buildingsToShow;
CommunicationInterfaceInternal* m_comIfc{nullptr};
VCtrl::ViewerInterface* m_viewerInterface{nullptr};
BuildingViewerDdsController* m_pBgViewerDDSController;
bool m_initExerciseWasSuccessful{false};
LtsSession::DdsConnectionParams m_currentDdsConnParams;
LtsPluginManager::LtsPluginManager* m_bgvApp;
bool m_bgvAppIsInitialized{false};
QTimer* m_tickTimer{nullptr};
QWidget* m_bgViewerBaseLayoutWidget{nullptr};
};
} // namespace BuildingViewer