Skip to content

Commit

Permalink
Comment cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
chris5287 committed Mar 20, 2014
1 parent 8a6b9db commit 090fa83
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 7 additions & 0 deletions QMapControl/Samples/Multidemo/src/multidemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

// QMapControl includes.
#include <QMapControl/GeometryLineString.h>
#include <QMapControl/GeometryPointArrow.h>
#include <QMapControl/GeometryPointCircle.h>
#include <QMapControl/GeometryPointWidget.h>
#include <QMapControl/GeometryPolygon.h>
Expand Down Expand Up @@ -133,6 +134,12 @@ void Multidemo::setupMaps()
layer_geometries->addGeometry(m_gps_point);


// Create a GeometryArrow with a heading set.
std::shared_ptr<GeometryPointArrow> arrow_point(std::make_shared<GeometryPointArrow>(QPointF(-20.0, 20.0), 0, 15, QPen(Qt::red)));
arrow_point->setHeading(92.4);
layer_geometries->addGeometry(arrow_point);


// Create a GeometryPoint with a PushButton widget.
QPushButton* pb = new QPushButton("test button", m_map_control);
std::shared_ptr<GeometryPoint> widget_point(std::make_shared<GeometryPointWidget>(QPointF(-20.0, -20.0), pb));
Expand Down
3 changes: 1 addition & 2 deletions QMapControl/src/QMapControl/Geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
namespace qmapcontrol
{
Geometry::Geometry(const GeometryType& geometry_type, const QPen& pen, const int& zoom_minimum, const int& zoom_maximum)
:
m_visible(true),
: m_visible(true),
m_geometry_type(geometry_type),
m_pen(pen),
m_zoom_minimum(zoom_minimum),
Expand Down
4 changes: 1 addition & 3 deletions QMapControl/src/QMapControl/QMapControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1171,9 +1171,8 @@ namespace qmapcontrol
// Should we draw the scalebar?
if(m_scalebar_enabled)
{
/// @todo This currently only shows the correct scale at the equator!
/// @todo This currently only shows the correct scale at the equator when in Spherical Mercator mode!

/// @todo calculate scalebar instead of hardcode? also support different measurements? (metric (meter/kilometer) and imperial (mile/nautical mile)).
// Default list of scalebar distances.
QList<double> scalebar_distances;
scalebar_distances << 5000000.0
Expand Down Expand Up @@ -1201,7 +1200,6 @@ namespace qmapcontrol
{
// Calculate the length of the scalebar line in pixels.
/// @todo remove magic numbers!
/// @todo 18!!!!
const double scalebar_line_length_px = scalebar_distances.at(m_current_zoom) / std::pow(2.0, 18 - m_current_zoom) / 0.597164;

// Draw the scalebar line.
Expand Down

0 comments on commit 090fa83

Please sign in to comment.