Exemplo n.º 1
0
void PlotPropertiesGUI::consistCurveTab(const QString &name)
{
    QwtPlotCurve *plotCurve = internalCurves.value(name)->plotCurve;

    QwtSymbol symbol = plotCurve->symbol();
    ui->symbolSizeSpinBox->setValue( symbol.size().width() );
    ui->curveSymbolCombo->setCurrentIndex( (int)symbol.style() + 1); // Starts in -1
    // Fixes bug built when used 'plotCurve->symbol()'
    plotCurve->setSymbol(symbol);

    ui->curveWidthSpinBox->setValue( plotCurve->pen().width() );
    ui->curveStyleCombo->setCurrentIndex( (int)plotCurve->style() );
    ui->lineStylecombo->setCurrentIndex( (int)plotCurve->pen().style() );

    ui->curveColorButton->setStyleSheet(QString("  border-radius: 4px; "
            "border: 1px solid rgb(0, 0, 0); background-color: %1")
            .arg(plotCurve->pen().color().name()));
}