+ move to QT 5.x (requirement!)
This commit is contained in:
parent
c127757cd6
commit
4775428dc0
5 changed files with 8 additions and 41 deletions
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
|
|
||||||
// qt
|
// qt
|
||||||
#include <QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <mapnik/datasource_cache.hpp>
|
#include <mapnik/datasource_cache.hpp>
|
||||||
|
|
|
@ -32,7 +32,10 @@
|
||||||
#include <QSlider>
|
#include <QSlider>
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QDoubleSpinBox>
|
#include <QDoubleSpinBox>
|
||||||
|
#include <QFileDialog>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QMenuBar>
|
||||||
|
#include <QToolBar>
|
||||||
// mapnik
|
// mapnik
|
||||||
|
|
||||||
#ifndef Q_MOC_RUN // QT moc chokes on BOOST_JOIN
|
#ifndef Q_MOC_RUN // QT moc chokes on BOOST_JOIN
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
#define MAINWINDOW_HPP
|
#define MAINWINDOW_HPP
|
||||||
|
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QPrinter>
|
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QActionGroup>
|
#include <QActionGroup>
|
||||||
#include <QStatusBar>
|
#include <QStatusBar>
|
||||||
|
@ -78,7 +77,6 @@ private:
|
||||||
LayerTab *layerTab_;
|
LayerTab *layerTab_;
|
||||||
StyleTab * styleTab_;
|
StyleTab * styleTab_;
|
||||||
MapWidget * mapWidget_;
|
MapWidget * mapWidget_;
|
||||||
QPrinter printer;
|
|
||||||
//actions
|
//actions
|
||||||
QList<QAction *> exportAsActs;
|
QList<QAction *> exportAsActs;
|
||||||
QActionGroup *toolsGroup;
|
QActionGroup *toolsGroup;
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
|
|
||||||
#include <mapnik/agg_renderer.hpp>
|
#include <mapnik/agg_renderer.hpp>
|
||||||
#include <mapnik/graphics.hpp>
|
#include <mapnik/graphics.hpp>
|
||||||
#include <mapnik/grid/grid_renderer.hpp>
|
|
||||||
#include <mapnik/layer.hpp>
|
#include <mapnik/layer.hpp>
|
||||||
#include <mapnik/projection.hpp>
|
#include <mapnik/projection.hpp>
|
||||||
#include <mapnik/scale_denominator.hpp>
|
#include <mapnik/scale_denominator.hpp>
|
||||||
|
@ -528,42 +527,7 @@ void render_agg(mapnik::Map const& map, double scaling_factor, QPixmap & pix)
|
||||||
|
|
||||||
void render_grid(mapnik::Map const& map, double scaling_factor, QPixmap & pix)
|
void render_grid(mapnik::Map const& map, double scaling_factor, QPixmap & pix)
|
||||||
{
|
{
|
||||||
unsigned width=map.width();
|
std::cerr << "Not supported" << std::endl;
|
||||||
unsigned height=map.height();
|
|
||||||
|
|
||||||
mapnik::grid buf(width,height,"F_CODE", 1);
|
|
||||||
mapnik::grid_renderer<mapnik::grid> ren(map,buf,scaling_factor);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
ren.apply();
|
|
||||||
mapnik::value_integer * imdata = static_cast<mapnik::value_integer*>(buf.raw_data());
|
|
||||||
|
|
||||||
// Not sure how to display long long values ??
|
|
||||||
//QImage image(width,height,QImage::Format_RGB32);
|
|
||||||
//for (unsigned i = 0 ; i < height ; ++i)
|
|
||||||
//{
|
|
||||||
// for (unsigned j = 0 ; j < width ; ++j)
|
|
||||||
// {
|
|
||||||
// image.setPixel(j,i,qRgb((uint8_t)(imdata[i*width+j]>>8),
|
|
||||||
// (uint8_t)(imdata[i*width+j+1]>>8),
|
|
||||||
// (uint8_t)(imdata[i*width+j+2]>>8)));
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//pix = QPixmap::fromImage(image);
|
|
||||||
}
|
|
||||||
catch (mapnik::config_error & ex)
|
|
||||||
{
|
|
||||||
std::cerr << ex.what() << std::endl;
|
|
||||||
}
|
|
||||||
catch (const std::exception & ex)
|
|
||||||
{
|
|
||||||
std::cerr << "exception: " << ex.what() << std::endl;
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
std::cerr << "Unknown exception caught!\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,10 @@
|
||||||
# Mapnik viewer - Copyright (C) 2007 Artem Pavlenko
|
# Mapnik viewer - Copyright (C) 2007 Artem Pavlenko
|
||||||
######################################################################
|
######################################################################
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
QT += core gui widgets
|
||||||
QMAKE_CXX = clang++
|
QMAKE_CXX = clang++
|
||||||
QMAKE_CXXFLAGS += $$system(mapnik-config --cxxflags)
|
QMAKE_CXXFLAGS += $$system(mapnik-config --cxxflags)
|
||||||
|
QMAKE_CXXFLAGS += $$system(mapnik-config --includes --dep-includes)
|
||||||
QMAKE_LFLAGS += $$system(mapnik-config --libs)
|
QMAKE_LFLAGS += $$system(mapnik-config --libs)
|
||||||
QMAKE_LFLAGS += $$system(mapnik-config --ldflags --dep-libs)
|
QMAKE_LFLAGS += $$system(mapnik-config --ldflags --dep-libs)
|
||||||
QMAKE_LFLAGS += -lboost_timer
|
QMAKE_LFLAGS += -lboost_timer
|
||||||
|
|
Loading…
Reference in a new issue