12 #ifndef CXTIMELINEWIDGET_H_
13 #define CXTIMELINEWIDGET_H_
15 #include "cxResourceWidgetsExport.h"
47 void setEvents(std::vector<TimelineEvent> events);
49 void setRange(
double start,
double stop);
50 void setPos(
double pos);
51 double getPos()
const;
54 void positionChanged();
59 virtual bool event(QEvent *event);
60 virtual void mousePressEvent(QMouseEvent* event);
61 virtual void mouseReleaseEvent(QMouseEvent* event);
62 virtual void mouseMoveEvent(QMouseEvent* event);
63 virtual void resizeEvent(QResizeEvent* evt);
64 virtual void paintEvent(QPaintEvent* event);
65 virtual QSize sizeHint()
const;
66 QSize minimumSizeHint()
const;
69 int mapTime2PlotX(
double time)
const;
70 double mapPlotX2Time(
int plotX)
const;
71 bool showHelp(QPoint pos);
73 void setPositionFromScreenPos(
int x,
int y);
74 void createCompactingTransforms();
75 double findCompactedTime(
double timeInterval,
double totalUsedTime,
double totalTime)
const;
78 std::vector<TimelineEvent> mEvents;
80 double mStart, mStop, mPos;
85 QStringList mContinousEvents;
86 std::vector<TimelineEvent> mNoncompactedIntervals;