Isis 3 Programmer Reference
Isis::HistogramItem Class Reference

This is the (qwt) plot item for a histogram. More...

#include <HistogramItem.h>

Inheritance diagram for Isis::HistogramItem:
Inheritance graph
Collaboration diagram for Isis::HistogramItem:
Collaboration graph

Classes

class  PrivateData
 

Public Types

enum  HistogramAttribute { Auto = 0 , Xfy = 1 }
 

Public Member Functions

 HistogramItem (const QString &title=QString::null)
 Constructor 2.
 
 HistogramItem (const QwtText &title)
 Constructor 1.
 
virtual ~HistogramItem ()
 Destructor.
 
void setData (const QwtIntervalSeriesData &data)
 Overridden method to set the data in the histogram.
 
const QwtIntervalSeriesData & data () const
 Returns this item's data.
 
QList< QPointF > getVertices () const
 This method returns a list of points which are the vertices of the selected area (by the rubberband) on the cvp.
 
void setVertices (const QList< QPoint > &points)
 This method sets the vertices of the selected area on the cvp.
 
CubeViewportgetViewPort () const
 This method returns the cube view port associated with the curve.
 
void setViewPort (CubeViewport *cvp)
 This method sets the view port.
 
void setColor (const QColor &)
 Set the color of the hist.
 
QColor color () const
 Return the color of the item.
 
virtual QRectF boundingRect () const
 Returns the bounding rectangle of the item.
 
virtual int rtti () const
 
virtual void draw (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &) const
 
void setBaseline (double reference)
 
double baseline () const
 Returns the baseline.
 
void setHistogramAttribute (HistogramAttribute, bool on=true)
 
bool testHistogramAttribute (HistogramAttribute) const
 

Protected Member Functions

virtual void drawBar (QPainter *, Qt::Orientation o, const QRect &) const
 This method draws the bars of the bar graph.
 

Private Member Functions

void init ()
 Initialization method.
 

Private Attributes

PrivateDatad_data
 
QList< QPointF > p_pointList
 List of data points.
 
CubeViewportp_cvp
 Viewport the data is from.
 

Detailed Description

This is the (qwt) plot item for a histogram.

This draws bars for each of the histogram bins.

Author
????-??-?? Unknown

Definition at line 24 of file HistogramItem.h.

Member Enumeration Documentation

◆ HistogramAttribute

enum Isis::HistogramItem::HistogramAttribute

Definition at line 52 of file HistogramItem.h.

Constructor & Destructor Documentation

◆ HistogramItem() [1/2]

Isis::HistogramItem::HistogramItem ( const QString & title = QString::null)
explicit

Constructor 2.

Parameters
title

Definition at line 47 of file HistogramItem.cpp.

References init().

◆ HistogramItem() [2/2]

Isis::HistogramItem::HistogramItem ( const QwtText & title)
explicit

Constructor 1.

Parameters
title

Definition at line 36 of file HistogramItem.cpp.

References init().

◆ ~HistogramItem()

Isis::HistogramItem::~HistogramItem ( )
virtual

Destructor.

Definition at line 56 of file HistogramItem.cpp.

Member Function Documentation

◆ baseline()

double Isis::HistogramItem::baseline ( ) const

Returns the baseline.

Returns
double

Definition at line 98 of file HistogramItem.cpp.

Referenced by draw().

◆ boundingRect()

QRectF Isis::HistogramItem::boundingRect ( ) const
virtual

Returns the bounding rectangle of the item.

Returns
QwtDoubleRect

Definition at line 157 of file HistogramItem.cpp.

◆ color()

QColor Isis::HistogramItem::color ( ) const

Return the color of the item.

Returns
QColor

Definition at line 146 of file HistogramItem.cpp.

Referenced by drawBar(), and setColor().

◆ data()

const QwtIntervalSeriesData & Isis::HistogramItem::data ( ) const

Returns this item's data.

Returns

Definition at line 121 of file HistogramItem.cpp.

Referenced by draw(), and setData().

◆ draw()

void Isis::HistogramItem::draw ( QPainter * painter,
const QwtScaleMap & xMap,
const QwtScaleMap & yMap,
const QRectF &  ) const
virtual
Parameters
painter
xMap
yMap

Definition at line 234 of file HistogramItem.cpp.

References baseline(), data(), and drawBar().

◆ drawBar()

void Isis::HistogramItem::drawBar ( QPainter * painter,
Qt::Orientation o,
const QRect & rect ) const
protectedvirtual

This method draws the bars of the bar graph.

Parameters
painter
rect

Definition at line 309 of file HistogramItem.cpp.

References color().

Referenced by draw().

◆ getVertices()

QList< QPointF > Isis::HistogramItem::getVertices ( ) const

This method returns a list of points which are the vertices of the selected area (by the rubberband) on the cvp.

Returns
QList<QPoint>

Definition at line 358 of file HistogramItem.cpp.

References p_pointList.

◆ getViewPort()

CubeViewport * Isis::HistogramItem::getViewPort ( ) const

This method returns the cube view port associated with the curve.

Returns
CubeViewport*

Definition at line 384 of file HistogramItem.cpp.

References p_cvp.

Referenced by setVertices().

◆ init()

void Isis::HistogramItem::init ( )
private

Initialization method.

Definition at line 65 of file HistogramItem.cpp.

Referenced by HistogramItem(), and HistogramItem().

◆ rtti()

int Isis::HistogramItem::rtti ( ) const
virtual
Returns
int

Definition at line 188 of file HistogramItem.cpp.

◆ setBaseline()

void Isis::HistogramItem::setBaseline ( double reference)
Parameters
reference

Definition at line 84 of file HistogramItem.cpp.

◆ setColor()

void Isis::HistogramItem::setColor ( const QColor & color)

Set the color of the hist.

item.

Parameters
color

Definition at line 132 of file HistogramItem.cpp.

References color().

Referenced by Isis::HistogramWidget::HistogramWidget().

◆ setData()

void Isis::HistogramItem::setData ( const QwtIntervalSeriesData & data)

Overridden method to set the data in the histogram.

Parameters
data

Definition at line 109 of file HistogramItem.cpp.

References data().

Referenced by Isis::HistogramWidget::setHistogram().

◆ setHistogramAttribute()

void Isis::HistogramItem::setHistogramAttribute ( HistogramAttribute attribute,
bool on = true )
Parameters
attribute
on

Definition at line 200 of file HistogramItem.cpp.

◆ setVertices()

void Isis::HistogramItem::setVertices ( const QList< QPoint > & points)

This method sets the vertices of the selected area on the cvp.

Parameters
points

Definition at line 368 of file HistogramItem.cpp.

References getViewPort(), p_pointList, and Isis::CubeViewport::viewportToCube().

◆ setViewPort()

void Isis::HistogramItem::setViewPort ( CubeViewport * cvp)

This method sets the view port.

Parameters
cvp

Definition at line 393 of file HistogramItem.cpp.

References p_cvp.

◆ testHistogramAttribute()

bool Isis::HistogramItem::testHistogramAttribute ( HistogramAttribute attribute) const
Parameters
attribute
Returns
bool

Definition at line 221 of file HistogramItem.cpp.

Member Data Documentation

◆ d_data

PrivateData* Isis::HistogramItem::d_data
private

Definition at line 68 of file HistogramItem.h.

◆ p_cvp

CubeViewport* Isis::HistogramItem::p_cvp
private

Viewport the data is from.

Definition at line 70 of file HistogramItem.h.

Referenced by getViewPort(), and setViewPort().

◆ p_pointList

QList<QPointF> Isis::HistogramItem::p_pointList
private

List of data points.

Definition at line 69 of file HistogramItem.h.

Referenced by getVertices(), and setVertices().


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