19 #include <QDoubleValidator> 21 #include <ui_CurveStyleConfigWidget.h> 34 buttonGroupSticksOrientation_(new QButtonGroup(this)),
38 ui_->lineEditSticksBaseline->setValidator(
new QDoubleValidator(
39 ui_->lineEditSticksBaseline));
41 ui_->checkBoxLinesInterpolate->setEnabled(
false);
42 ui_->radioButtonSticksOrientationHorizontal->setEnabled(
false);
43 ui_->radioButtonSticksOrientationVertical->setEnabled(
false);
44 ui_->labelSticksBaseline->setEnabled(
false);
45 ui_->lineEditSticksBaseline->setEnabled(
false);
46 ui_->checkBoxStepsInvert->setEnabled(
false);
49 ui_->radioButtonSticksOrientationHorizontal);
51 ui_->radioButtonSticksOrientationVertical);
53 connect(
ui_->radioButtonLines, SIGNAL(toggled(
bool)),
this,
55 connect(
ui_->radioButtonSticks, SIGNAL(toggled(
bool)),
this,
57 connect(
ui_->radioButtonSteps, SIGNAL(toggled(
bool)),
this,
59 connect(
ui_->radioButtonPoints, SIGNAL(toggled(
bool)),
this,
62 connect(
ui_->checkBoxLinesInterpolate, SIGNAL(stateChanged(
int)),
64 connect(
ui_->radioButtonSticksOrientationHorizontal, SIGNAL(toggled(
bool)),
66 connect(
ui_->radioButtonSticksOrientationVertical, SIGNAL(toggled(
bool)),
68 connect(
ui_->lineEditSticksBaseline, SIGNAL(editingFinished()),
70 connect(
ui_->checkBoxStepsInvert, SIGNAL(stateChanged(
int)),
73 connect(
ui_->spinBoxPenWidth, SIGNAL(valueChanged(
int)),
75 connect(
ui_->comboBoxPenStyle, SIGNAL(currentStyleChanged(
int)),
77 connect(
ui_->checkBoxRenderAntialias, SIGNAL(stateChanged(
int)),
92 disconnect(
config_, SIGNAL(typeChanged(
int)),
this,
93 SLOT(styleTypeChanged(
int)));
95 disconnect(
config_, SIGNAL(linesInterpolateChanged(
bool)),
97 disconnect(
config_, SIGNAL(sticksOrientationChanged(
int)),
99 disconnect(
config_, SIGNAL(sticksBaselineChanged(
double)),
101 disconnect(
config_, SIGNAL(stepsInvertChanged(
bool)),
104 disconnect(
config_, SIGNAL(penWidthChanged(
size_t)),
106 disconnect(
config_, SIGNAL(penStyleChanged(
int)),
108 disconnect(
config_, SIGNAL(renderAntialiasChanged(
bool)),
115 connect(config, SIGNAL(typeChanged(
int)),
this,
118 connect(config, SIGNAL(linesInterpolateChanged(
bool)),
120 connect(config, SIGNAL(sticksOrientationChanged(
int)),
122 connect(config, SIGNAL(sticksBaselineChanged(
double)),
124 connect(config, SIGNAL(stepsInvertChanged(
bool)),
127 connect(config, SIGNAL(penWidthChanged(
size_t)),
129 connect(config, SIGNAL(penStyleChanged(
int)),
131 connect(config, SIGNAL(renderAntialiasChanged(
bool)),
158 ui_->radioButtonSticks->setChecked(
true);
160 ui_->radioButtonSteps->setChecked(
true);
162 ui_->radioButtonPoints->setChecked(
true);
164 ui_->radioButtonLines->setChecked(
true);
168 ui_->checkBoxLinesInterpolate->setCheckState(interpolate ? Qt::Checked :
173 ui_->radioButtonSticksOrientationHorizontal->setChecked(
174 orientation == Qt::Horizontal);
175 ui_->radioButtonSticksOrientationVertical->setChecked(
176 orientation == Qt::Vertical);
180 ui_->lineEditSticksBaseline->setText(QString::number(baseline));
184 ui_->checkBoxStepsInvert->setCheckState(invert ? Qt::Checked :
189 ui_->spinBoxPenWidth->setValue(width);
193 ui_->comboBoxPenStyle->setCurrentStyle(static_cast<Qt::PenStyle>(style));
197 ui_->checkBoxRenderAntialias->setCheckState(antialias ? Qt::Checked :
202 ui_->checkBoxLinesInterpolate->setEnabled(checked);
209 ui_->radioButtonSticksOrientationHorizontal->setEnabled(checked);
210 ui_->radioButtonSticksOrientationVertical->setEnabled(checked);
211 ui_->labelSticksBaseline->setEnabled(checked);
212 ui_->lineEditSticksBaseline->setEnabled(checked);
219 ui_->checkBoxStepsInvert->setEnabled(checked);
bool isRenderAntialiased() const
double getSticksBaseline() const
void setLinesInterpolate(bool interpolate)
Qt::PenStyle getPenStyle() const
void setPenWidth(size_t width)
void setSticksBaseline(double baseline)
bool areStepsInverted() const
void setPenStyle(Qt::PenStyle style)
void setSticksOrientation(Qt::Orientation orientation)
Qt::Orientation getSticksOrientation() const
void setRenderAntialias(bool antialias)
void setStepsInvert(bool invert)
bool areLinesInterpolated() const
size_t getPenWidth() const