[Marble-devel] Review Request 114740: Add KML support for displaying ListStyle::backgroundColor inside the file view

Dennis Nienhüser earthwings at gentoo.org
Mon Dec 30 19:43:42 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/114740/#review46456
-----------------------------------------------------------



src/lib/marble/GeoDataTreeModel.cpp
<https://git.reviewboard.kde.org/r/114740/#comment33180>

    The style is a property of the container (parent folder or document), not the placemark. Therefore use this:
    
    +    } else if ( role == Qt::BackgroundRole ) {
    +        if ( object->nodeType() == GeoDataTypes::GeoDataPlacemarkType ) {
    +            GeoDataPlacemark *placemark = static_cast<GeoDataPlacemark*>( object );
    +            if ( placemark->parent() &&
    +                 ( placemark->parent()->nodeType() == GeoDataTypes::GeoDataFolderType ||
    +                   placemark->parent()->nodeType() == GeoDataTypes::GeoDataDocumentType ) ) {
    +                GeoDataContainer* container = static_cast<GeoDataContainer*>( placemark->parent() );
    +                return QVariant( QBrush( container->style()->listStyle().backgroundColor() ));
    +            }
    +        }
         }
    



src/lib/marble/geodata/handlers/kml/KmlStyleUrlTagHandler.cpp
<https://git.reviewboard.kde.org/r/114740/#comment33181>

    You must not change the style of children here, that would overwrite any style they have on their own. When using the parent's style (see comment above), the changes to this file are not needed however.
    


- Dennis Nienhüser


On Dec. 30, 2013, 5:15 p.m., Levente Kurusa wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/114740/
> -----------------------------------------------------------
> 
> (Updated Dec. 30, 2013, 5:15 p.m.)
> 
> 
> Review request for Marble and Torsten Rahn.
> 
> 
> Repository: marble
> 
> 
> Description
> -------
> 
> This is a GCI task: http://www.google-melange.com/gci/task/view/google/gci2013/5832784698408960
> 
> 
> Diffs
> -----
> 
>   src/lib/marble/geodata/handlers/kml/KmlStyleUrlTagHandler.cpp 38fee3e 
>   src/lib/marble/GeoDataTreeModel.cpp 36cb5a5 
> 
> Diff: https://git.reviewboard.kde.org/r/114740/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Levente Kurusa
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20131230/2467cff5/attachment-0001.html>


More information about the Marble-devel mailing list