Vespucci  1.0.0
MapPlot Class Reference

The MapPlot class A subclass of QCustomPlot for handling a specfic kind of color map. Provides a wrapper for a QCPColorScale and a QCPColorMap which are child widgets. More...

#include <mapplot.h>

Inheritance diagram for MapPlot:
QCustomPlot

Signals

void SpectrumRequested (size_t index)
 
void SpectrumHoldRequested (size_t index)
 
void CoordinatesChanged (double x, double y, double z)
 
- Signals inherited from QCustomPlot
void mouseDoubleClick (QMouseEvent *event)
 
void mousePress (QMouseEvent *event)
 
void mouseMove (QMouseEvent *event)
 
void mouseRelease (QMouseEvent *event)
 
void mouseWheel (QWheelEvent *event)
 
void plottableClick (QCPAbstractPlottable *plottable, QMouseEvent *event)
 
void plottableDoubleClick (QCPAbstractPlottable *plottable, QMouseEvent *event)
 
void itemClick (QCPAbstractItem *item, QMouseEvent *event)
 
void itemDoubleClick (QCPAbstractItem *item, QMouseEvent *event)
 
void axisClick (QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event)
 
void axisDoubleClick (QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event)
 
void legendClick (QCPLegend *legend, QCPAbstractLegendItem *item, QMouseEvent *event)
 
void legendDoubleClick (QCPLegend *legend, QCPAbstractLegendItem *item, QMouseEvent *event)
 
void titleClick (QMouseEvent *event, QCPPlotTitle *title)
 
void titleDoubleClick (QMouseEvent *event, QCPPlotTitle *title)
 
void selectionChangedByUser ()
 
void beforeReplot ()
 
void afterReplot ()
 

Public Member Functions

 MapPlot (QWidget *parent=0)
 
void SetMapData (const vec &x, const vec &y, const vec &z)
 MapPlot::SetMapData. More...
 
void SetColorScale (QCPColorScale *scale)
 
void SetGradient (QCPColorGradient gradient)
 
void SetGlobalColorGradient (Vespucci::GlobalGradient gradient)
 
void CenterCrosshairs ()
 MapPlot::CenterCrosshairs Positions the crosshairs in the center of the map. More...
 
uword GetCrosshairPosition (double &x, double &y, double &z)
 MapPlot::GetCrossHairPosition. More...
 
uword GetCrosshairPosition ()
 
double min () const
 
double max () const
 
void rescaleDataRange (bool onlyVisibleMaps=false)
 
void setDataRange (const QCPRange &dataRange)
 
void ColorScaleVisible (bool visible)
 
void CrossHairsVisible (bool visible)
 
void SetFonts (const QFont &font)
 
void SetColorScaleLabel (const QString &label_text)
 
QString ColorScaleLabel () const
 
void SetColorScaleTickCount (int ticks)
 
void SetColorScaleTicks (double min, double max, size_t count)
 
void SetClusterTicks (size_t count)
 
void setInterpolate (bool interpolate)
 
bool interpolate () const
 
int keySize ()
 
int valueSize ()
 
QCPRange keyRange ()
 
QCPRange valueRange ()
 
void ShowCrosshairs (bool show)
 
void MoveVerticalCrosshair (int units)
 MapPlot::MoveVerticalCrosshair. More...
 
void MoveHorizontalCrosshair (int units)
 MapPlot::MoveHorizontalCrosshair. More...
 
void SaveImage (QString filename)
 
void CenterAtZero ()
 
- Public Member Functions inherited from QCustomPlot
 QCustomPlot (QWidget *parent=0)
 
virtual ~QCustomPlot ()
 
QRect viewport () const
 
QPixmap background () const
 
bool backgroundScaled () const
 
Qt::AspectRatioMode backgroundScaledMode () const
 
QCPLayoutGridplotLayout () const
 
QCP::AntialiasedElements antialiasedElements () const
 
QCP::AntialiasedElements notAntialiasedElements () const
 
bool autoAddPlottableToLegend () const
 
const QCP::Interactions interactions () const
 
int selectionTolerance () const
 
bool noAntialiasingOnDrag () const
 
QCP::PlottingHints plottingHints () const
 
Qt::KeyboardModifier multiSelectModifier () const
 
void setViewport (const QRect &rect)
 
void setBackground (const QPixmap &pm)
 
void setBackground (const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding)
 
void setBackground (const QBrush &brush)
 
void setBackgroundScaled (bool scaled)
 
void setBackgroundScaledMode (Qt::AspectRatioMode mode)
 
void setAntialiasedElements (const QCP::AntialiasedElements &antialiasedElements)
 
void setAntialiasedElement (QCP::AntialiasedElement antialiasedElement, bool enabled=true)
 
void setNotAntialiasedElements (const QCP::AntialiasedElements &notAntialiasedElements)
 
void setNotAntialiasedElement (QCP::AntialiasedElement notAntialiasedElement, bool enabled=true)
 
void setAutoAddPlottableToLegend (bool on)
 
void setInteractions (const QCP::Interactions &interactions)
 
void setInteraction (const QCP::Interaction &interaction, bool enabled=true)
 
void setSelectionTolerance (int pixels)
 
void setNoAntialiasingOnDrag (bool enabled)
 
void setPlottingHints (const QCP::PlottingHints &hints)
 
void setPlottingHint (QCP::PlottingHint hint, bool enabled=true)
 
void setMultiSelectModifier (Qt::KeyboardModifier modifier)
 
QCPAbstractPlottableplottable (int index)
 
QCPAbstractPlottableplottable ()
 
bool addPlottable (QCPAbstractPlottable *plottable)
 
bool removePlottable (QCPAbstractPlottable *plottable)
 
bool removePlottable (int index)
 
int clearPlottables ()
 
int plottableCount () const
 
QList< QCPAbstractPlottable * > selectedPlottables () const
 
QCPAbstractPlottableplottableAt (const QPointF &pos, bool onlySelectable=false) const
 
bool hasPlottable (QCPAbstractPlottable *plottable) const
 
QCPGraphgraph (int index) const
 
QCPGraphgraph () const
 
QCPGraphaddGraph (QCPAxis *keyAxis=0, QCPAxis *valueAxis=0)
 
bool removeGraph (QCPGraph *graph)
 
bool removeGraph (int index)
 
int clearGraphs ()
 
int graphCount () const
 
QList< QCPGraph * > selectedGraphs () const
 
QCPAbstractItemitem (int index) const
 
QCPAbstractItemitem () const
 
bool addItem (QCPAbstractItem *item)
 
bool removeItem (QCPAbstractItem *item)
 
bool removeItem (int index)
 
int clearItems ()
 
int itemCount () const
 
QList< QCPAbstractItem * > selectedItems () const
 
QCPAbstractItemitemAt (const QPointF &pos, bool onlySelectable=false) const
 
bool hasItem (QCPAbstractItem *item) const
 
QCPLayerlayer (const QString &name) const
 
QCPLayerlayer (int index) const
 
QCPLayercurrentLayer () const
 
bool setCurrentLayer (const QString &name)
 
bool setCurrentLayer (QCPLayer *layer)
 
int layerCount () const
 
bool addLayer (const QString &name, QCPLayer *otherLayer=0, LayerInsertMode insertMode=limAbove)
 
bool removeLayer (QCPLayer *layer)
 
bool moveLayer (QCPLayer *layer, QCPLayer *otherLayer, LayerInsertMode insertMode=limAbove)
 
int axisRectCount () const
 
QCPAxisRectaxisRect (int index=0) const
 
QList< QCPAxisRect * > axisRects () const
 
QCPLayoutElementlayoutElementAt (const QPointF &pos) const
 
Q_SLOT void rescaleAxes (bool onlyVisiblePlottables=false)
 
