112 lines
1.4 KiB
C++
Executable File
112 lines
1.4 KiB
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "EventTools.h"
|
|
#include "LineMap.h"
|
|
#include <QWidget>
|
|
#include <QPoint>
|
|
#include <QPair>
|
|
|
|
|
|
namespace NGL
|
|
{
|
|
class INGLLogger;
|
|
|
|
}
|
|
class QPushButton;
|
|
class QLabel;
|
|
class QComboBox;
|
|
|
|
|
|
namespace LtsTimelineClassic
|
|
{
|
|
|
|
|
|
|
|
class TimelineIndicator : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
|
|
static const int s_TimeTextDistanceTolerancePixels = 10;
|
|
static const int s_pbSize = 18;
|
|
|
|
public:
|
|
explicit TimelineIndicator(QWidget *parent);
|
|
~TimelineIndicator();
|
|
qint64 zoomFactorPoints() const { return m_zoomFactorPoints * 1000; }
|
|
|
|
|
|
|
|
void refreshData();
|
|
|
|
private:
|
|
QVector<qint64> m_timeArray;
|
|
qint64 m_zoomFactorPoints;
|
|
QPushButton *m_pbZoom;
|
|
QPushButton *m_pbUnzoom;
|
|
QComboBox *m_cbZoomLevel;
|
|
int m_currentTextHeight;
|
|
int m_currentTextWidth;
|
|
LineMap m_lineMap;
|
|
int m_sectionPos;
|
|
int m_sectionSize;
|
|
NGL::INGLLogger &m_logger;
|
|
|
|
protected:
|
|
|
|
|
|
void paintEvent(QPaintEvent *);
|
|
|
|
signals:
|
|
|
|
|
|
void signalSetTimelineRange(qint64 min, qint64 max);
|
|
|
|
|
|
|
|
void signalSetZoomFactor(qint64 zoomFactor);
|
|
|
|
|
|
|
|
void signalResetLineList();
|
|
|
|
|
|
|
|
void signalAddLine(int posX, qint64 time);
|
|
|
|
void signalZoomChanged();
|
|
|
|
|
|
private slots:
|
|
void afterZoom();
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
void slotSectionResized(int logicalIndex, int oldSize, int newSize);
|
|
|
|
|
|
|
|
void slotZoom();
|
|
|
|
|
|
|
|
void slotUnzoom();
|
|
|
|
|
|
|
|
void slotResetLineList();
|
|
|
|
|
|
|
|
void slotAddLine(double posX, qint64 time);
|
|
|
|
};
|
|
|
|
}
|