|
Krita Source Code Documentation
|
#include <KisVisualRectangleSelectorShape.h>
Inheritance diagram for KisVisualRectangleSelectorShape:Public Types | |
| enum | singelDTypes { vertical , horizontal , border , borderMirrored } |
Public Types inherited from KisVisualColorSelectorShape | |
| enum | Dimensions { onedimensional , twodimensional } |
| The Dimensions enum Whether or not the shape is single or two dimensional. More... | |
Public Member Functions | |
| QRect | getSpaceForCircle (QRect geom) override |
| QRect | getSpaceForSquare (QRect geom) override |
| getSpaceForSquare | |
| QRect | getSpaceForTriangle (QRect geom) override |
| KisVisualRectangleSelectorShape (KisVisualColorSelector *parent, Dimensions dimension, int channel1, int channel2, int width=20, KisVisualRectangleSelectorShape::singelDTypes d=KisVisualRectangleSelectorShape::vertical) | |
| void | setBorderWidth (int width) override |
| setBorderWidth set the border of the single dimensional selector. | |
| void | setOneDimensionalType (singelDTypes type) |
| ~KisVisualRectangleSelectorShape () override | |
Public Member Functions inherited from KisVisualColorSelectorShape | |
| int | channel (int dimension) const |
| channel Get the channel index associated with a selector shape dimension | |
| quint32 | channelMask () const |
| void | forceImageUpdate () |
| forceImageUpdate force the image to recache. | |
| QColor | getColorFromConverter (KoColor c) |
| getColorFromConverter | |
| KoColor | getCurrentColor () |
| getCurrentColor | |
| QPointF | getCursorPosition () const |
| getCursorPosition | |
| Dimensions | getDimensions () const |
| getDimensions | |
| const QImage & | getImageMap () |
| getImageMap returns the updated base image | |
| bool | isHueControl () const |
| KisVisualColorSelectorShape (KisVisualColorSelector *parent, KisVisualColorSelectorShape::Dimensions dimension, int channel1, int channel2) | |
| void | setAcceptTabletEvents (bool on) |
| void | setChannelValues (QVector4D channelValues, quint32 channelFlags) |
| setChannelValues Set the current channel values; Note that channel values controlled by the shape itself have no effect unless setCursor is true. This will trigger a full widget repaint. | |
| void | setCursorPosition (QPointF position, bool signal=false) |
| setCursorPosition Set the cursor to normalized shape coordinates. This will only repaint the cursor. | |
| virtual bool | supportsGamutMask () const |
| virtual void | updateGamutMask () |
| Notify shape that the gamut mask changed. | |
| ~KisVisualColorSelectorShape () override | |
Protected Member Functions | |
| QRect | getAvailableSpace (QRect geom, bool stretch) |
| QImage | renderAlphaMask () const override |
| render the alpha mask for the widget background the returned image is expected to be QImage::Format_Alpha8 | |
Protected Member Functions inherited from KisVisualColorSelectorShape | |
| KisVisualColorSelector * | colorSelector () const |
| virtual QImage | compositeBackground () const |
| QImage | convertImageMap (const quint8 *rawColor, quint32 bufferSize, QSize imgSize) const |
| convertImageMap convert image data containing raw KoColor data into a QImage | |
| void | mouseMoveEvent (QMouseEvent *e) override |
| virtual QPointF | mousePositionToShapeCoordinate (const QPointF &pos, const QPointF &dragStart) const |
| default implementation just calls convertWidgetCoordinateToShapeCoordinate(pos) | |
| void | mousePressEvent (QMouseEvent *e) override |
| void | mouseReleaseEvent (QMouseEvent *e) override |
| void | paintEvent (QPaintEvent *) override |
| virtual QImage | renderBackground (const QVector4D &channelValues, const QImage &alpha) const |
| renderBackground Render the widget background visible inside the widget's mask in current color space Rendering shall be done with the conversion functions of KisVisualColorSelector | |
| virtual QImage | renderStaticAlphaMask () const |
| void | resizeEvent (QResizeEvent *) override |
| KisVisualColorModel * | selectorModel () const |
| void | tabletEvent (QTabletEvent *event) override |
Private Member Functions | |
| QPointF | convertShapeCoordinateToWidgetCoordinate (QPointF coordinate) const override |
| convertShapeCoordinateToWidgetCoordinate | |
| QPointF | convertWidgetCoordinateToShapeCoordinate (QPointF coordinate) const override |
| convertWidgetCoordinateToShapeCoordinate Convert a coordinate in the widget's height/width to a shape coordinate. | |
| void | drawCursor (QPainter &painter) override |
| QRegion | getMaskMap () override |
| getPixmap | |
Private Attributes | |
| int | m_barWidth |
| singelDTypes | m_type |
Additional Inherited Members | |
Signals inherited from KisVisualColorSelectorShape | |
| void | sigCursorMoved (QPointF pos) |
Definition at line 11 of file KisVisualRectangleSelectorShape.h.
| Enumerator | |
|---|---|
| vertical | |
| horizontal | |
| border | |
| borderMirrored | |
Definition at line 15 of file KisVisualRectangleSelectorShape.h.
|
explicit |
Definition at line 17 of file KisVisualRectangleSelectorShape.cpp.
References m_barWidth, and m_type.
|
override |
Definition at line 29 of file KisVisualRectangleSelectorShape.cpp.
|
overrideprivatevirtual |
convertShapeCoordinateToWidgetCoordinate
Implements KisVisualColorSelectorShape.
Definition at line 92 of file KisVisualRectangleSelectorShape.cpp.
References border, KisVisualColorSelectorShape::getDimensions(), horizontal, length(), m_barWidth, m_type, KisVisualColorSelectorShape::onedimensional, and vertical.
|
overrideprivatevirtual |
convertWidgetCoordinateToShapeCoordinate Convert a coordinate in the widget's height/width to a shape coordinate.
| coordinate | the position your wish to have the shape coordinates of. |
Implements KisVisualColorSelectorShape.
Definition at line 180 of file KisVisualRectangleSelectorShape.cpp.
References border, KisVisualColorSelectorShape::getDimensions(), horizontal, length(), m_barWidth, m_type, KisVisualColorSelectorShape::onedimensional, and vertical.
|
overrideprivatevirtual |
Implements KisVisualColorSelectorShape.
Definition at line 315 of file KisVisualRectangleSelectorShape.cpp.
References border, borderMirrored, convertShapeCoordinateToWidgetCoordinate(), KisVisualColorSelectorShape::getColorFromConverter(), KisVisualColorSelectorShape::getCurrentColor(), KisVisualColorSelectorShape::getCursorPosition(), KisVisualColorSelectorShape::getDimensions(), m_barWidth, m_type, KisVisualColorSelectorShape::onedimensional, and vertical.
|
protected |
Definition at line 63 of file KisVisualRectangleSelectorShape.cpp.
References horizontal, m_barWidth, m_type, and vertical.
|
overrideprivatevirtual |
getPixmap
Implements KisVisualColorSelectorShape.
Definition at line 274 of file KisVisualRectangleSelectorShape.cpp.
References border, borderMirrored, m_barWidth, and m_type.
|
overridevirtual |
Implements KisVisualColorSelectorShape.
Definition at line 53 of file KisVisualRectangleSelectorShape.cpp.
References getAvailableSpace().
|
overridevirtual |
getSpaceForSquare
| geom | the full widget rectangle |
Implements KisVisualColorSelectorShape.
Definition at line 48 of file KisVisualRectangleSelectorShape.cpp.
References getAvailableSpace().
|
overridevirtual |
Implements KisVisualColorSelectorShape.
Definition at line 58 of file KisVisualRectangleSelectorShape.cpp.
References getSpaceForSquare().
|
overrideprotectedvirtual |
render the alpha mask for the widget background the returned image is expected to be QImage::Format_Alpha8
Reimplemented from KisVisualColorSelectorShape.
Definition at line 283 of file KisVisualRectangleSelectorShape.cpp.
References KisVisualColorSelectorShape::getDimensions(), horizontal, m_barWidth, m_type, KisVisualColorSelectorShape::onedimensional, and vertical.
|
overridevirtual |
setBorderWidth set the border of the single dimensional selector.
| width |
Implements KisVisualColorSelectorShape.
Definition at line 34 of file KisVisualRectangleSelectorShape.cpp.
References m_barWidth.
| void KisVisualRectangleSelectorShape::setOneDimensionalType | ( | KisVisualRectangleSelectorShape::singelDTypes | type | ) |
Definition at line 39 of file KisVisualRectangleSelectorShape.cpp.
References KisVisualColorSelectorShape::forceImageUpdate(), and m_type.
|
private |
Definition at line 43 of file KisVisualRectangleSelectorShape.h.
|
private |
Definition at line 42 of file KisVisualRectangleSelectorShape.h.