DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
PlotWidget Class Reference

#include <PlotWidget.h>

Inheritance diagram for PlotWidget:
QCustomPlot

Public Member Functions

 PlotWidget (QWidget *widget=nullptr)
 
void setStatsPlot (StatsPlot *plt)
 
- Public Member Functions inherited from QCustomPlot
 QCustomPlot (QWidget *parent=0)
 
virtual ~QCustomPlot ()
 
QRect viewport () const
 
double bufferDevicePixelRatio () 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
 
QCP::SelectionRectMode selectionRectMode () const
 
QCPSelectionRectselectionRect () const
 
bool openGl () const
 
void setViewport (const QRect &rect)
 
void setBufferDevicePixelRatio (double ratio)
 
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)
 
void setSelectionRectMode (QCP::SelectionRectMode mode)
 
void setSelectionRect (QCPSelectionRect *selectionRect)
 
void setOpenGl (bool enabled, int multisampling=16)
 
QCPAbstractPlottableplottable (int index)
 
QCPAbstractPlottableplottable ()
 
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 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
 
QCPAxisRectaxisRectAt (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, int width=0, int height=0, QCP::ExportPen exportPen=QCP::epAllowCosmetic, 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, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch)
 
bool saveJpg (const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch)
 
bool saveBmp (const QString &fileName, int width=0, int height=0, double scale=1.0, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch)
 
bool saveRastered (const QString &fileName, int width, int height, double scale, const char *format, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch)
 
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::rpRefreshHint)
 

Protected Member Functions

void showEvent (QShowEvent *event) override
 
void hideEvent (QHideEvent *event) override
 
- Protected Member Functions inherited from QCustomPlot
virtual QSize minimumSizeHint () const Q_DECL_OVERRIDE
 
virtual QSize sizeHint () const Q_DECL_OVERRIDE
 
virtual void paintEvent (QPaintEvent *event) Q_DECL_OVERRIDE
 
virtual void resizeEvent (QResizeEvent *event) Q_DECL_OVERRIDE
 
virtual void mouseDoubleClickEvent (QMouseEvent *event) Q_DECL_OVERRIDE
 
virtual void mousePressEvent (QMouseEvent *event) Q_DECL_OVERRIDE
 
virtual void mouseMoveEvent (QMouseEvent *event) Q_DECL_OVERRIDE
 
virtual void mouseReleaseEvent (QMouseEvent *event) Q_DECL_OVERRIDE
 
virtual void wheelEvent (QWheelEvent *event) Q_DECL_OVERRIDE
 
virtual void draw (QCPPainter *painter)
 
virtual void updateLayout ()
 
virtual void axisRemoved (QCPAxis *axis)
 
virtual void legendRemoved (QCPLegend *legend)
 
virtual Q_SLOT void processRectSelection (QRect rect, QMouseEvent *event)
 
virtual Q_SLOT void processRectZoom (QRect rect, QMouseEvent *event)
 
virtual Q_SLOT void processPointSelection (QMouseEvent *event)
 
bool registerPlottable (QCPAbstractPlottable *plottable)
 
bool registerGraph (QCPGraph *graph)
 
bool registerItem (QCPAbstractItem *item)
 
void updateLayerIndices () const
 
QCPLayerablelayerableAt (const QPointF &pos, bool onlySelectable, QVariant *selectionDetails=0) const
 
QList< QCPLayerable * > layerableListAt (const QPointF &pos, bool onlySelectable, QList< QVariant > *selectionDetails=0) const
 
void drawBackground (QCPPainter *painter)
 
void setupPaintBuffers ()
 
QCPAbstractPaintBuffercreatePaintBuffer ()
 
bool hasInvalidatedPaintBuffers ()
 
bool setupOpenGl ()
 
void freeOpenGl ()
 

Additional Inherited Members

- Public Types inherited from QCustomPlot
enum  LayerInsertMode { limBelow, limAbove }
 
enum  RefreshPriority { rpImmediateRefresh, rpQueuedRefresh, rpRefreshHint, rpQueuedReplot }
 
- 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, int dataIndex, QMouseEvent *event)
 
void plottableDoubleClick (QCPAbstractPlottable *plottable, int dataIndex, 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 selectionChangedByUser ()
 
void beforeReplot ()
 
void afterReplot ()
 
- Public Attributes inherited from QCustomPlot
QCPAxisxAxis
 
QCPAxisyAxis
 
QCPAxisxAxis2
 
QCPAxisyAxis2
 
QCPLegendlegend
 
- Protected Attributes inherited from QCustomPlot
QRect mViewport
 
double mBufferDevicePixelRatio
 
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
 
QCP::SelectionRectMode mSelectionRectMode
 
QCPSelectionRectmSelectionRect
 
bool mOpenGl
 
QList< QSharedPointer< QCPAbstractPaintBuffer > > mPaintBuffers
 
QPoint mMousePressPos
 
bool mMouseHasMoved
 
QPointer< QCPLayerablemMouseEventLayerable
 
QPointer< QCPLayerablemMouseSignalLayerable
 
QVariant mMouseEventLayerableDetails
 
QVariant mMouseSignalLayerableDetails
 
bool mReplotting
 
bool mReplotQueued
 
int mOpenGlMultisamples
 
QCP::AntialiasedElements mOpenGlAntialiasedElementsBackup
 
bool mOpenGlCacheLabelsBackup
 

Constructor & Destructor Documentation

◆ PlotWidget()

PlotWidget::PlotWidget ( QWidget *  widget = nullptr)
inlineexplicit

Member Function Documentation

◆ hideEvent()

void PlotWidget::hideEvent ( QHideEvent *  event)
overrideprotected

◆ setStatsPlot()

void PlotWidget::setStatsPlot ( StatsPlot plt)
inline

◆ showEvent()

void PlotWidget::showEvent ( QShowEvent *  event)
overrideprotected

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