mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 23:24:02 +00:00
Changes for qt for Linux
[SVN r68856]
This commit is contained in:
parent
0425fe649f
commit
a6883f4ca2
@ -32,8 +32,6 @@
|
||||
#include <boost/geometry/extensions/gis/io/wkt/wkt.hpp>
|
||||
|
||||
|
||||
#include "qt_mapper.hpp"
|
||||
|
||||
|
||||
// Adapt a QPointF such that it can be handled by Boost.Geometry
|
||||
BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET(QPointF, double, cs::cartesian, x, y, setX, setY)
|
||||
@ -53,7 +51,7 @@ typedef boost::geometry::model::multi_polygon
|
||||
class WorldMapper : public QWidget
|
||||
{
|
||||
public:
|
||||
WorldMapper(std::vector<country_type> const& countries, boost::geometry::model::box<point_2d> const& box, QWidget *parent = 0)
|
||||
WorldMapper(std::vector<country_type> const& countries, boost::geometry::model::box<point_2d> const& box)
|
||||
: m_countries(countries)
|
||||
, m_box(box)
|
||||
{
|
||||
@ -62,7 +60,7 @@ class WorldMapper : public QWidget
|
||||
}
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event)
|
||||
void paintEvent(QPaintEvent*)
|
||||
{
|
||||
map_transformer_type transformer(m_box, this->width(), this->height());
|
||||
|
||||
|
@ -5,13 +5,10 @@
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
|
||||
Qt World Mapper example
|
||||
|
||||
It will show a basic Qt Widget, displaying world countries
|
||||
|
||||
|
||||
To compile this program:
|
||||
|
||||
Install Qt (if not done before)
|
||||
@ -25,4 +22,10 @@ Using MSVC:
|
||||
- alternatively you can include Boost and/or Qt in your standard include path
|
||||
|
||||
Using Linux/gcc
|
||||
|
||||
- install Qt with sudo apt-get install libqt4-dev
|
||||
- run qmake -project
|
||||
- edit the generated file "with_external_libs.pro" and delete all lines but the x06_qt_world_mapper.cpp
|
||||
- run qmake
|
||||
- edit the generated Makefile, if necessary, and add -I../../../.. to include Boost and Boost.Geometry
|
||||
- run make
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user