AlbumShaper
1.0a3
|
#include <histogramInterface.h>
Signals | |
void | selectedRangeChanged () |
Public Member Functions | |
HistogramInterface (QString imageFilename, QWidget *parent=0, const char *name=0) | |
Creates layout. More... | |
~HistogramInterface () | |
Deletes objects. More... | |
void | setDisplayChannel (DISPLAYED_CHANNEL channel) |
Sets currently displayed channel. More... | |
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 More... | |
void | resetBoundaries () |
resets all boundaries More... | |
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 More... | |
double | displayToIndex (int val) |
convert screen coordinate to index in 0-255 range More... | |
int | indexToDisplay (int val) |
converts index in 0-255 ranges to screen coordinate More... | |
bool | nearBoundary (QPoint p) |
determines if mouse is near boundary More... | |
Private Attributes | |
DISPLAYED_CHANNEL | displayedChannel |
Currently displayed channel. More... | |
int | redVals [256] |
color and luminosity histograms More... | |
int | greenVals [256] |
int | blueVals [256] |
int | grayVals [256] |
int | maxRcount |
max r,g,b, and gray counts More... | |
int | maxGcount |
int | maxBcount |
int | maxGRAYcount |
int | lumClick |
left and right bounds for each channel More... | |
int | lumDrag |
int | redClick |
int | redDrag |
int | greenClick |
int | greenDrag |
int | blueClick |
int | blueDrag |
QSize | origImageSize |
original image dimensions, needed for painting More... | |
DRAG_MODE | dragMode |
effect of mouse drags More... | |
DRAG_MODE | currentMouseShape |
current mouse shape. More... | |
Definition at line 44 of file histogramInterface.h.
HistogramInterface::HistogramInterface | ( | QString | imageFilename, |
QWidget * | parent = 0 , |
||
const char * | name = 0 |
||
) |
Creates layout.
add keybinding for selecting entire range
Definition at line 41 of file histogramInterface.cpp.
References blueVals, CROSS_CURSOR, currentMouseShape, displayedChannel, dragMode, getCursor(), getImageSize(), grayVals, greenVals, LUMINOSITY, maxBcount, maxGcount, maxGRAYcount, maxRcount, NO_EFFECT, origImageSize, redVals, resetBoundaries(), scaleImage(), and selectAll().
HistogramInterface::~HistogramInterface | ( | ) |
|
private |
convert screen coordinate to index in 0-255 range
Definition at line 150 of file histogramInterface.cpp.
References width.
Referenced by mouseMoveEvent(), mousePressEvent(), nearBoundary(), and paintEvent().
void HistogramInterface::getHistBoundaries | ( | int & | lumLeft, |
int & | lumRight, | ||
int & | redLeft, | ||
int & | redRight, | ||
int & | greenLeft, | ||
int & | greenRight, | ||
int & | blueLeft, | ||
int & | blueRight | ||
) |
returns histogram boundaries
Definition at line 439 of file histogramInterface.cpp.
References blueClick, blueDrag, greenClick, greenDrag, lumClick, lumDrag, redClick, and redDrag.
Referenced by HistogramEditor::adjustImage(), HistogramEditor::applyAction(), and HistogramEditor::getHistBoundaries().
|
private |
this utility function finds currently selected range
Definition at line 124 of file histogramInterface.cpp.
References BLUE, blueClick, blueDrag, displayedChannel, GREEN, greenClick, greenDrag, lumClick, lumDrag, LUMINOSITY, RED, redClick, and redDrag.
Referenced by mouseMoveEvent(), mousePressEvent(), nearBoundary(), paintEvent(), and selectAll().
|
private |
converts index in 0-255 ranges to screen coordinate
Definition at line 155 of file histogramInterface.cpp.
References width.
Referenced by paintEvent().
|
virtual |
Definition at line 291 of file histogramInterface.cpp.
References COLOR_BAR_BORDER, COLOR_BAR_HEIGHT, and COLOR_BAR_MARGIN.
|
protected |
Definition at line 373 of file histogramInterface.cpp.
References BLUE, blueDrag, CROSS_CURSOR, currentMouseShape, displayedChannel, displayToIndex(), DRAG, dragMode, getCursor(), getSelectedRange(), GREEN, greenDrag, lumDrag, LUMINOSITY, MOVE_HOR_CURSOR, nearBoundary(), NO_EFFECT, RED, redDrag, selectedRangeChanged(), and width.
|
protected |
Definition at line 312 of file histogramInterface.cpp.
References blueClick, blueDrag, displayedChannel, displayToIndex(), DRAG, DRAG_THRESHOLD, dragMode, getSelectedRange(), GREEN, greenClick, greenDrag, lumClick, lumDrag, LUMINOSITY, RED, redClick, redDrag, and selectedRangeChanged().
|
protected |
Definition at line 411 of file histogramInterface.cpp.
References CROSS_CURSOR, currentMouseShape, DRAG, dragMode, getCursor(), nearBoundary(), and NO_EFFECT.
|
private |
determines if mouse is near boundary
Definition at line 296 of file histogramInterface.cpp.
References displayToIndex(), DRAG_THRESHOLD, and getSelectedRange().
Referenced by mouseMoveEvent(), and mouseReleaseEvent().
|
protected |
Definition at line 160 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, RED, redVals, and width.
void HistogramInterface::resetBoundaries | ( | ) |
resets all boundaries
Definition at line 457 of file histogramInterface.cpp.
References blueClick, blueDrag, greenClick, greenDrag, lumClick, lumDrag, redClick, redDrag, and selectedRangeChanged().
Referenced by HistogramInterface(), and HistogramEditor::resetAction().
|
protected |
Definition at line 119 of file histogramInterface.cpp.
|
privateslot |
Definition at line 424 of file histogramInterface.cpp.
References BLUE, blueClick, blueDrag, displayedChannel, getSelectedRange(), GREEN, greenClick, greenDrag, lumClick, lumDrag, LUMINOSITY, RED, redClick, redDrag, and selectedRangeChanged().
Referenced by HistogramInterface().
|
signal |
Referenced by mouseMoveEvent(), mousePressEvent(), resetBoundaries(), and selectAll().
void HistogramInterface::setDisplayChannel | ( | DISPLAYED_CHANNEL | channel | ) |
Sets currently displayed channel.
Definition at line 284 of file histogramInterface.cpp.
References displayedChannel.
Referenced by HistogramEditor::selectHistogramType().
|
private |
Definition at line 114 of file histogramInterface.h.
Referenced by getHistBoundaries(), getSelectedRange(), mousePressEvent(), resetBoundaries(), and selectAll().
|
private |
Definition at line 114 of file histogramInterface.h.
Referenced by getHistBoundaries(), getSelectedRange(), mouseMoveEvent(), mousePressEvent(), resetBoundaries(), and selectAll().
|
private |
Definition at line 104 of file histogramInterface.h.
Referenced by HistogramInterface(), and paintEvent().
|
private |
current mouse shape.
by caching this value we avoid resetting the mouse cursor every time it moves etc.
Definition at line 124 of file histogramInterface.h.
Referenced by HistogramInterface(), mouseMoveEvent(), and mouseReleaseEvent().
|
private |
Currently displayed channel.
Definition at line 99 of file histogramInterface.h.
Referenced by getSelectedRange(), HistogramInterface(), mouseMoveEvent(), mousePressEvent(), paintEvent(), selectAll(), and setDisplayChannel().
|
private |
effect of mouse drags
Definition at line 120 of file histogramInterface.h.
Referenced by HistogramInterface(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
|
private |
Definition at line 105 of file histogramInterface.h.
Referenced by HistogramInterface(), and paintEvent().
|
private |
Definition at line 113 of file histogramInterface.h.
Referenced by getHistBoundaries(), getSelectedRange(), mousePressEvent(), resetBoundaries(), and selectAll().
|
private |
Definition at line 113 of file histogramInterface.h.
Referenced by getHistBoundaries(), getSelectedRange(), mouseMoveEvent(), mousePressEvent(), resetBoundaries(), and selectAll().
|
private |
Definition at line 103 of file histogramInterface.h.
Referenced by HistogramInterface(), and paintEvent().
|
private |
left and right bounds for each channel
Definition at line 111 of file histogramInterface.h.
Referenced by getHistBoundaries(), getSelectedRange(), mousePressEvent(), resetBoundaries(), and selectAll().
|
private |
Definition at line 111 of file histogramInterface.h.
Referenced by getHistBoundaries(), getSelectedRange(), mouseMoveEvent(), mousePressEvent(), resetBoundaries(), and selectAll().
|
private |
Definition at line 108 of file histogramInterface.h.
Referenced by HistogramInterface(), and paintEvent().
|
private |
Definition at line 108 of file histogramInterface.h.
Referenced by HistogramInterface(), and paintEvent().
|
private |
Definition at line 108 of file histogramInterface.h.
Referenced by HistogramInterface(), and paintEvent().
|
private |
max r,g,b, and gray counts
Definition at line 108 of file histogramInterface.h.
Referenced by HistogramInterface(), and paintEvent().
|
private |
original image dimensions, needed for painting
Definition at line 117 of file histogramInterface.h.
Referenced by HistogramInterface().
|
private |
Definition at line 112 of file histogramInterface.h.
Referenced by getHistBoundaries(), getSelectedRange(), mousePressEvent(), resetBoundaries(), and selectAll().
|
private |
Definition at line 112 of file histogramInterface.h.
Referenced by getHistBoundaries(), getSelectedRange(), mouseMoveEvent(), mousePressEvent(), resetBoundaries(), and selectAll().
|
private |
color and luminosity histograms
Definition at line 102 of file histogramInterface.h.
Referenced by HistogramInterface(), and paintEvent().