Skip to content
Extraits de code Groupes Projets

Improve timingView with display of the ASS lines

Fermé Elliu a demandé de fusionner timingView-improve-rebased vers master
4 files
+ 6
2
Comparer les modifications
  • Côte à côte
  • En ligne

Fichiers

#ifndef VIVY_TIMING_AXIS_H
#define VIVY_TIMING_AXIS_H
#ifndef __cplusplus
#error "This is a C++ header"
#endif
#include "PreCompiledHeaders.hh"
#include <cmath>
namespace Vivy
{
class TimingAxis final : public QGraphicsObject {
Q_OBJECT
public:
explicit TimingAxis() noexcept;
~TimingAxis() noexcept override = default;
QRectF boundingRect() const override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
private:
static inline constexpr QColor axisColour = QColor(255, 220, 220);
QPen pen;
int penWidth{ 1 };
/*
* We use ints here because
* qPainter->drawLine() and qPainter->drawText()
* restrict us to ints anyways
*/
QVector<int> availableTicks = { 10, 100, 1000, 10000, 60000, 3600000, 86400000 };
int minBetweenMinor{ 10 };
int minorTicks;
int majorTicks;
int minorTicksHeight{ 3 };
int majorTicksHeight{ 7 };
int timeDigitsHeight{ 20 };
int timeDigitsMargin{ 3 };
protected:
public slots:
void refreshTicks();
};
}
#endif // VIVY_TIMING_AXIS_H
Chargement en cours