コード例 #1
0
void EditPolylineDialog::updatePolyline()
{
    d->m_placemark->setDescription( d->m_description->toPlainText() );
    d->m_placemark->setName( d->m_name->text() );


    GeoDataStyle *newStyle = new GeoDataStyle( *d->m_placemark->style() );
    newStyle->lineStyle().setColor( d->m_linesDialog->currentColor() );
    newStyle->lineStyle().setWidth( d->m_linesWidth->value() );
    d->m_placemark->setStyle( newStyle );

    emit polylineUpdated( d->m_placemark );
}
コード例 #2
0
ファイル: EditPolygonDialog.cpp プロジェクト: calincru/marble
void EditPolygonDialog::updatePolygon()
{
    GeoDataStyle *style = new GeoDataStyle( *d->m_placemark->style() );

    d->m_placemark->setName( d->m_name->text() );
    d->m_placemark->setDescription( d->m_description->toPlainText() );

    style->lineStyle().setWidth( d->m_linesWidth->value() );
    // 0 corresponds to "Filled" and 1 corresponds to "Not Filled".
    style->polyStyle().setFill( !d->m_filledColor->currentIndex() );


    // Adjust the lines/polygon colors.
    // QColorDialog::currentColor() also works even if the color dialog
    // has not been exec'ed, while QColorDialog::selectedColor() does not.
    style->lineStyle().setColor( d->m_linesDialog->currentColor() );
    style->polyStyle().setColor( d->m_polyDialog->currentColor() );


    d->m_placemark->setStyle( style );
    emit polygonUpdated( d->m_placemark );
}