• Skip to content
  • Skip to link menu
KDE 4.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

digikam

Digikam::HistogramPainter

Digikam::HistogramPainter Class Reference

A class that paints a histogram on a QPixmap. More...

#include <histogrampainter.h>

Inheritance diagram for Digikam::HistogramPainter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 HistogramPainter (QObject *parent)
virtual ~HistogramPainter ()
void disableHistogramGuide ()
void enableHistogramGuideByColor (const DColor &color)
void initFrom (QWidget *widget)
void render (QPixmap &paintDevice)
void setChannelType (ChannelType channelType)
void setHighlightSelection (bool highlightSelection)
void setHistogram (ImageHistogram *histogram)
void setRenderXGrid (bool renderXGrid)
void setScale (HistogramScale scale)
void setSelection (double selectionMin, double selectionMax)

Detailed Description

A class that paints a histogram on a QPixmap.

Attention: Before first usage of the render method, you must call initFrom() to initialize the painter.

Definition at line 48 of file histogrampainter.h.


Constructor & Destructor Documentation

Digikam::HistogramPainter::HistogramPainter ( QObject *  parent  ) 

Constructor.

Parameters:
parent parent for Qt's destruction mechanism

Definition at line 450 of file histogrampainter.cpp.

Digikam::HistogramPainter::~HistogramPainter (  )  [virtual]

Destructor.

Definition at line 455 of file histogrampainter.cpp.


Member Function Documentation

void Digikam::HistogramPainter::disableHistogramGuide (  ) 

Disables the rendering of the color guide.

Definition at line 508 of file histogrampainter.cpp.

void Digikam::HistogramPainter::enableHistogramGuideByColor ( const DColor &  color  ) 

Starts rendering a guide that indicates where in the histogram a specified color can be found.

Parameters:
color the color to highlight in the histogram

Definition at line 502 of file histogrampainter.cpp.

void Digikam::HistogramPainter::initFrom ( QWidget *  widget  ) 

Stores a widget that is used to initialize the painter used in the next call to render.

Therefore you must ensure that this widget will not be destroyed as long as you want to use the render method without a new call to this method!!!

Parameters:
widget widget to initialize painting from

Definition at line 513 of file histogrampainter.cpp.

void Digikam::HistogramPainter::render ( QPixmap &  paintDevice  ) 

Renders the given histogram on the pixmap.

The whole size of the pixmap is used for the histogram.

You must ensure that once before using this method a call to initFrom was made and the widget given in that call is still present.

Parameters:
paintDevice pixmap to paint the histogram on

Definition at line 518 of file histogrampainter.cpp.

void Digikam::HistogramPainter::setChannelType ( ChannelType  channelType  ) 

Set the channel type to render with the next call to render.

Parameters:
channelType channel type to render

Definition at line 470 of file histogrampainter.cpp.

void Digikam::HistogramPainter::setHighlightSelection ( bool  highlightSelection  ) 

Decide whether to highlight a specified selection in the histogram or not.

The selection must be defined with setHighlightSelection.

Parameters:
highlightSelection if true, a selection will be highlighted

Definition at line 475 of file histogrampainter.cpp.

void Digikam::HistogramPainter::setHistogram ( ImageHistogram *  histogram  ) 

Set the histogram to paint with the next call to render.

Parameters:
histogram an existing pointer to a histogram to paint on next call to render. The histogram must still exist at that call.

Definition at line 460 of file histogrampainter.cpp.

void Digikam::HistogramPainter::setRenderXGrid ( bool  renderXGrid  ) 

Decide whether to render a separation of the histogram in x direction.

Parameters:
renderXGrid if true, a separation at some significant value in x direction is rendered.

Definition at line 497 of file histogrampainter.cpp.

void Digikam::HistogramPainter::setScale ( HistogramScale  scale  ) 

Set the scale to paint the histogram with.

Parameters:
scale scal to paint histogram with

Definition at line 465 of file histogrampainter.cpp.

void Digikam::HistogramPainter::setSelection ( double  selectionMin,
double  selectionMax 
)

Sets the selection to highlight.

Parameters:
selectionMin 0 <= value <= 1, percent of the histogram width to start highlighting as percent. Ensure that this value is smaller then selectionMax.
selectionMax 0 <= value <= 1, percent of the histogram width to end highlighting as percent. Ensure that this value is greater then selectionMin.

Definition at line 480 of file histogrampainter.cpp.


The documentation for this class was generated from the following files:
  • histogrampainter.h
  • histogrampainter.cpp

digikam

Skip menu "digikam"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • digikam
Generated for API Reference by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal