all time-based panels are now derived from a common base class

Cuts down on a lot of duplicate code between
TimelineWidget/ViewerWidget/CurveWidget/NodeParamView
and TimelinePanel/ViewerPanel/CurvePanel/ParamPanel since they all use similar
time functions.
This commit is contained in:
itsmattkc
2020-02-01 19:39:43 +11:00
parent 5d58479f0a
commit 17c1493aa7
62 changed files with 1076 additions and 1042 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ TimeRuler::TimeRuler(bool text_visible, bool cache_status_visible, QWidget* pare
UpdateHeight();
}
const double &TimeRuler::scale()
const double &TimeRuler::GetScale()
{
return scale_;
}
@@ -174,7 +174,7 @@ void TimeRuler::paintEvent(QPaintEvent *)
}
if (short_interval < minimum_gap_between_lines_) {
if (long_interval == -1) {
if (long_interval <= 0) {
do {
short_interval *= 2;
} while (short_interval < minimum_gap_between_lines_);
+1 -1
View File
@@ -34,7 +34,7 @@ class TimeRuler : public QWidget
public:
TimeRuler(bool text_visible = true, bool cache_status_visible = false, QWidget* parent = nullptr);
const double& scale();
const double& GetScale();
void SetScale(const double& d);
void SetTimebase(const rational& r);