Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+54
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* provides draw-functionality for one or multiple events (created multiple times for each event which must be drawn)
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Mike Wille, SLSE, 2015-09-23
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "EventList.h"
|
||||
#include "Event.h"
|
||||
#include <LtsTimelineClassic/ltstimelineclassic_export.h>
|
||||
|
||||
namespace LtsTimelineClassic
|
||||
{
|
||||
|
||||
class LTSTIMELINECLASSIC_EXPORT EventGraphic
|
||||
{
|
||||
public:
|
||||
|
||||
enum Action
|
||||
{
|
||||
ACTION_LEFT_CLICKED,
|
||||
ACTION_RIGHT_CLICKED,
|
||||
ACTION_TOOLTIP,
|
||||
};
|
||||
|
||||
explicit EventGraphic(Event *event);
|
||||
|
||||
bool isMultipleEvent() const;
|
||||
|
||||
const QVector<Event *> eventList() const { return m_eventList; }
|
||||
void addEventList(const QVector<Event *> &eventList);
|
||||
void addEvent(Event *event);
|
||||
qint64 lowestTime() const;
|
||||
qint64 getDuration();
|
||||
|
||||
void drawEventGraphic(QPainter *painter, const QRect &rect) const;
|
||||
void drawDurationBackground(QPainter *painter, const QRect &rect) const;
|
||||
|
||||
|
||||
private:
|
||||
EventList m_eventList; // bool isMultipleEvent; <= when eventList.count > 1 !!
|
||||
// mutable for caches, because of speed reasons
|
||||
mutable qint64 m_lowest; // this is for speedup purpose
|
||||
mutable qint64 m_duration;
|
||||
bool m_isMultipleEvent;
|
||||
//qint64 highestTime;
|
||||
};
|
||||
|
||||
} // namespace LtsTimelineClassic
|
||||
Reference in new issue
Block a user