started timeruler object

This commit is contained in:
itsmattkc
2019-07-24 01:53:24 -07:00
parent 2e41f6d8f0
commit 501110c328
10 changed files with 186 additions and 15 deletions
+39
View File
@@ -0,0 +1,39 @@
#ifndef TIMERULER_H
#define TIMERULER_H
#include <QWidget>
#include "common/rational.h"
class TimeRuler : public QWidget
{
Q_OBJECT
public:
TimeRuler(bool text_visible = true, QWidget* parent = nullptr);
void SetTextVisible(bool e);
void SetScale(double d);
void SetTimebase(const rational& r);
protected:
virtual void paintEvent(QPaintEvent* e) override;
private:
int text_height_;
int width_of_second_;
int minimum_gap_between_lines_;
int scroll_;
bool text_visible_;
double scale_;
rational time_base_;
};
#endif // TIMERULER_H