129 lines
1.5 KiB
C++
Executable File
129 lines
1.5 KiB
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <LtsTimelineClassic/ltstimelineclassic_export.h>
|
|
#include "EventList.h"
|
|
#include "PassiveEventContainer.h"
|
|
|
|
namespace LtsTimelineClassic
|
|
{
|
|
|
|
class Item;
|
|
using ItemList = QList<Item *>;
|
|
|
|
|
|
|
|
class LTSTIMELINECLASSIC_EXPORT Item
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
Item(const Item &) = delete;
|
|
Item &operator=(const Item &) = delete;
|
|
const EventGraphicList getEventGraphics() const;
|
|
|
|
|
|
|
|
explicit Item(const QString &name, const QString &identifier = QString());
|
|
|
|
|
|
|
|
~Item();
|
|
|
|
|
|
|
|
void addItem(Item *item);
|
|
|
|
bool removeEvent(int eventId);
|
|
|
|
void setEventListChanged();
|
|
|
|
const QString path() const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PassiveEventContainer *getPevcon();
|
|
|
|
const EventGraphicList getCurrentEGLFromPevcon() const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void setParent(Item *parent);
|
|
|
|
|
|
|
|
const QString &getName() const;
|
|
|
|
void setName(const QString &name) { m_name = name; }
|
|
|
|
const QString &getIdentifier() const { return m_identifier; }
|
|
|
|
|
|
|
|
ItemList *getChildren();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Item *getParent() const;
|
|
|
|
|
|
|
|
void addEvent(Event *event);
|
|
|
|
|
|
|
|
EventList getFullEventList(bool recursive = true, bool getHiddenEvents = false) const;
|
|
|
|
|
|
|
|
ItemList getFullItemList(bool recursive = true) const;
|
|
|
|
|
|
|
|
Item *child(int row) const;
|
|
|
|
|
|
|
|
int indexOfParent() const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int childCount() const;
|
|
|
|
int visibleChildCount() const;
|
|
|
|
bool hasVisibleEvents() const;
|
|
|
|
|
|
|
|
private:
|
|
QString m_name;
|
|
QString m_identifier;
|
|
ItemList *m_children;
|
|
Item *m_parent;
|
|
PassiveEventContainer *m_pevcon;
|
|
EventList m_eventList;
|
|
|
|
|
|
bool m_eventListChanged;
|
|
};
|
|
|
|
}
|