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>
This commit is contained in:
848 files changed
+89305
-100020
No files matched your search
Executable → Regular
+136
-99
@@ -1,14 +1,13 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ltstimelineclassic_export.h"
|
||||
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <QColor>
|
||||
#include <QJsonObject>
|
||||
#include <QStringList>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
|
||||
class QPainter;
|
||||
class QRect;
|
||||
@@ -21,138 +20,176 @@ class LtsSession;
|
||||
namespace LtsTimelineClassic
|
||||
{
|
||||
|
||||
|
||||
|
||||
class LTSTIMELINECLASSIC_EXPORT Event
|
||||
class LTSTIMELINECLASSIC_EXPORT Event
|
||||
{
|
||||
public:
|
||||
enum ButtonType
|
||||
{
|
||||
ActiveEvent,
|
||||
EventBlock,
|
||||
};
|
||||
public:
|
||||
enum ButtonType {
|
||||
ActiveEvent,
|
||||
EventBlock,
|
||||
};
|
||||
|
||||
typedef void (*EventPaintFunc)(QPainter*, const QRect&);
|
||||
static void drawCustomEventGraphicTriangle(QPainter* painter, const QRect& rect);
|
||||
static void drawCustomEventGraphicInvertTriangle(QPainter* painter, const QRect& rect);
|
||||
static void drawCustomEventGraphicEllipse(QPainter* painter, const QRect& rect);
|
||||
static void drawCustomEventGraphicRect(QPainter* painter, const QRect& rect);
|
||||
static void drawCustomEventGraphicRoundedRect(QPainter* painter, const QRect& rect);
|
||||
static void drawMultipleEventGraphic(QPainter* painter, const QRect& rect);
|
||||
|
||||
typedef void (*EventPaintFunc)(QPainter *, const QRect &);
|
||||
static void drawCustomEventGraphicTriangle(QPainter *painter, const QRect &rect);
|
||||
static void drawCustomEventGraphicInvertTriangle(QPainter *painter, const QRect &rect);
|
||||
static void drawCustomEventGraphicEllipse(QPainter *painter, const QRect &rect);
|
||||
static void drawCustomEventGraphicRect(QPainter *painter, const QRect &rect);
|
||||
static void drawCustomEventGraphicRoundedRect(QPainter *painter, const QRect &rect);
|
||||
static void drawMultipleEventGraphic(QPainter *painter, const QRect &rect);
|
||||
Event() = default;
|
||||
Event(int uniqueId, int typeId, qint64 startTime, qint64 endTime, int playerId, int partyId, int equipmentId,
|
||||
const QStringList& path, const EventPaintFunc& paintFunc, const QColor& paintColor,
|
||||
const QJsonObject& detailData, int subEventId = -1, const LtsUtils::QPoint3D& pos = LtsUtils::QPoint3D(),
|
||||
LtsSession::LtsSession* session = nullptr);
|
||||
|
||||
QStringList getActuator() const
|
||||
{
|
||||
return m_path;
|
||||
}
|
||||
|
||||
Event() = default;
|
||||
Event(int uniqueId, int typeId, qint64 startTime, qint64 endTime,
|
||||
int playerId, int partyId, int equipmentId, const QStringList &path,
|
||||
const EventPaintFunc &paintFunc, const QColor &paintColor,
|
||||
const QJsonObject &detailData, int subEventId = -1,
|
||||
const LtsUtils::QPoint3D &pos = LtsUtils::QPoint3D(),
|
||||
LtsSession::LtsSession *session = nullptr);
|
||||
int typeId() const
|
||||
{
|
||||
return m_typeId;
|
||||
}
|
||||
|
||||
int uniqueId() const
|
||||
{
|
||||
return m_uniqueId;
|
||||
}
|
||||
|
||||
|
||||
int getSubEventID() const;
|
||||
|
||||
QStringList getActuator() const { return m_path; }
|
||||
QColor getColor() const
|
||||
{
|
||||
return m_eventColor;
|
||||
}
|
||||
|
||||
int typeId() const { return m_typeId; }
|
||||
int uniqueId() const { return m_uniqueId; }
|
||||
EventPaintFunc getPaintFunc() const
|
||||
{
|
||||
return m_paintFunc;
|
||||
}
|
||||
|
||||
int getSubEventID() const;
|
||||
qint64 startTime() const
|
||||
{
|
||||
return m_startTime;
|
||||
}
|
||||
|
||||
QColor getColor() const { return m_eventColor; }
|
||||
qint64 endTime() const
|
||||
{
|
||||
return m_endTime;
|
||||
}
|
||||
|
||||
EventPaintFunc getPaintFunc() const { return m_paintFunc; }
|
||||
const QJsonObject& detailData() const
|
||||
{
|
||||
return m_detailData;
|
||||
}
|
||||
|
||||
|
||||
void setDetailData(const QJsonObject& detailData)
|
||||
{
|
||||
m_detailData = detailData;
|
||||
}
|
||||
|
||||
qint64 startTime() const { return m_startTime; }
|
||||
qint64 endTime() const { return m_endTime; }
|
||||
void setEndT(qint64 newEnd);
|
||||
|
||||
|
||||
qint64 duration(bool ignoreLiveEvents = false) const;
|
||||
|
||||
|
||||
int playerId() const
|
||||
{
|
||||
return m_playerId;
|
||||
}
|
||||
|
||||
|
||||
void setPlayerId(int playerId)
|
||||
{
|
||||
m_playerId = playerId;
|
||||
}
|
||||
|
||||
|
||||
int partyId() const
|
||||
{
|
||||
return m_partyId;
|
||||
}
|
||||
|
||||
const QJsonObject &detailData() const { return m_detailData; }
|
||||
void setDetailData(const QJsonObject &detailData) { m_detailData = detailData; }
|
||||
void setPartyId(int teamId)
|
||||
{
|
||||
m_partyId = teamId;
|
||||
}
|
||||
|
||||
void setEndT(qint64 newEnd);
|
||||
int equipmentId() const
|
||||
{
|
||||
return m_equipmentId;
|
||||
}
|
||||
|
||||
|
||||
void setEquipmentId(int eqId)
|
||||
{
|
||||
m_equipmentId = eqId;
|
||||
}
|
||||
|
||||
qint64 duration(bool ignoreLiveEvents = false) const;
|
||||
QString getShortActuator() const;
|
||||
|
||||
int playerId() const { return m_playerId; }
|
||||
void setPlayerId(int playerId) { m_playerId = playerId; }
|
||||
bool positionValid() const
|
||||
{
|
||||
return !std::isnan(m_position.x()) && !std::isnan(m_position.y());
|
||||
}
|
||||
|
||||
int partyId() const { return m_partyId; }
|
||||
void setPartyId(int teamId) { m_partyId = teamId; }
|
||||
const LtsUtils::QPoint3D& position() const
|
||||
{
|
||||
return m_position;
|
||||
}
|
||||
|
||||
int equipmentId() const { return m_equipmentId; }
|
||||
void setEquipmentId(int eqId) { m_equipmentId = eqId; }
|
||||
QPointF pos2d() const
|
||||
{
|
||||
return QPointF(m_position.x(), m_position.y());
|
||||
}
|
||||
|
||||
QString getShortActuator() const;
|
||||
void setPosition(const LtsUtils::QPoint3D& pos)
|
||||
{
|
||||
m_position = pos;
|
||||
}
|
||||
|
||||
bool positionValid() const { return !std::isnan(m_position.x()) && !std::isnan(m_position.y()); }
|
||||
const LtsUtils::QPoint3D &position() const { return m_position; }
|
||||
QPointF pos2d() const { return QPointF(m_position.x(), m_position.y()); }
|
||||
void setPosition(const LtsUtils::QPoint3D &pos) { m_position = pos; }
|
||||
void hide();
|
||||
|
||||
void show();
|
||||
|
||||
|
||||
bool isVisible() const
|
||||
{
|
||||
return m_visible;
|
||||
}
|
||||
|
||||
void hide();
|
||||
void setVisible(bool visibility = true);
|
||||
|
||||
|
||||
void setDeleted()
|
||||
{
|
||||
m_deleted = true;
|
||||
}
|
||||
|
||||
void show();
|
||||
bool isDeleted() const
|
||||
{
|
||||
return m_deleted;
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger& m_logger;
|
||||
QStringList m_path;
|
||||
QJsonObject m_detailData;
|
||||
|
||||
bool isVisible() const { return m_visible; }
|
||||
LtsUtils::QPoint3D m_position;
|
||||
EventPaintFunc m_paintFunc = nullptr;
|
||||
LtsSession::LtsSession* m_session = nullptr;
|
||||
QColor m_eventColor;
|
||||
qint64 m_startTime = -1;
|
||||
qint64 m_endTime = -1;
|
||||
mutable qint64 m_duration = -1;
|
||||
|
||||
|
||||
int m_uniqueId = -1;
|
||||
int m_typeId = -1;
|
||||
int m_subEventId = -1;
|
||||
int m_playerId = -1;
|
||||
int m_partyId = -1;
|
||||
int m_equipmentId = -1;
|
||||
bool m_deleted = false;
|
||||
bool m_visible = false;
|
||||
|
||||
void setVisible(bool visibility = true);
|
||||
|
||||
void setDeleted() { m_deleted = true; }
|
||||
|
||||
bool isDeleted() const { return m_deleted; }
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
QStringList m_path;
|
||||
QJsonObject m_detailData;
|
||||
|
||||
LtsUtils::QPoint3D m_position;
|
||||
EventPaintFunc m_paintFunc = nullptr;
|
||||
LtsSession::LtsSession *m_session = nullptr;
|
||||
QColor m_eventColor;
|
||||
qint64 m_startTime = -1;
|
||||
qint64 m_endTime = -1;
|
||||
mutable qint64 m_duration = -1;
|
||||
|
||||
|
||||
int m_uniqueId = -1;
|
||||
int m_typeId = -1;
|
||||
int m_subEventId = -1;
|
||||
int m_playerId = -1;
|
||||
int m_partyId = -1;
|
||||
int m_equipmentId = -1;
|
||||
bool m_deleted = false;
|
||||
bool m_visible = false;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
static bool checkDuration();
|
||||
private:
|
||||
static bool checkDuration();
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace LtsTimelineClassic
|
||||
Reference in new issue
Block a user