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
+39
-49
@@ -1,86 +1,76 @@
|
||||
#include "track_entry_previewer.h"
|
||||
|
||||
#include "track_content_widget.h"
|
||||
#include "track_entry.h"
|
||||
#include "track_entry_painters.h"
|
||||
#include "track_content_widget.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QDrag>
|
||||
#include <QMimeData>
|
||||
#include <QMouseEvent>
|
||||
|
||||
#include <QPainter>
|
||||
|
||||
namespace LtsScriptTimeline
|
||||
{
|
||||
|
||||
QDataStream &operator<<(QDataStream &ds, const TrackEntry &te);
|
||||
QDataStream &operator>>(QDataStream &ds, TrackEntry &te);
|
||||
QDataStream& operator<<(QDataStream& ds, const TrackEntry& te);
|
||||
QDataStream& operator>>(QDataStream& ds, TrackEntry& te);
|
||||
|
||||
TrackEntryPreviewer::TrackEntryPreviewer(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, m_te(nullptr)
|
||||
TrackEntryPreviewer::TrackEntryPreviewer(QWidget* parent) : QWidget(parent), m_te(nullptr)
|
||||
{
|
||||
|
||||
|
||||
setVisible(false);
|
||||
setVisible(false);
|
||||
}
|
||||
|
||||
TrackEntryPreviewer::~TrackEntryPreviewer() {}
|
||||
|
||||
TrackEntryPreviewer::~TrackEntryPreviewer()
|
||||
{}
|
||||
|
||||
|
||||
void TrackEntryPreviewer::setTrackEntry(TrackEntry *te)
|
||||
void TrackEntryPreviewer::setTrackEntry(TrackEntry* te)
|
||||
{
|
||||
m_te = te;
|
||||
m_te = te;
|
||||
|
||||
if (m_te->isSet)
|
||||
return;
|
||||
if (m_te->isSet)
|
||||
return;
|
||||
|
||||
connect(m_te, &TrackEntry::destroyed,
|
||||
this, [this]()
|
||||
{
|
||||
m_te = nullptr;
|
||||
emit signalDelete();
|
||||
});
|
||||
connect(m_te, &TrackEntry::destroyed, this, [this]() {
|
||||
m_te = nullptr;
|
||||
emit signalDelete();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
void TrackEntryPreviewer::mousePressEvent(QMouseEvent *event)
|
||||
void TrackEntryPreviewer::mousePressEvent(QMouseEvent* event)
|
||||
{
|
||||
|
||||
if (!m_te || event->buttons() != Qt::LeftButton)
|
||||
return;
|
||||
|
||||
m_te->isSet = true;
|
||||
QByteArray itemData(TrackContentWidget::itemsToData({ m_te }, 0));
|
||||
m_te->isSet = false;
|
||||
if (!m_te || event->buttons() != Qt::LeftButton)
|
||||
return;
|
||||
|
||||
QMimeData *mimeData = new QMimeData;
|
||||
mimeData->setData(TrackContentWidget::mime, itemData);
|
||||
m_te->isSet = true;
|
||||
QByteArray itemData(TrackContentWidget::itemsToData({m_te}, 0));
|
||||
m_te->isSet = false;
|
||||
|
||||
QDrag *drag = new QDrag(this);
|
||||
drag->setDragCursor(QPixmap(), Qt::CopyAction);
|
||||
drag->setMimeData(mimeData);
|
||||
QMimeData* mimeData = new QMimeData;
|
||||
mimeData->setData(TrackContentWidget::mime, itemData);
|
||||
|
||||
emit signalStartDrag();
|
||||
QDrag* drag = new QDrag(this);
|
||||
drag->setDragCursor(QPixmap(), Qt::CopyAction);
|
||||
drag->setMimeData(mimeData);
|
||||
|
||||
if (drag->exec(Qt::CopyAction) == Qt::CopyAction)
|
||||
emit signalDelete();
|
||||
emit signalStartDrag();
|
||||
|
||||
emit signalStopDrag();
|
||||
if (drag->exec(Qt::CopyAction) == Qt::CopyAction)
|
||||
emit signalDelete();
|
||||
|
||||
emit signalStopDrag();
|
||||
}
|
||||
|
||||
|
||||
void TrackEntryPreviewer::paintEvent(QPaintEvent *event)
|
||||
void TrackEntryPreviewer::paintEvent(QPaintEvent* event)
|
||||
{
|
||||
QWidget::paintEvent(event);
|
||||
QWidget::paintEvent(event);
|
||||
|
||||
QPainter painter(this);
|
||||
QPainter painter(this);
|
||||
|
||||
if (!m_te)
|
||||
return;
|
||||
if (!m_te)
|
||||
return;
|
||||
|
||||
drawTrackEntry(m_te, painter, rect().adjusted(0, 0, -1, -1), false, isEnabled());
|
||||
drawTrackEntry(m_te, painter, rect().adjusted(0, 0, -1, -1), false, isEnabled());
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace LtsScriptTimeline
|
||||
Reference in new issue
Block a user