Skip to content

Commit

Permalink
establish that Qwt 6.1 is not currently supported with internal QwtPo…
Browse files Browse the repository at this point in the history
…lar (closes #7495)
  • Loading branch information
jef-n committed Apr 6, 2013
1 parent ff51b2c commit 04119d8
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 23 deletions.
8 changes: 4 additions & 4 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Quantum GIS (QGIS)
Building QGIS from source - step by step
Tuesday April 02, 2013
Saturday April 06, 2013


Last Updated: Tuesday April 02, 2013
Last Change : Saturday December 08, 2012
Last Updated: Saturday April 06, 2013
Last Change : Saturday April 06, 2013


1. Introduction
Expand Down Expand Up @@ -103,7 +103,7 @@ Required build deps:
- GEOS >= 3.0
- Sqlite3 >= 3.0.0
- GDAL/OGR >= 1.4.x
- Qwt >= 5.0
- Qwt >= 5.0 & < 6.1
- expat >= 1.95

Optional dependencies:
Expand Down
12 changes: 6 additions & 6 deletions doc/INSTALL.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Quantum GIS (QGIS)</TITLE>

<!-- Included style.css -->
<!-- Included doc/style.css -->
<STYLE TYPE="text/css">
body{ background: white;
color: black;
Expand Down Expand Up @@ -77,13 +77,13 @@
<DIV CLASS="header" ID="header">
<H1>Quantum GIS (QGIS)</H1>
<H2>Building QGIS from source - step by step</H2>
<H3>Tuesday April 02, 2013</H3>
<H3>Saturday April 06, 2013</H3>
</DIV>

<DIV CLASS="body" ID="body">
<P>
Last Updated: Tuesday April 02, 2013
Last Change : Saturday December 08, 2012
Last Updated: Saturday April 06, 2013
Last Change : Saturday April 06, 2013
</P>
<DIV CLASS="toc">

Expand Down Expand Up @@ -210,7 +210,7 @@ <H1>2. Overview</H1>
<LI>GEOS &gt;= 3.0
<LI>Sqlite3 &gt;= 3.0.0
<LI>GDAL/OGR &gt;= 1.4.x
<LI>Qwt &gt;= 5.0
<LI>Qwt &gt;= 5.0 &amp; &lt; 6.1
<LI>expat &gt;= 1.95
</UL>

Expand Down Expand Up @@ -3234,5 +3234,5 @@ <H1>9. Authors and Acknowledgments</H1>

</DIV>
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -t html -o INSTALL.html INSTALL.t2t -->
<!-- cmdline: txt2tags -o doc/INSTALL.html -t html doc/INSTALL.t2t -->
</BODY></HTML>
1 change: 1 addition & 0 deletions doc/msys.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -380,3 +380,4 @@ copy contents of pgsql directory from the archive to ``c:\msys\local``

We're done with preparation of MSYS environment. Now you can delete all stuff in ``c:\msys\local\src`` - it takes quite a lot
of space and it's not necessary at all.

1 change: 1 addition & 0 deletions doc/osx.t2t
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@


= Building on MacOS X =

In this approach I will try to avoid as much as possible building dependencies
Expand Down
2 changes: 1 addition & 1 deletion doc/overview.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Required build deps:
- GEOS >= 3.0
- Sqlite3 >= 3.0.0
- GDAL/OGR >= 1.4.x
- Qwt >= 5.0
- Qwt >= 5.0 & (< 6.1 with internal QwtPolar)
- expat >= 1.95
-

Expand Down
4 changes: 4 additions & 0 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ IF(WITH_INTERNAL_QWTPOLAR)

SET(QWTPOLAR_INCLUDE_DIR gps/qwtpolar-0.1)
ELSE(QWT_VERSION_STR VERSION_LESS "6.0.0")
IF(NOT QWT_VERSION_STR VERSION_LESS "6.1.0")
MESSAGE(FATAL_ERROR "Internal QwtPolar does not support Qwt 6.1 and above")
ENDIF(NOT QWT_VERSION_STR VERSION_LESS "6.1.0")

SET(QGIS_APP_SRCS
${QGIS_APP_SRCS}
gps/qwtpolar-1.0/qwt_polar_canvas.cpp
Expand Down
33 changes: 21 additions & 12 deletions src/gui/raster/qgsrasterhistogramwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,9 +841,9 @@ void QgsRasterHistogramWidget::on_btnHistoMax_toggled()

// local function used by histoPickerSelected(), to get a rounded picked value
// this is sensitive and may not always be correct, needs more testing
QString findClosestTickVal( double target, QwtScaleDiv * scale, int div = 100 )
QString findClosestTickVal( double target, const QwtScaleDiv * scale, int div = 100 )
{
if ( scale == NULL ) return "";
if ( !scale ) return "";

QList< double > minorTicks = scale->ticks( QwtScaleDiv::MinorTick );
QList< double > majorTicks = scale->ticks( QwtScaleDiv::MajorTick );
Expand Down Expand Up @@ -875,17 +875,26 @@ QString findClosestTickVal( double target, QwtScaleDiv * scale, int div = 100 )

void QgsRasterHistogramWidget::histoPickerSelected( const QPointF & pos )
{
if ( btnHistoMin->isChecked() )
if ( btnHistoMin->isChecked() || btnHistoMax->isChecked() )
{
leHistoMin->setText( findClosestTickVal( pos.x(), mpPlot->axisScaleDiv( QwtPlot::xBottom ) ) );
applyHistoMin();
btnHistoMin->setChecked( false );
}
else if ( btnHistoMax->isChecked() )
{
leHistoMax->setText( findClosestTickVal( pos.x(), mpPlot->axisScaleDiv( QwtPlot::xBottom ) ) );
applyHistoMax();
btnHistoMax->setChecked( false );
#if defined(QWT_VERSION) && QWT_VERSION>=0x060100
const QwtScaleDiv * scale = &mpPlot->axisScaleDiv( QwtPlot::xBottom );
#else
const QwtScaleDiv * scale = mpPlot->axisScaleDiv( QwtPlot::xBottom );
#endif

if ( btnHistoMin->isChecked() )
{
leHistoMin->setText( findClosestTickVal( pos.x(), scale ) );
applyHistoMin();
btnHistoMin->setChecked( false );
}
else if ( btnHistoMax->isChecked() )
{
leHistoMax->setText( findClosestTickVal( pos.x(), scale ) );
applyHistoMax();
btnHistoMax->setChecked( false );
}
}
if ( QApplication::overrideCursor() )
QApplication::restoreOverrideCursor();
Expand Down

0 comments on commit 04119d8

Please sign in to comment.