[Marble-commits] KDE/kdeedu/marble/src/lib
Dennis Nienhüser
earthwings at gentoo.org
Mon Jan 17 21:38:23 CET 2011
SVN commit 1215151 by nienhueser:
Show the feature description in a tooltip.
M +8 -0 GeoDataTreeModel.cpp
--- trunk/KDE/kdeedu/marble/src/lib/GeoDataTreeModel.cpp #1215150:1215151
@@ -233,6 +233,14 @@
GeoDataFeature *feature = static_cast<GeoDataFeature*>( object );
return QVariant(feature->style()->iconStyle().icon());
}
+ } else if ( role == Qt::ToolTipRole
+ && index.column() == 0 ) {
+ if ( object->nodeType() == GeoDataTypes::GeoDataPlacemarkType
+ || object->nodeType() == GeoDataTypes::GeoDataFolderType
+ || object->nodeType() == GeoDataTypes::GeoDataDocumentType ) {
+ GeoDataFeature *feature = static_cast<GeoDataFeature*>( object );
+ return QVariant( feature->description() );
+ }
} else if ( role == MarblePlacemarkModel::ObjectPointerRole ) {
return qVariantFromValue( object );
} else if ( role == MarblePlacemarkModel::PopularityIndexRole ) {
More information about the Marble-commits
mailing list