本文整理汇总了C++中Marker::time方法的典型用法代码示例。如果您正苦于以下问题:C++ Marker::time方法的具体用法?C++ Marker::time怎么用?C++ Marker::time使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Marker
的用法示例。
在下文中一共展示了Marker::time方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addData
void MapView::addData(const QTime &time, qreal lat, qreal lon, const QStringList &metadata)
{
// Add marker
Marker *marker = new Marker(time, lat, lon, metadata);
marker->setZValue(2);
markers.append(marker);
qSort(markers.begin(), markers.end(), markerLessThan);
geo_map->addMapObject(marker);
geo_map->setCenter(marker->coordinate());
QStringList md = marker->metadata();
md.prepend(marker->time().toString());
emit markerClicked(md);
// Add point to track
QList<QGeoCoordinate> path;
foreach (const Marker *marker, markers)
path.append(marker->coordinate());
track->setPath(path);
// QGeoMapPolylineObject cannot be added to map if it's empty
if (!path.isEmpty() && !geo_map->mapObjects().contains(track))
geo_map->addMapObject(track);
}
示例2: addMarkerInOrder
static void addMarkerInOrder( std::vector< Marker > & markers,
const Marker & addme )
{
std::vector< Marker >::iterator it = markers.begin();
while( it != markers.end() && it->time() < addme.time() )
{
++it;
}
markers.insert( it, addme );
}
示例3: warpTime
// ---------------------------------------------------------------------------
// dilate
// ---------------------------------------------------------------------------
//! Compute a new time for the specified Marker using
//! warpTime(), exactly as Partial Breakpoint times are
//! recomputed. This can be used to dilate the Markers
//! corresponding to a collection of Partials.
//!
//! \param m is the Marker whose time should be recomputed.
//
void
Dilator::dilate( Marker & m ) const
{
m.setTime( warpTime( m.time() ) );
}