signalPicker = new PlotPicker( canvas() );
signalPicker
->setRubberBandPen
( QColor( Qt
::gray ) );
signalPicker
->setMousePattern
( QwtEventPattern::MouseSelect1, Qt
::LeftButton );
signalPicker
->setMousePattern
( QwtEventPattern::MouseSelect2, Qt
::LeftButton, Qt
::ControlModifier );
signalPicker
->setMousePattern
( QwtEventPattern::MouseSelect3, Qt
::RightButton );
signalPicker
->setMousePattern
( QwtEventPattern::MouseSelect4, Qt
::RightButton, Qt
::ControlModifier );
signalPicker->setEnabled( false );
connect( signalPicker, SIGNAL( selected( QwtDoublePoint) ), this, SLOT( setSelectedPoint( QwtDoublePoint ) ) );
connect( signalPicker, SIGNAL( setLeft() ), this, SLOT( setSignalLeft() ) );
connect( signalPicker, SIGNAL( setRight() ), this, SLOT( setSignalRight() ) );
connect( signalPicker, SIGNAL( clearLeft() ), this, SLOT( resetSignalLeft() ) );
connect( signalPicker, SIGNAL( clearRight() ), this, SLOT( resetSignalRight() ) );
signalPicker = new PlotPicker( canvas() );
signalPicker->setSelectionFlags( QwtPicker::PointSelection | QwtPicker::ClickSelection );
signalPicker->setRubberBandPen( QColor( Qt::gray ) );
signalPicker->setMousePattern( QwtEventPattern::MouseSelect1, Qt::LeftButton );
signalPicker->setMousePattern( QwtEventPattern::MouseSelect2, Qt::LeftButton, Qt::ControlModifier );
signalPicker->setMousePattern( QwtEventPattern::MouseSelect3, Qt::RightButton );
signalPicker->setMousePattern( QwtEventPattern::MouseSelect4, Qt::RightButton, Qt::ControlModifier );
signalPicker->setEnabled( false );
connect( signalPicker, SIGNAL( selected( QwtDoublePoint) ), this, SLOT( setSelectedPoint( QwtDoublePoint ) ) );
connect( signalPicker, SIGNAL( setLeft() ), this, SLOT( setSignalLeft() ) );
connect( signalPicker, SIGNAL( setRight() ), this, SLOT( setSignalRight() ) );
connect( signalPicker, SIGNAL( clearLeft() ), this, SLOT( resetSignalLeft() ) );
connect( signalPicker, SIGNAL( clearRight() ), this, SLOT( resetSignalRight() ) );
To copy to clipboard, switch view to plain text mode
Bookmarks