+ move to QT 5.x (requirement!)
This commit is contained in:
parent
d416d17ae9
commit
eaef041c85
5 changed files with 8 additions and 41 deletions
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
// qt
|
||||
#include <QApplication>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QStringList>
|
||||
#include <QSettings>
|
||||
#include <mapnik/datasource_cache.hpp>
|
||||
|
|
|
@ -32,7 +32,10 @@
|
|||
#include <QSlider>
|
||||
#include <QComboBox>
|
||||
#include <QDoubleSpinBox>
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QMenu>
|
||||
#include <QMenuBar>
|
||||
#include <QToolBar>
|
||||
// mapnik
|
||||
|
||||
#ifndef Q_MOC_RUN // QT moc chokes on BOOST_JOIN
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#define MAINWINDOW_HPP
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QPrinter>
|
||||
#include <QList>
|
||||
#include <QActionGroup>
|
||||
#include <QStatusBar>
|
||||
|
@ -78,7 +77,6 @@ private:
|
|||
LayerTab *layerTab_;
|
||||
StyleTab * styleTab_;
|
||||
MapWidget * mapWidget_;
|
||||
QPrinter printer;
|
||||
//actions
|
||||
QList<QAction *> exportAsActs;
|
||||
QActionGroup *toolsGroup;
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include <mapnik/agg_renderer.hpp>
|
||||
#include <mapnik/graphics.hpp>
|
||||
#include <mapnik/grid/grid_renderer.hpp>
|
||||
#include <mapnik/layer.hpp>
|
||||
#include <mapnik/projection.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)
|
||||
{
|
||||
unsigned width=map.width();
|
||||
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";
|
||||
}
|
||||
std::cerr << "Not supported" << std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
# Mapnik viewer - Copyright (C) 2007 Artem Pavlenko
|
||||
######################################################################
|
||||
TEMPLATE = app
|
||||
QT += core gui widgets
|
||||
QMAKE_CXX = clang++
|
||||
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 --ldflags --dep-libs)
|
||||
QMAKE_LFLAGS += -lboost_timer
|
||||
|
|
Loading…
Reference in a new issue