#include <histogramInterface.h>
Inheritance diagram for HistogramInterface:
Signals | |
void | selectedRangeChanged () |
Public Member Functions | |
HistogramInterface (QString imageFilename, QWidget *parent=0, const char *name=0) | |
Creates layout. | |
~HistogramInterface () | |
Deletes objects. | |
void | setDisplayChannel (DISPLAYED_CHANNEL channel) |
Sets currently displayed channel. | |
virtual QSize | minimumSizeHint () const |
void | getHistBoundaries (int &lumLeft, int &lumRight, int &redLeft, int &redRight, int &greenLeft, int &greenRight, int &blueLeft, int &blueRight) |
returns histogram boundaries | |
void | resetBoundaries () |
resets all boundaries | |
Protected Member Functions | |
void | paintEvent (QPaintEvent *e) |
void | resizeEvent (QResizeEvent *) |
void | mousePressEvent (QMouseEvent *e) |
void | mouseReleaseEvent (QMouseEvent *) |
void | mouseMoveEvent (QMouseEvent *e) |
Private Slots | |
void | selectAll () |
Private Member Functions | |
void | getSelectedRange (int &left, int &right) |
this utility function finds currently selected range | |
double | displayToIndex (int val) |
convert screen coordinate to index in 0-255 range | |
int | indexToDisplay (int val) |
converts index in 0-255 ranges to screen coordinate | |
bool | nearBoundary (QPoint p) |
determines if mouse is near boundary | |
Private Attributes | |
DISPLAYED_CHANNEL | displayedChannel |
Currently displayed channel. | |
int | redVals [256] |
color and luminosity histograms | |
int | greenVals [256] |
int | blueVals [256] |
int | grayVals [256] |
int | maxRcount |
max r,g,b, and gray counts | |
int | maxGcount |
max r,g,b, and gray counts | |
int | maxBcount |
max r,g,b, and gray counts | |
int | maxGRAYcount |
max r,g,b, and gray counts | |
int | lumClick |
left and right bounds for each channel | |
int | lumDrag |
left and right bounds for each channel | |
int | redClick |
int | redDrag |
int | greenClick |
int | greenDrag |
int | blueClick |
int | blueDrag |
QSize | origImageSize |
original image dimensions, needed for painting | |
DRAG_MODE | dragMode |
effect of mouse drags | |
DRAG_MODE | currentMouseShape |
current mouse shape. |
|
Creates layout. add keybinding for selecting entire range Definition at line 36 of file histogramInterface.cpp. References blueVals, CROSS_CURSOR, currentMouseShape, displayedChannel, dragMode, getCursor(), getImageSize(), grayVals, greenVals, HistogramInterface(), LUMINOSITY, maxBcount, maxGcount, maxGRAYcount, maxRcount, NO_EFFECT, origImageSize, redVals, resetBoundaries(), scaleImage(), and selectAll(). Referenced by HistogramInterface().
|
|
Deletes objects.
Definition at line 112 of file histogramInterface.cpp.
|
|
convert screen coordinate to index in 0-255 range
Definition at line 145 of file histogramInterface.cpp. References displayToIndex(), and width. Referenced by displayToIndex(), mouseMoveEvent(), mousePressEvent(), nearBoundary(), and paintEvent().
|
|
returns histogram boundaries
Definition at line 434 of file histogramInterface.cpp. References blueClick, blueDrag, getHistBoundaries(), greenClick, greenDrag, lumClick, lumDrag, redClick, and redDrag. Referenced by HistogramEditor::adjustImage(), HistogramEditor::applyAction(), getHistBoundaries(), and HistogramEditor::getHistBoundaries().
|
|
this utility function finds currently selected range
Definition at line 119 of file histogramInterface.cpp. References BLUE, blueClick, blueDrag, displayedChannel, getSelectedRange(), GREEN, greenClick, greenDrag, lumClick, lumDrag, LUMINOSITY, RED, redClick, and redDrag. Referenced by getSelectedRange(), mouseMoveEvent(), mousePressEvent(), nearBoundary(), paintEvent(), and selectAll().
|
|
converts index in 0-255 ranges to screen coordinate
Definition at line 150 of file histogramInterface.cpp. References indexToDisplay(), and width. Referenced by indexToDisplay(), and paintEvent().
|
|
Definition at line 286 of file histogramInterface.cpp. References COLOR_BAR_BORDER, COLOR_BAR_HEIGHT, and COLOR_BAR_MARGIN.
|
|
Definition at line 368 of file histogramInterface.cpp. References BLUE, blueDrag, CROSS_CURSOR, currentMouseShape, displayedChannel, displayToIndex(), DRAG, dragMode, getCursor(), getSelectedRange(), GREEN, greenDrag, lumDrag, LUMINOSITY, mouseMoveEvent(), MOVE_HOR_CURSOR, nearBoundary(), NO_EFFECT, RED, redDrag, selectedRangeChanged(), and width. Referenced by mouseMoveEvent().
|
|
Definition at line 307 of file histogramInterface.cpp. References blueClick, blueDrag, displayedChannel, displayToIndex(), DRAG, DRAG_THRESHOLD, dragMode, getSelectedRange(), GREEN, greenClick, greenDrag, lumClick, lumDrag, LUMINOSITY, mousePressEvent(), RED, redClick, redDrag, and selectedRangeChanged(). Referenced by mousePressEvent().
|
|
Definition at line 406 of file histogramInterface.cpp. References CROSS_CURSOR, currentMouseShape, DRAG, dragMode, getCursor(), mouseReleaseEvent(), nearBoundary(), and NO_EFFECT. Referenced by mouseReleaseEvent().
|
|
determines if mouse is near boundary
Definition at line 291 of file histogramInterface.cpp. References displayToIndex(), DRAG_THRESHOLD, getSelectedRange(), and nearBoundary(). Referenced by mouseMoveEvent(), mouseReleaseEvent(), and nearBoundary().
|
|
Definition at line 155 of file histogramInterface.cpp. References b, BLUE, blueVals, buffer, COLOR_BAR_BORDER, COLOR_BAR_HEIGHT, COLOR_BAR_MARGIN, displayedChannel, displayToIndex(), getSelectedRange(), grayVals, GREEN, greenVals, HISTOGRAM_HEIGHT, indexToDisplay(), maxBcount, maxGcount, maxGRAYcount, maxRcount, paintEvent(), RED, redVals, and width. Referenced by paintEvent().
|
|
resets all boundaries
Definition at line 452 of file histogramInterface.cpp. References blueClick, blueDrag, greenClick, greenDrag, lumClick, lumDrag, redClick, redDrag, and selectedRangeChanged(). Referenced by HistogramInterface(), and HistogramEditor::resetAction().
|
|
Definition at line 114 of file histogramInterface.cpp. References resizeEvent(). Referenced by resizeEvent().
|
|
Definition at line 419 of file histogramInterface.cpp. References BLUE, blueClick, blueDrag, displayedChannel, getSelectedRange(), GREEN, greenClick, greenDrag, lumClick, lumDrag, LUMINOSITY, RED, redClick, redDrag, and selectedRangeChanged(). Referenced by HistogramInterface().
|
|
Referenced by mouseMoveEvent(), mousePressEvent(), resetBoundaries(), and selectAll(). |
|
Sets currently displayed channel.
Definition at line 279 of file histogramInterface.cpp. References displayedChannel, and setDisplayChannel(). Referenced by HistogramEditor::selectHistogramType(), and setDisplayChannel().
|
|
Definition at line 110 of file histogramInterface.h. Referenced by getHistBoundaries(), getSelectedRange(), mousePressEvent(), resetBoundaries(), and selectAll(). |
|
Definition at line 110 of file histogramInterface.h. Referenced by getHistBoundaries(), getSelectedRange(), mouseMoveEvent(), mousePressEvent(), resetBoundaries(), and selectAll(). |
|
Definition at line 100 of file histogramInterface.h. Referenced by HistogramInterface(), and paintEvent(). |
|
current mouse shape. by caching this value we avoid resetting the mouse cursor every time it moves etc. Definition at line 120 of file histogramInterface.h. Referenced by HistogramInterface(), mouseMoveEvent(), and mouseReleaseEvent(). |
|
Currently displayed channel.
Definition at line 95 of file histogramInterface.h. Referenced by getSelectedRange(), HistogramInterface(), mouseMoveEvent(), mousePressEvent(), paintEvent(), selectAll(), and setDisplayChannel(). |
|
effect of mouse drags
Definition at line 116 of file histogramInterface.h. Referenced by HistogramInterface(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent(). |
|
Definition at line 101 of file histogramInterface.h. Referenced by HistogramInterface(), and paintEvent(). |
|
Definition at line 109 of file histogramInterface.h. Referenced by getHistBoundaries(), getSelectedRange(), mousePressEvent(), resetBoundaries(), and selectAll(). |
|
Definition at line 109 of file histogramInterface.h. Referenced by getHistBoundaries(), getSelectedRange(), mouseMoveEvent(), mousePressEvent(), resetBoundaries(), and selectAll(). |
|
Definition at line 99 of file histogramInterface.h. Referenced by HistogramInterface(), and paintEvent(). |
|
left and right bounds for each channel
Definition at line 107 of file histogramInterface.h. Referenced by getHistBoundaries(), getSelectedRange(), mousePressEvent(), resetBoundaries(), and selectAll(). |
|
left and right bounds for each channel
Definition at line 107 of file histogramInterface.h. Referenced by getHistBoundaries(), getSelectedRange(), mouseMoveEvent(), mousePressEvent(), resetBoundaries(), and selectAll(). |
|
max r,g,b, and gray counts
Definition at line 104 of file histogramInterface.h. Referenced by HistogramInterface(), and paintEvent(). |
|
max r,g,b, and gray counts
Definition at line 104 of file histogramInterface.h. Referenced by HistogramInterface(), and paintEvent(). |
|
max r,g,b, and gray counts
Definition at line 104 of file histogramInterface.h. Referenced by HistogramInterface(), and paintEvent(). |
|
max r,g,b, and gray counts
Definition at line 104 of file histogramInterface.h. Referenced by HistogramInterface(), and paintEvent(). |
|
original image dimensions, needed for painting
Definition at line 113 of file histogramInterface.h. Referenced by HistogramInterface(). |
|
Definition at line 108 of file histogramInterface.h. Referenced by getHistBoundaries(), getSelectedRange(), mousePressEvent(), resetBoundaries(), and selectAll(). |
|
Definition at line 108 of file histogramInterface.h. Referenced by getHistBoundaries(), getSelectedRange(), mouseMoveEvent(), mousePressEvent(), resetBoundaries(), and selectAll(). |
|
color and luminosity histograms
Definition at line 98 of file histogramInterface.h. Referenced by HistogramInterface(), and paintEvent(). |