ImageMaskEditor Class Reference

#include <VisionX/gui-plugins/ImageMaskPainter/ImageMaskEditor.h>

+ Inheritance diagram for ImageMaskEditor:

Public Slots

void clearMaskImage ()
 
void resizeImage (QSize size, bool doNotShrink=false)
 
void setBackgroundImage (const QImage &i)
 
void setImageSize (QSize size, bool doNotShrink=false)
 
void setMaskAlpha (int newAlpha)
 
void setMaskColor (const QColor &newColor)
 
void setMaskColor (int r, int g, int b)
 
void setMaskColor (qreal r, qreal g, qreal b)
 
void setMaskImage (const QImage &i)
 
void setPenCircleVisible (bool b=true)
 
void setPenWidth (int newWidth)
 
void setTransparentColor (const QColor &newColor)
 
void setTransparentColor (int r, int g, int b)
 
void setTransparentColor (qreal r, qreal g, qreal b)
 

Signals

void arrowDrawn (const QPoint &arrowStart, const QPoint &arrowEnd)
 
void maskUpdated ()
 
void maskUpdateFinished ()
 

Public Member Functions

const QImage & backgroundImage () const
 
 ImageMaskEditor (int width=64, int height=64, QWidget *parent=nullptr)
 
 ImageMaskEditor (QSize size, QWidget *parent=nullptr)
 
QSize imageSize () const
 
const QColor & maskColor () const
 
QImage maskImage () const
 
bool openBackgroundImage (const QString &fileName)
 
bool openMaskImage (const QString &fileName)
 
int penWidth () const
 
bool saveBackgroundImage (const QString &fileName, const char *fileFormat)
 
bool saveMaskImage (const QString &fileName, const char *fileFormat)
 
QSize sizeHint () const override
 
const QColor & transparentColor () const
 

Protected Member Functions

void mouseMoveEvent (QMouseEvent *event) override
 
void mousePressEvent (QMouseEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 
void paintEvent (QPaintEvent *event) override
 

Detailed Description

Definition at line 8 of file ImageMaskEditor.h.

Constructor & Destructor Documentation

◆ ImageMaskEditor() [1/2]

ImageMaskEditor ( QSize size,
QWidget * parent = nullptr )

Definition at line 9 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ImageMaskEditor() [2/2]

ImageMaskEditor ( int width = 64,
int height = 64,
QWidget * parent = nullptr )

Definition at line 15 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ arrowDrawn

void arrowDrawn ( const QPoint & arrowStart,
const QPoint & arrowEnd )
signal

◆ backgroundImage()

const QImage & backgroundImage ( ) const

Definition at line 89 of file ImageMaskEditor.cpp.

+ Here is the caller graph for this function:

◆ clearMaskImage

void clearMaskImage ( )
slot

Definition at line 180 of file ImageMaskEditor.cpp.

◆ imageSize()

QSize imageSize ( ) const

Definition at line 118 of file ImageMaskEditor.cpp.

+ Here is the caller graph for this function:

◆ maskColor()

const QColor & maskColor ( ) const

Definition at line 71 of file ImageMaskEditor.cpp.

◆ maskImage()

QImage maskImage ( ) const

Definition at line 95 of file ImageMaskEditor.cpp.

+ Here is the caller graph for this function:

◆ maskUpdated

void maskUpdated ( )
signal
+ Here is the caller graph for this function:

◆ maskUpdateFinished

void maskUpdateFinished ( )
signal
+ Here is the caller graph for this function:

◆ mouseMoveEvent()

void mouseMoveEvent ( QMouseEvent * event)
overrideprotected

Definition at line 248 of file ImageMaskEditor.cpp.

◆ mousePressEvent()

void mousePressEvent ( QMouseEvent * event)
overrideprotected

Definition at line 237 of file ImageMaskEditor.cpp.

◆ mouseReleaseEvent()

void mouseReleaseEvent ( QMouseEvent * event)
overrideprotected

Definition at line 263 of file ImageMaskEditor.cpp.

◆ openBackgroundImage()

bool openBackgroundImage ( const QString & fileName)

Definition at line 33 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

◆ openMaskImage()

bool openMaskImage ( const QString & fileName)

Definition at line 21 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

◆ paintEvent()

void paintEvent ( QPaintEvent * event)
overrideprotected

Definition at line 273 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

◆ penWidth()

int penWidth ( ) const

Definition at line 83 of file ImageMaskEditor.cpp.

◆ resizeImage

void resizeImage ( QSize size,
bool doNotShrink = false )
slot

Definition at line 214 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveBackgroundImage()

bool saveBackgroundImage ( const QString & fileName,
const char * fileFormat )

Definition at line 58 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

◆ saveMaskImage()

bool saveMaskImage ( const QString & fileName,
const char * fileFormat )

Definition at line 45 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

◆ setBackgroundImage

void setBackgroundImage ( const QImage & i)
slot

Definition at line 228 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setImageSize

void setImageSize ( QSize size,
bool doNotShrink = false )
slot

Definition at line 200 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMaskAlpha

void setMaskAlpha ( int newAlpha)
slot

Definition at line 193 of file ImageMaskEditor.cpp.

◆ setMaskColor [1/3]

void setMaskColor ( const QColor & newColor)
slot

Definition at line 130 of file ImageMaskEditor.cpp.

◆ setMaskColor [2/3]

void setMaskColor ( int r,
int g,
int b )
slot

Definition at line 137 of file ImageMaskEditor.cpp.

◆ setMaskColor [3/3]

void setMaskColor ( qreal r,
qreal g,
qreal b )
slot

Definition at line 146 of file ImageMaskEditor.cpp.

◆ setMaskImage

void setMaskImage ( const QImage & i)
slot

Definition at line 220 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPenCircleVisible

void setPenCircleVisible ( bool b = true)
slot

Definition at line 381 of file ImageMaskEditor.cpp.

+ Here is the caller graph for this function:

◆ setPenWidth

void setPenWidth ( int newWidth)
slot

Definition at line 187 of file ImageMaskEditor.cpp.

◆ setTransparentColor [1/3]

void setTransparentColor ( const QColor & newColor)
slot

Definition at line 155 of file ImageMaskEditor.cpp.

◆ setTransparentColor [2/3]

void setTransparentColor ( int r,
int g,
int b )
slot

Definition at line 162 of file ImageMaskEditor.cpp.

◆ setTransparentColor [3/3]

void setTransparentColor ( qreal r,
qreal g,
qreal b )
slot

Definition at line 171 of file ImageMaskEditor.cpp.

◆ sizeHint()

QSize sizeHint ( ) const
override

Definition at line 124 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

◆ transparentColor()

const QColor & transparentColor ( ) const

Definition at line 77 of file ImageMaskEditor.cpp.


The documentation for this class was generated from the following files: