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:
torstenandCopilot committed 2026-08-19 14:46:29 +02:00
1 parent 1881d68aef
commit d6b6ffce7c
848 files changed
+89305 -100020

No files matched your search

+86 -141
View File
@@ -1,217 +1,162 @@
#include "Event.h"
#include <LtsSession/lts_session.h>
#include <QRect>
#include <QPainter>
#include <QPainterPath>
#include <QRect>
#include <time.h>
namespace LtsTimelineClassic
{
Event::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,
const LtsUtils::QPoint3D &pos, LtsSession::LtsSession *session) : m_path(path)
, m_detailData(detailData)
, m_position(pos)
, m_paintFunc(paintFunc)
, m_session(session)
, m_eventColor(paintColor)
, m_startTime(startTime)
, m_endTime(endTime)
, m_uniqueId(uniqueId)
, m_typeId(typeId)
, m_subEventId(subEventId)
, m_playerId(playerId)
, m_partyId(partyId)
, m_equipmentId(equipmentId)
, m_deleted(false)
, m_visible(true),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
checkDuration();
Event::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, const LtsUtils::QPoint3D& pos,
LtsSession::LtsSession* session)
: m_path(path), m_detailData(detailData), m_position(pos), m_paintFunc(paintFunc), m_session(session),
m_eventColor(paintColor), m_startTime(startTime), m_endTime(endTime), m_uniqueId(uniqueId), m_typeId(typeId),
m_subEventId(subEventId), m_playerId(playerId), m_partyId(partyId), m_equipmentId(equipmentId), m_deleted(false),
m_visible(true), m_logger(NGL::NGLLoggerBootstrap::getLogger())
{
checkDuration();
}
void Event::setVisible(bool visibility)
{
if (visibility)
show();
else
hide();
if (visibility)
show();
else
hide();
}
void Event::hide()
{
this->m_visible = false;
this->m_visible = false;
}
void Event::show()
{
this->m_visible = true;
this->m_visible = true;
}
QString Event::getShortActuator() const
{
return m_path.isEmpty() ? QString() : m_path.last();
return m_path.isEmpty() ? QString() : m_path.last();
}
void Event::setEndT(qint64 newEnd)
{
m_endTime = newEnd;
m_endTime = newEnd;
checkDuration();
checkDuration();
}
bool Event::checkDuration()
{
return true;
return true;
}
qint64 Event::duration(bool ignoreLiveEvents) const
{
if (m_endTime > m_startTime)
{
if (m_duration == -1)
m_duration = m_endTime - m_startTime;
if (m_endTime > m_startTime)
{
if (m_duration == -1)
m_duration = m_endTime - m_startTime;
return m_duration;
}
return m_duration;
}
if (m_endTime < 0 && !ignoreLiveEvents)
{
qint64 currentTime = (m_session != nullptr) ? m_session->partitionTime() : time(nullptr) ;
qint64 duration = currentTime - m_startTime;
if (m_endTime < 0 && !ignoreLiveEvents)
{
qint64 currentTime = (m_session != nullptr) ? m_session->partitionTime() : time(nullptr);
qint64 duration = currentTime - m_startTime;
return duration;
}
return duration;
}
return 0;
return 0;
}
void Event::drawMultipleEventGraphic(QPainter *painter, const QRect &rect)
void Event::drawMultipleEventGraphic(QPainter* painter, const QRect& rect)
{
painter->save();
painter->setBrush(Qt::white);
painter->save();
painter->setBrush(Qt::white);
int x = rect.x();
int y = rect.y();
int h = rect.height();
int w = rect.width();
int x = rect.x();
int y = rect.y();
int h = rect.height();
int w = rect.width();
painter->drawRect(rect);
painter->drawRect(rect);
int s1 = y + h - (h * 0.4);
int s2 = y + h - (h * 0.2);
int s1 = y + h - (h * 0.4);
int s2 = y + h - (h * 0.2);
painter->drawLine(QPoint(x, s1),
QPoint(x + w, s1));
painter->drawLine(QPoint(x, s2),
QPoint(x + w, s2));
painter->drawLine(QPoint(x, s1), QPoint(x + w, s1));
painter->drawLine(QPoint(x, s2), QPoint(x + w, s2));
painter->restore();
painter->restore();
}
void Event::drawCustomEventGraphicTriangle(QPainter *painter, const QRect &rect)
void Event::drawCustomEventGraphicTriangle(QPainter* painter, const QRect& rect)
{
int x = rect.x();
int y = rect.y();
int h = rect.height();
int w = rect.width();
int x = rect.x();
int y = rect.y();
int h = rect.height();
int w = rect.width();
QPolygon pol;
pol.append(QPoint(x + 0, y + h));
pol.append(QPoint(x + (w / 2), y + 0));
pol.append(QPoint(x + w, y + h));
pol.append(QPoint(x + 0, y + h));
QPolygon pol;
pol.append(QPoint(x + 0, y + h));
pol.append(QPoint(x + (w / 2), y + 0));
pol.append(QPoint(x + w, y + h));
pol.append(QPoint(x + 0, y + h));
QPainterPath path;
path.moveTo(x, y);
path.addPolygon(pol);
QPainterPath path;
path.moveTo(x, y);
path.addPolygon(pol);
painter->drawPath(path);
painter->drawPath(path);
}
void Event::drawCustomEventGraphicInvertTriangle(QPainter *painter, const QRect &rect)
void Event::drawCustomEventGraphicInvertTriangle(QPainter* painter, const QRect& rect)
{
int x = rect.x();
int y = rect.y();
int h = rect.height();
int w = rect.width();
int x = rect.x();
int y = rect.y();
int h = rect.height();
int w = rect.width();
QPolygon pol;
pol.append(QPoint( x + 0 , y + 0));
pol.append(QPoint( x+ w , y + 0));
pol.append(QPoint(x + ( w / 2 ), y + h));
pol.append(QPoint( x + 0 , y + 0));
QPolygon pol;
pol.append(QPoint(x + 0, y + 0));
pol.append(QPoint(x + w, y + 0));
pol.append(QPoint(x + (w / 2), y + h));
pol.append(QPoint(x + 0, y + 0));
QPainterPath path;
path.moveTo(x, y);
path.addPolygon(pol);
QPainterPath path;
path.moveTo(x, y);
path.addPolygon(pol);
painter->drawPath(path);
painter->drawPath(path);
}
void Event::drawCustomEventGraphicEllipse(QPainter *painter, const QRect &rect)
void Event::drawCustomEventGraphicEllipse(QPainter* painter, const QRect& rect)
{
QPoint ellipsePos = rect.center();
ellipsePos.rx()++;
ellipsePos.ry()++;
QPoint ellipsePos = rect.center();
ellipsePos.rx()++;
ellipsePos.ry()++;
painter->drawEllipse(ellipsePos, rect.width() / 2, rect.height() / 2);
painter->drawEllipse(ellipsePos, rect.width() / 2, rect.height() / 2);
}
void Event::drawCustomEventGraphicRect(QPainter *painter, const QRect &rect)
void Event::drawCustomEventGraphicRect(QPainter* painter, const QRect& rect)
{
painter->drawRect(rect);
painter->drawRect(rect);
}
void Event::drawCustomEventGraphicRoundedRect(QPainter *painter, const QRect &rect)
void Event::drawCustomEventGraphicRoundedRect(QPainter* painter, const QRect& rect)
{
painter->drawRoundedRect(rect, 50, 50, Qt::RelativeSize);
painter->drawRoundedRect(rect, 50, 50, Qt::RelativeSize);
}
}
} // namespace LtsTimelineClassic