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:

◆ ImageMaskEditor() [2/2]

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

Definition at line 16 of file ImageMaskEditor.cpp.

Member Function Documentation

◆ arrowDrawn

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

◆ backgroundImage()

const QImage & backgroundImage ( ) const

Definition at line 81 of file ImageMaskEditor.cpp.

+ Here is the caller graph for this function:

◆ clearMaskImage

void clearMaskImage ( )
slot

Definition at line 163 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

◆ imageSize()

QSize imageSize ( ) const

Definition at line 108 of file ImageMaskEditor.cpp.

+ Here is the caller graph for this function:

◆ maskColor()

const QColor & maskColor ( ) const

Definition at line 66 of file ImageMaskEditor.cpp.

◆ maskImage()

QImage maskImage ( ) const

Definition at line 86 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 223 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

◆ mousePressEvent()

void mousePressEvent ( QMouseEvent *  event)
overrideprotected

Definition at line 213 of file ImageMaskEditor.cpp.

◆ mouseReleaseEvent()

void mouseReleaseEvent ( QMouseEvent *  event)
overrideprotected

Definition at line 237 of file ImageMaskEditor.cpp.

◆ openBackgroundImage()

bool openBackgroundImage ( const QString &  fileName)

Definition at line 31 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

◆ openMaskImage()

bool openMaskImage ( const QString &  fileName)

Definition at line 20 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

◆ paintEvent()

void paintEvent ( QPaintEvent *  event)
overrideprotected

Definition at line 246 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

◆ penWidth()

int penWidth ( ) const

Definition at line 76 of file ImageMaskEditor.cpp.

◆ resizeImage

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

Definition at line 193 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 54 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

◆ saveMaskImage()

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

Definition at line 42 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

◆ setBackgroundImage

void setBackgroundImage ( const QImage &  i)
slot

Definition at line 205 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 180 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 174 of file ImageMaskEditor.cpp.

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

◆ setMaskColor [1/3]

void setMaskColor ( const QColor &  newColor)
slot

Definition at line 118 of file ImageMaskEditor.cpp.

◆ setMaskColor [2/3]

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

Definition at line 124 of file ImageMaskEditor.cpp.

◆ setMaskColor [3/3]

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

Definition at line 132 of file ImageMaskEditor.cpp.

◆ setMaskImage

void setMaskImage ( const QImage &  i)
slot

Definition at line 198 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 359 of file ImageMaskEditor.cpp.

+ Here is the caller graph for this function:

◆ setPenWidth

void setPenWidth ( int  newWidth)
slot

Definition at line 169 of file ImageMaskEditor.cpp.

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

◆ setTransparentColor [1/3]

void setTransparentColor ( const QColor &  newColor)
slot

Definition at line 141 of file ImageMaskEditor.cpp.

◆ setTransparentColor [2/3]

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

Definition at line 147 of file ImageMaskEditor.cpp.

◆ setTransparentColor [3/3]

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

Definition at line 155 of file ImageMaskEditor.cpp.

◆ sizeHint()

QSize sizeHint ( ) const
override

Definition at line 113 of file ImageMaskEditor.cpp.

+ Here is the call graph for this function:

◆ transparentColor()

const QColor & transparentColor ( ) const

Definition at line 71 of file ImageMaskEditor.cpp.


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