Logo Search packages:      
Sourcecode: pcp-gui version File versions

QwtPlotPicker Class Reference

#include <qwt_plot_picker.h>

Inheritance diagram for QwtPlotPicker:

QwtPicker QwtEventPattern QwtPlotZoomer

List of all members.


Detailed Description

QwtPlotPicker provides selections on a plot canvas.

QwtPlotPicker is a QwtPicker tailored for selections on a plot canvas. It is set to a x-Axis and y-Axis and translates all pixel coordinates into this coodinate system.

Definition at line 29 of file qwt_plot_picker.h.


Public Types

enum  DisplayMode { AlwaysOff, AlwaysOn, ActiveOnly }
enum  KeyPatternCode {
  KeySelect1, KeySelect2, KeyAbort, KeyLeft,
  KeyRight, KeyUp, KeyDown, KeyRedo,
  KeyUndo, KeyHome, KeyPatternCount
}
 Symbolic keyboard input codes. More...
enum  MousePatternCode {
  MouseSelect1, MouseSelect2, MouseSelect3, MouseSelect4,
  MouseSelect5, MouseSelect6, MousePatternCount
}
 Symbolic mouse input codes. More...
enum  RectSelectionType { CornerToCorner = 64, CenterToCorner = 128, CenterToRadius = 256 }
 Selection subtype for RectSelection This enum type describes the type of rectangle selections. It can be orīd with QwtPicker::RectSelectionType and QwtPicker::SelectionMode and passed to QwtPicker::setSelectionFlags().
  • CornerToCorner
    The first and the second selected point are the corners of the rectangle.
  • CenterToCorner
    The first point is the center, the second a corner of the rectangle.
  • CenterToRadius
    The first point is the center of a quadrat, calculated by the maximum of the x- and y-distance.
More...
enum  ResizeMode { Stretch, KeepSize }
enum  RubberBand {
  NoRubberBand = 0, HLineRubberBand, VLineRubberBand, CrossRubberBand,
  RectRubberBand, EllipseRubberBand, PolygonRubberBand, UserRubberBand = 100
}
enum  SelectionMode { ClickSelection = 1024, DragSelection = 2048 }
enum  SelectionType { NoSelection = 0, PointSelection = 1, RectSelection = 2, PolygonSelection = 4 }

Signals

void appended (const QPoint &pos)
void appended (const QwtDoublePoint &pos)
void changed (const QwtPolygon &pa)
void moved (const QPoint &pos)
void moved (const QwtDoublePoint &pos)
void selected (const QwtPolygon &pa)
void selected (const QwtArray< QwtDoublePoint > &pa)
void selected (const QwtDoubleRect &rect)
void selected (const QwtDoublePoint &pos)

Public Member Functions

const QwtPlotCanvascanvas () const
 Return Observed plot canvas.
QwtPlotCanvascanvas ()
 Return observed plot canvas.
virtual void drawRubberBand (QPainter *) const
virtual void drawTracker (QPainter *) const
virtual bool eventFilter (QObject *, QEvent *)
 Event filter.
void initKeyPattern ()
void initMousePattern (int numButtons)
bool isActive () const
bool isEnabled () const
bool keyMatch (uint pattern, const QKeyEvent *) const
 Compare a key event with an event pattern.
QwtArray< KeyPattern > & keyPattern ()
 Return Key patterns.
const QwtArray< KeyPattern > & keyPattern () const
 Return key patterns.
bool mouseMatch (uint pattern, const QMouseEvent *) const
 Compare a mouse event with an event pattern.
QwtArray< MousePattern > & mousePattern ()
 Return ,ouse patterns.
const QwtArray< MousePattern > & mousePattern () const
 Return mouse patterns.
const QWidget * parentWidget () const
 Return the parent widget, where the selection happens.
QWidget * parentWidget ()
 Return the parent widget, where the selection happens.
virtual QRect pickRect () const
const QwtPlotplot () const
 Return plot widget, containing the observed plot canvas.
QwtPlotplot ()
 Return plot widget, containing the observed plot canvas.
 QwtPlotPicker (int xAxis, int yAxis, int selectionFlags, RubberBand rubberBand, DisplayMode trackerMode, QwtPlotCanvas *)
 QwtPlotPicker (int xAxis, int yAxis, QwtPlotCanvas *)
 QwtPlotPicker (QwtPlotCanvas *)
 Create a plot picker.
ResizeMode resizeMode () const
RubberBand rubberBand () const
QPen rubberBandPen () const
const QwtPolygon & selection () const
 Return Selected points.
int selectionFlags () const
virtual void setAxis (int xAxis, int yAxis)
virtual void setEnabled (bool)
 En/disable the picker.
void setKeyPattern (const QwtArray< KeyPattern > &)
 Change the key event patterns.
void setKeyPattern (uint pattern, int key, int state=Qt::NoButton)
void setMousePattern (const QwtArray< MousePattern > &)
 Change the mouse event patterns.
void setMousePattern (uint pattern, int button, int state=Qt::NoButton)
virtual void setResizeMode (ResizeMode)
 Set the resize mode.
virtual void setRubberBand (RubberBand)
virtual void setRubberBandPen (const QPen &)
virtual void setSelectionFlags (int)
virtual void setTrackerFont (const QFont &)
virtual void setTrackerMode (DisplayMode)
 Set the display mode of the tracker.
virtual void setTrackerPen (const QPen &)
QFont trackerFont () const
DisplayMode trackerMode () const
QPen trackerPen () const
int xAxis () const
 Return x axis.
int yAxis () const
 Return y axis.

Protected Member Functions

virtual bool accept (QwtPolygon &selection) const
 Validate and fixup the selection.
virtual void append (const QPoint &)
virtual void begin ()
virtual bool end (bool ok=true)
QwtDoublePoint invTransform (const QPoint &) const
QwtDoubleRect invTransform (const QRect &) const
virtual bool keyMatch (const KeyPattern &, const QKeyEvent *) const
 Compare a key event with an event pattern.
virtual bool mouseMatch (const MousePattern &, const QMouseEvent *) const
 Compare a mouse event with an event pattern.
virtual void move (const QPoint &)
const QWidget * rubberBandWidget () const
QwtDoubleRect scaleRect () const
virtual QwtPickerMachinestateMachine (int) const
virtual void stretchSelection (const QSize &oldSize, const QSize &newSize)
QRect trackerRect (QPainter *painter) const
virtual QwtText trackerText (const QwtDoublePoint &) const
 Translate a position into a position string.
virtual QwtText trackerText (const QPoint &) const
const QWidget * trackerWidget () const
QPoint transform (const QwtDoublePoint &) const
QRect transform (const QwtDoubleRect &) const
virtual void transition (const QEvent *)
virtual void updateDisplay ()
virtual void widgetKeyPressEvent (QKeyEvent *)
virtual void widgetKeyReleaseEvent (QKeyEvent *)
virtual void widgetLeaveEvent (QEvent *)
virtual void widgetMouseDoubleClickEvent (QMouseEvent *)
virtual void widgetMouseMoveEvent (QMouseEvent *)
virtual void widgetMousePressEvent (QMouseEvent *)
virtual void widgetMouseReleaseEvent (QMouseEvent *)
virtual void widgetWheelEvent (QWheelEvent *)

Properties

bool isEnabled
ResizeMode resizeMode
RubberBand rubberBand
QPen rubberBandPen
int selectionFlags
QFont trackerFont
DisplayMode trackerMode
QPen trackerPen

Private Attributes

int d_xAxis
int d_yAxis

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index