Skip to content

Commit ecaade2

Browse files
committed
fix build with Qwt6
1 parent e35b115 commit ecaade2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/app/qgsrasterlayerproperties.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -1523,7 +1523,11 @@ void QgsRasterLayerProperties::refreshHistogram()
15231523
if ( ! mHistoPicker )
15241524
{
15251525
mHistoPicker = new QwtPlotPicker( mpPlot->canvas() );
1526+
#if (QWT_VERSION>=0x060000)
1527+
mHistoPicker->setStateMachine(new QwtPickerDragPointMachine);
1528+
#else
15261529
mHistoPicker->setSelectionFlags( QwtPicker::PointSelection | QwtPicker::DragSelection );
1530+
#endif
15271531
// mHistoPicker->setTrackerMode( QwtPicker::ActiveOnly );
15281532
mHistoPicker->setTrackerMode( QwtPicker::AlwaysOff );
15291533
mHistoPicker->setRubberBand( QwtPicker::VLineRubberBand );
@@ -1535,7 +1539,11 @@ void QgsRasterLayerProperties::refreshHistogram()
15351539
if ( ! mHistoZoomer )
15361540
{
15371541
mHistoZoomer = new QwtPlotZoomer( mpPlot->canvas() );
1542+
#if (QWT_VERSION>=0x060000)
1543+
mHistoZoomer->setStateMachine(new QwtPickerDragRectMachine);
1544+
#else
15381545
mHistoZoomer->setSelectionFlags( QwtPicker::RectSelection | QwtPicker::DragSelection );
1546+
#endif
15391547
mHistoZoomer->setTrackerMode( QwtPicker::AlwaysOff );
15401548
mHistoZoomer->setEnabled( true );
15411549
}
@@ -2218,7 +2226,7 @@ QString findClosestTickVal( double target, QwtScaleDiv * scale, int div = 100 )
22182226
return QString::number( closest );
22192227
}
22202228

2221-
void QgsRasterLayerProperties::histoPickerSelected( const QwtDoublePoint & pos )
2229+
void QgsRasterLayerProperties::histoPickerSelected( const QPointF & pos )
22222230
{
22232231
if ( btnHistoMin->isChecked() )
22242232
{

src/app/qgsrasterlayerproperties.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class QgsRasterLayerProperties : public QDialog, private Ui::QgsRasterLayerPrope
114114
void on_btnHistoMin_toggled();
115115
void on_btnHistoMax_toggled();
116116
/** Called when a selection has been made using the plot picker. */
117-
void histoPickerSelected( const QwtDoublePoint & );
117+
void histoPickerSelected( const QPointF & );
118118
/** Various actions that are stored in btnHistoActions. */
119119
void histoActionTriggered( QAction* );
120120
/** Draw the min/max markers on the histogram plot. */

0 commit comments

Comments
 (0)