CurveEditor: Use std::array where applicable

Allows simplifying how redo/undo data gets moved around and also
eliminates a few hardcoded magic values for sizes.
This commit is contained in:
Lioncash
2019-08-25 05:42:24 -04:00
parent bc8218e183
commit b1ab67f8c2
2 changed files with 82 additions and 57 deletions

View File

@@ -1,5 +1,7 @@
#pragma once
#include <array>
#include "EditorWidget.hpp"
#include <QFrame>
#include <QLabel>
@@ -15,8 +17,8 @@ class CurveView : public QWidget {
friend class CurveControls;
amuse::ObjToken<ProjectModel::CurveNode> m_node;
QFont m_gridFont;
QStaticText m_percentTexts[11];
QStaticText m_percentTextsCenter[11];
std::array<QStaticText, 11> m_percentTexts;
std::array<QStaticText, 11> m_percentTextsCenter;
CurveEditor* getEditor() const;
public: