krita/ui
KisHistogramView Class Reference
This class displays a histogram. More...
#include <kis_histogram_view.h>

Public Slots | |
| void | setActiveChannel (int channel) |
| void | setHistogramType (enumHistogramType type) |
| void | updateHistogram () |
Signals | |
| void | rightClicked (const QPoint &pos) |
Public Member Functions | |
| KisHistogramView (QWidget *parent=0, const char *name=0, Qt::WFlags f=0) | |
| virtual | ~KisHistogramView () |
| QStringList | channelStrings () |
| KoHistogramProducerSP | currentProducer () |
| bool | hasColor () |
| QList< KoID > | listProducers () |
| void | setColor (bool set) |
| void | setCurrentChannels (KoHistogramProducerSP producer, QList< KoChannelInfo * > channels) |
| void | setCurrentChannels (const KoID &producerID, QList< KoChannelInfo * > channels) |
| void | setHistogram (KisHistogramSP histogram) |
| void | setPaintDevice (KisPaintDeviceSP dev) |
| void | setView (double from, double size) |
Protected Member Functions | |
| virtual void | mousePressEvent (QMouseEvent *e) |
Detailed Description
This class displays a histogram.
It has a list of channels it can select. The easy way is to display channelStrings() to the user, and then use a setActiveChannel with the integer the same as the one the selected string in that stringlist has. If the selected one is a producer, the histogram will automatically display all its channels, and color them if that is possible.
You can also set the channels manually, just don't forget that the displayed channels all need to belong to the same producer! If you set them manually, don't forget to set the (non)usage of color as well.
You can either set this to use a specific layer, or use a specific histogram. With the latter, some functionality will disappear, like listProducers(). Setting a histogram will discard info on the layer, and setting a layer will discard info on the histogram.
XXX: make beautiful, for instance by using alpha and a bit of a gradient!
Definition at line 56 of file kis_histogram_view.h.
Constructor & Destructor Documentation
| KisHistogramView::KisHistogramView | ( | QWidget * | parent = 0, |
|
| const char * | name = 0, |
|||
| Qt::WFlags | f = 0 | |||
| ) |
Definition at line 50 of file kis_histogram_view.cc.
| KisHistogramView::~KisHistogramView | ( | ) | [virtual] |
Definition at line 60 of file kis_histogram_view.cc.
Member Function Documentation
| QStringList KisHistogramView::channelStrings | ( | ) |
Definition at line 122 of file kis_histogram_view.cc.
| KoHistogramProducerSP KisHistogramView::currentProducer | ( | ) |
Definition at line 117 of file kis_histogram_view.cc.
| bool KisHistogramView::hasColor | ( | ) |
Definition at line 172 of file kis_histogram_view.cc.
| QList< KoID > KisHistogramView::listProducers | ( | ) |
Lists all producers currently available.
Definition at line 127 of file kis_histogram_view.cc.
| void KisHistogramView::mousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Definition at line 371 of file kis_histogram_view.cc.
| void KisHistogramView::rightClicked | ( | const QPoint & | pos | ) | [signal] |
| void KisHistogramView::setActiveChannel | ( | int | channel | ) | [slot] |
Definition at line 185 of file kis_histogram_view.cc.
| void KisHistogramView::setColor | ( | bool | set | ) |
Definition at line 177 of file kis_histogram_view.cc.
| void KisHistogramView::setCurrentChannels | ( | KoHistogramProducerSP | producer, | |
| QList< KoChannelInfo * > | channels | |||
| ) |
Be careful, producer will be modified.
Definition at line 141 of file kis_histogram_view.cc.
| void KisHistogramView::setCurrentChannels | ( | const KoID & | producerID, | |
| QList< KoChannelInfo * > | channels | |||
| ) |
Sets the currently displayed channels to channels of the producer with producerID as ID.
Definition at line 134 of file kis_histogram_view.cc.
| void KisHistogramView::setHistogram | ( | KisHistogramSP | histogram | ) |
Definition at line 81 of file kis_histogram_view.cc.
| void KisHistogramView::setHistogramType | ( | enumHistogramType | type | ) | [slot] |
Definition at line 225 of file kis_histogram_view.cc.
| void KisHistogramView::setPaintDevice | ( | KisPaintDeviceSP | dev | ) |
Definition at line 64 of file kis_histogram_view.cc.
| void KisHistogramView::setView | ( | double | from, | |
| double | size | |||
| ) |
Definition at line 105 of file kis_histogram_view.cc.
| void KisHistogramView::updateHistogram | ( | ) | [slot] |
Definition at line 276 of file kis_histogram_view.cc.
The documentation for this class was generated from the following files:
