- 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>
83 lines
1.8 KiB
C++
83 lines
1.8 KiB
C++
|
|
|
|
#pragma once
|
|
#include "Event.h"
|
|
#include "Item.h"
|
|
#include "ltstimelineclassic_export.h"
|
|
|
|
#include <NGLLogger/INGLLogger.h>
|
|
#include <QAbstractItemModel>
|
|
#include <QObject>
|
|
|
|
namespace LtsTimelineClassic
|
|
{
|
|
|
|
class LTSTIMELINECLASSIC_EXPORT AbstractTimelineModel : public QAbstractItemModel
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit AbstractTimelineModel(QObject* parent = nullptr);
|
|
~AbstractTimelineModel();
|
|
|
|
void retranslate();
|
|
|
|
Item* getRootItem();
|
|
|
|
Event* getEvent(int uniqueId);
|
|
|
|
void invalidateTimeline();
|
|
|
|
void refreshData();
|
|
|
|
qint64 highestPositionedItem() const
|
|
{
|
|
return m_highestPositionedItem;
|
|
}
|
|
|
|
qint64 lowestPositionedItem() const
|
|
{
|
|
return m_lowestPositionedItem;
|
|
}
|
|
|
|
protected:
|
|
NGL::INGLLogger& m_logger;
|
|
|
|
protected:
|
|
void addEvent(Event* event);
|
|
|
|
QVariant data(const QModelIndex& index, int role) const;
|
|
|
|
Qt::ItemFlags flags(const QModelIndex& index) const;
|
|
|
|
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
|
|
|
Item* itemFromIndex(const QModelIndex& idx) const;
|
|
|
|
QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;
|
|
|
|
QModelIndex parent(const QModelIndex& index) const;
|
|
|
|
int rowCount(const QModelIndex& parent = QModelIndex()) const;
|
|
|
|
int columnCount(const QModelIndex& parent = QModelIndex()) const;
|
|
|
|
virtual qint64 currentTime() const = 0;
|
|
|
|
qint64 m_highestPositionedItem;
|
|
qint64 m_lowestPositionedItem;
|
|
bool m_getEventListsRecursive;
|
|
Item* m_rootItem;
|
|
Item* m_markersItem;
|
|
|
|
signals:
|
|
|
|
void signalContextMenu(const QPoint& position, Event* affectedEvent);
|
|
|
|
void signalClicked(Event* affectedEvent);
|
|
|
|
void signalToolTip(const QPoint& p, Event* e);
|
|
};
|
|
|
|
} // namespace LtsTimelineClassic
|