QList< QCPAxis * > selectedAxes () const
 
QList< QCPLegend * > selectedLegends () const
 
Q_SLOT void deselectAll ()
 
bool savePdf (const QString &fileName, bool noCosmeticPen=false, int width=0, int height=0, const QString &pdfCreator=QString(), const QString &pdfTitle=QString())
 
bool savePng (const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1)
 
bool saveJpg (const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1)
 
bool saveBmp (const QString &fileName, int width=0, int height=0, double scale=1.0)
 
bool saveRastered (const QString &fileName, int width, int height, double scale, const char *format, int quality=-1)
 
QPixmap toPixmap (int width=0, int height=0, double scale=1.0)
 
void toPainter (QCPPainter *painter, int width=0, int height=0)
 
Q_SLOT void replot (QCustomPlot::RefreshPriority refreshPriority=QCustomPlot::rpHint)
 

Additional Inherited Members

- Public Types inherited from QCustomPlot
enum  LayerInsertMode { limBelow, limAbove }
 
enum  RefreshPriority { rpImmediate, rpQueued, rpHint }
 
- Public Attributes inherited from QCustomPlot
QCPAxisxAxis
 
QCPAxisyAxis
 
QCPAxisxAxis2
 
QCPAxisyAxis2
 
QCPLegendlegend
 
- Protected Member Functions inherited from QCustomPlot
virtual QSize minimumSizeHint () const
 
virtual QSize sizeHint () const
 
virtual void paintEvent (QPaintEvent *event)
 
virtual void resizeEvent (QResizeEvent *event)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void wheelEvent (QWheelEvent *event)
 
virtual void draw (QCPPainter *painter)
 
virtual void axisRemoved (QCPAxis *axis)
 
virtual void legendRemoved (QCPLegend *legend)
 
void updateLayerIndices () const
 
QCPLayerablelayerableAt (const QPointF &pos, bool onlySelectable, QVariant *selectionDetails=0) const
 
void drawBackground (QCPPainter *painter)
 
- Protected Attributes inherited from QCustomPlot
QRect mViewport
 
QCPLayoutGridmPlotLayout
 
bool mAutoAddPlottableToLegend
 
QList< QCPAbstractPlottable * > mPlottables
 
QList< QCPGraph * > mGraphs
 
QList< QCPAbstractItem * > mItems
 
QList< QCPLayer * > mLayers
 
QCP::AntialiasedElements mAntialiasedElements
 
QCP::AntialiasedElements mNotAntialiasedElements
 
QCP::Interactions mInteractions
 
int mSelectionTolerance
 
bool mNoAntialiasingOnDrag
 
QBrush mBackgroundBrush
 
QPixmap mBackgroundPixmap
 
QPixmap mScaledBackgroundPixmap
 
bool mBackgroundScaled
 
Qt::AspectRatioMode mBackgroundScaledMode
 
QCPLayermCurrentLayer
 
QCP::PlottingHints mPlottingHints
 
Qt::KeyboardModifier mMultiSelectModifier
 
QPixmap mPaintBuffer
 
QPoint mMousePressPos
 
QPointer< QCPLayoutElementmMouseEventElement
 
bool mReplotting
 

Detailed Description

The MapPlot class A subclass of QCustomPlot for handling a specfic kind of color map. Provides a wrapper for a QCPColorScale and a QCPColorMap which are child widgets.

Definition at line 33 of file mapplot.h.

Constructor & Destructor Documentation

MapPlot::MapPlot ( QWidget *  parent = 0)

Definition at line 22 of file mapplot.cpp.

Member Function Documentation

void MapPlot::CenterAtZero ( )

Definition at line 254 of file mapplot.cpp.

void MapPlot::CenterCrosshairs ( )

MapPlot::CenterCrosshairs Positions the crosshairs in the center of the map.

Definition at line 136 of file mapplot.cpp.

