summaryrefslogtreecommitdiffstats
path: root/src/curveeditor/detail/curveeditorstyledialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/curveeditor/detail/curveeditorstyledialog.cpp')
-rw-r--r--src/curveeditor/detail/curveeditorstyledialog.cpp30
1 files changed, 25 insertions, 5 deletions
diff --git a/src/curveeditor/detail/curveeditorstyledialog.cpp b/src/curveeditor/detail/curveeditorstyledialog.cpp
index fc34737..7f2e288 100644
--- a/src/curveeditor/detail/curveeditorstyledialog.cpp
+++ b/src/curveeditor/detail/curveeditorstyledialog.cpp
@@ -65,7 +65,6 @@ CurveEditorStyleDialog::CurveEditorStyleDialog(CurveEditorStyle &style, QWidget
, m_valueAxisWidth(new QDoubleSpinBox())
, m_valueOffsetTop(new QDoubleSpinBox())
, m_valueOffsetBottom(new QDoubleSpinBox())
- , m_playhead(new ColorControl(style.playheadColor))
, m_handleSize(new QDoubleSpinBox())
, m_handleLineWidth(new QDoubleSpinBox())
, m_handleColor(new ColorControl(style.handleStyle.color))
@@ -76,6 +75,11 @@ CurveEditorStyleDialog::CurveEditorStyleDialog(CurveEditorStyle &style, QWidget
, m_curveWidth(new QDoubleSpinBox())
, m_curveColor(new ColorControl(style.curveStyle.color))
, m_curveSelectionColor(new ColorControl(style.curveStyle.selectionColor))
+ , m_treeMargins(new QDoubleSpinBox())
+ , m_playheadWidth(new QDoubleSpinBox())
+ , m_playheadRadius(new QDoubleSpinBox())
+ , m_playheadColor(new ColorControl(style.playhead.color))
+
{
m_canvasMargin->setValue(style.canvasMargin);
m_zoomInWidth->setValue(style.zoomInWidth);
@@ -90,6 +94,9 @@ CurveEditorStyleDialog::CurveEditorStyleDialog(CurveEditorStyle &style, QWidget
m_handleLineWidth->setValue(style.handleStyle.lineWidth);
m_keyframeSize->setValue(style.keyframeStyle.size);
m_curveWidth->setValue(style.curveStyle.width);
+ m_treeMargins->setValue(style.treeItemStyle.margins);
+ m_playheadWidth->setValue(style.playhead.width);
+ m_playheadRadius->setValue(style.playhead.radius);
connect(m_printButton, &QPushButton::released, this, &CurveEditorStyleDialog::printStyle);
@@ -115,7 +122,6 @@ CurveEditorStyleDialog::CurveEditorStyleDialog(CurveEditorStyle &style, QWidget
connect(m_valueAxisWidth, doubleSignal, doubleChanged);
connect(m_valueOffsetTop, doubleSignal, doubleChanged);
connect(m_valueOffsetBottom, doubleSignal, doubleChanged);
- connect(m_playhead, &ColorControl::valueChanged, colorChanged);
connect(m_handleSize, doubleSignal, doubleChanged);
connect(m_handleLineWidth, doubleSignal, doubleChanged);
connect(m_handleColor, &ColorControl::valueChanged, colorChanged);
@@ -126,6 +132,10 @@ CurveEditorStyleDialog::CurveEditorStyleDialog(CurveEditorStyle &style, QWidget
connect(m_curveWidth, doubleSignal, doubleChanged);
connect(m_curveColor, &ColorControl::valueChanged, colorChanged);
connect(m_curveSelectionColor, &ColorControl::valueChanged, colorChanged);
+ connect(m_treeMargins, doubleSignal, doubleChanged);
+ connect(m_playheadWidth, doubleSignal, doubleChanged);
+ connect(m_playheadRadius, doubleSignal, doubleChanged);
+ connect(m_playheadColor, &ColorControl::valueChanged, colorChanged);
auto *box = new QVBoxLayout;
box->addLayout(createRow("Background Color", m_background));
@@ -143,7 +153,6 @@ CurveEditorStyleDialog::CurveEditorStyleDialog(CurveEditorStyle &style, QWidget
box->addLayout(createRow("Value Axis Width", m_valueAxisWidth));
box->addLayout(createRow("Value Axis Top Offset", m_valueOffsetTop));
box->addLayout(createRow("Value Axis Bottom Offset", m_valueOffsetBottom));
- box->addLayout(createRow("Playhead Color", m_playhead));
box->addLayout(createRow("Handle Size", m_handleSize));
box->addLayout(createRow("Handle Line Width", m_handleLineWidth));
box->addLayout(createRow("Handle Color", m_handleColor));
@@ -154,6 +163,10 @@ CurveEditorStyleDialog::CurveEditorStyleDialog(CurveEditorStyle &style, QWidget
box->addLayout(createRow("Curve Width", m_curveWidth));
box->addLayout(createRow("Curve Color", m_curveColor));
box->addLayout(createRow("Curve Selection Color", m_curveSelectionColor));
+ box->addLayout(createRow("Treeview margins", m_treeMargins));
+ box->addLayout(createRow("Playhead width", m_playheadWidth));
+ box->addLayout(createRow("Playhead radius", m_playheadRadius));
+ box->addLayout(createRow("Playhead color", m_playheadColor));
box->addWidget(m_printButton);
setLayout(box);
@@ -177,7 +190,6 @@ CurveEditorStyle CurveEditorStyleDialog::style() const
style.valueAxisWidth = m_valueAxisWidth->value();
style.valueOffsetTop = m_valueOffsetTop->value();
style.valueOffsetBottom = m_valueOffsetBottom->value();
- style.playheadColor = m_playhead->value();
style.handleStyle.size = m_handleSize->value();
style.handleStyle.lineWidth = m_handleLineWidth->value();
style.handleStyle.color = m_handleColor->value();
@@ -188,6 +200,11 @@ CurveEditorStyle CurveEditorStyleDialog::style() const
style.curveStyle.width = m_curveWidth->value();
style.curveStyle.color = m_curveColor->value();
style.curveStyle.selectionColor = m_curveSelectionColor->value();
+ style.treeItemStyle.margins = m_treeMargins->value();
+ style.playhead.width = m_playheadWidth->value();
+ style.playhead.radius = m_playheadRadius->value();
+ style.playhead.color = m_playheadColor->value();
+
return style;
}
@@ -224,7 +241,6 @@ void CurveEditorStyleDialog::printStyle()
qDebug().nospace() << "out.valueAxisWidth = " << s.valueAxisWidth << ";";
qDebug().nospace() << "out.valueOffsetTop = " << s.valueOffsetTop << ";";
qDebug().nospace() << "out.valueOffsetBottom = " << s.valueOffsetBottom << ";";
- qDebug().nospace() << "out.playheadColor = " << toString(s.playheadColor) << ";";
qDebug().nospace() << "out.handleStyle.size = " << s.handleStyle.size << ";";
qDebug().nospace() << "out.handleStyle.lineWidth = " << s.handleStyle.lineWidth << ";";
qDebug().nospace() << "out.handleStyle.color = " << toString(s.handleStyle.color) << ";";
@@ -238,6 +254,10 @@ void CurveEditorStyleDialog::printStyle()
qDebug().nospace() << "out.curveStyle.color = " << toString(s.curveStyle.color) << ";";
qDebug().nospace() << "out.curveStyle.selectionColor = "
<< toString(s.curveStyle.selectionColor) << ";";
+ qDebug().nospace() << "out.treeItemStyle.margins = " << s.treeItemStyle.margins << ";";
+ qDebug().nospace() << "out.playheadStyle.width = " << s.playhead.width << ";";
+ qDebug().nospace() << "out.playheadStyle.radius = " << s.playhead.radius << ";";
+ qDebug().nospace() << "out.playheadStyle.color = " << toString(s.playhead.color) << ";";
qDebug().nospace() << "return out;";
qDebug() << "";
}