QString MapPlot::ColorScaleLabel ( ) const

Definition at line 314 of file mapplot.cpp.

void MapPlot::ColorScaleVisible ( bool  visible)

Definition at line 275 of file mapplot.cpp.

void MapPlot::CoordinatesChanged ( double  x,
double  y,
double  z 
)
signal
void MapPlot::CrossHairsVisible ( bool  visible)

Definition at line 280 of file mapplot.cpp.

uword MapPlot::GetCrosshairPosition ( double &  x,
double &  y,
double &  z 
)

MapPlot::GetCrossHairPosition.

Parameters
x
y
z
Returns
Get the index of the spectrum the crosshairs are centered on

Definition at line 167 of file mapplot.cpp.

uword MapPlot::GetCrosshairPosition ( )

Definition at line 176 of file mapplot.cpp.

bool MapPlot::interpolate ( ) const

Definition at line 358 of file mapplot.cpp.

QCPRange MapPlot::keyRange ( )

Definition at line 373 of file mapplot.cpp.

int MapPlot::keySize ( )

Definition at line 363 of file mapplot.cpp.

double MapPlot::max ( ) const

Definition at line 197 of file mapplot.cpp.

double MapPlot::min ( ) const

Definition at line 192 of file mapplot.cpp.

void MapPlot::MoveHorizontalCrosshair ( int  units)

MapPlot::MoveHorizontalCrosshair.

Parameters
unitsmoves the horizontal crosshair up or down by a multiple of the y step

Definition at line 228 of file mapplot.cpp.

void MapPlot::MoveVerticalCrosshair ( int  units)

MapPlot::MoveVerticalCrosshair.

Parameters
unitsMoves the vertical crosshair left or right by a multiple of the x step

Definition at line 206 of file mapplot.cpp.

void MapPlot::rescaleDataRange ( bool  onlyVisibleMaps = false)

Definition at line 263 of file mapplot.cpp.

void MapPlot::SaveImage ( QString  filename)

Definition at line 246 of file mapplot.cpp.

void MapPlot::SetClusterTicks ( size_t  count)

Definition at line 334 of file mapplot.cpp.

void MapPlot::SetColorScale ( QCPColorScale scale)

Definition at line 112 of file mapplot.cpp.

void MapPlot::SetColorScaleLabel ( const QString &  label_text)

Definition at line 308 of file mapplot.cpp.

void MapPlot::SetColorScaleTickCount ( int  ticks)

Definition at line 319 of file mapplot.cpp.

void MapPlot::SetColorScaleTicks ( double  min,
double  max,
size_t  count 
)

Definition at line 324 of file mapplot.cpp.

void MapPlot::setDataRange ( const QCPRange dataRange)

Definition at line 268 of file mapplot.cpp.

void MapPlot::SetFonts ( const QFont &  font)

Definition at line 286 of file mapplot.cpp.

void MapPlot::SetGlobalColorGradient ( Vespucci::GlobalGradient  gradient)

Definition at line 126 of file mapplot.cpp.

void MapPlot::SetGradient ( QCPColorGradient  gradient)

Definition at line 119 of file mapplot.cpp.

void MapPlot::setInterpolate ( bool  interpolate)

Definition at line 353 of file mapplot.cpp.

void MapPlot::SetMapData ( const vec &  x,
const vec &  y,
const vec &  z 
)

MapPlot::SetMapData.

Parameters
x
y
zThrows an exception when vectors do not have equal sizes

Definition at line 77 of file mapplot.cpp.

void MapPlot::ShowCrosshairs ( bool  show)

Definition at line 383 of file mapplot.cpp.

void MapPlot::SpectrumHoldRequested ( size_t  index)
signal
void MapPlot::SpectrumRequested ( size_t  index)
signal
QCPRange MapPlot::valueRange ( )

Definition at line 378 of file mapplot.cpp.

int MapPlot::valueSize ( )

Definition at line 368 of file mapplot.cpp.


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