digiKam
DigikamEditorInsertTextToolPlugin::InsertTextWidget Class Reference
+ Inheritance diagram for DigikamEditorInsertTextToolPlugin::InsertTextWidget:

Public Types

enum  Action {
  ALIGN_LEFT = 0 , ALIGN_RIGHT , ALIGN_CENTER , ALIGN_BLOCK ,
  BORDER_TEXT , TRANSPARENT_TEXT
}
 
enum  BorderMode { BORDER_NONE = 0 , BORDER_SUPPORT , BORDER_NORMAL }
 
enum  TextRotation { ROTATION_NONE = 0 , ROTATION_90 , ROTATION_180 , ROTATION_270 }
 

Public Member Functions

QRect getPositionHint () const
 
ImageIfaceimageIface () const
 
 InsertTextWidget (int w, int h, QWidget *const parent=nullptr)
 
DImg makeInsertText ()
 
void resetEdit ()
 
void setBackgroundColor (const QColor &bg)
 
void setPositionHint (const QRect &hint)
 
void setText (const QString &text, const QFont &font, const QColor &color, int opacity, int alignMode, bool border, bool transparent, int rotation)
 
 ~InsertTextWidget () override
 

Protected Member Functions

QRect composeImage (DImg *const image, QPainter *const destPainter, int x, int y, QFont font, float pointSize, int textRotation, QColor textColor, int textOpacity, int alignMode, const QString &textString, bool transparentBackground, QColor backgroundColor, BorderMode borderMode, int borderWidth, int spacing, float fontScale=1.0f)
 
void makePixmap ()
 
void mouseMoveEvent (QMouseEvent *) override
 
void mousePressEvent (QMouseEvent *) override
 
void mouseReleaseEvent (QMouseEvent *) override
 
void paintEvent (QPaintEvent *) override
 
void resizeEvent (QResizeEvent *) override
 

Member Enumeration Documentation

◆ Action

Enumerator
ALIGN_LEFT 
ALIGN_RIGHT 
ALIGN_CENTER 
ALIGN_BLOCK 
BORDER_TEXT 
TRANSPARENT_TEXT 

◆ BorderMode

Enumerator
BORDER_NONE 
BORDER_SUPPORT 
BORDER_NORMAL 

◆ TextRotation

Enumerator
ROTATION_NONE 
ROTATION_90 
ROTATION_180 
ROTATION_270 

Constructor & Destructor Documentation

◆ InsertTextWidget()

DigikamEditorInsertTextToolPlugin::InsertTextWidget::InsertTextWidget ( int  w,
int  h,
QWidget *const  parent = nullptr 
)
explicit

◆ ~InsertTextWidget()

DigikamEditorInsertTextToolPlugin::InsertTextWidget::~InsertTextWidget ( )
override

Member Function Documentation

◆ composeImage()

QRect DigikamEditorInsertTextToolPlugin::InsertTextWidget::composeImage ( DImg *const  image,
QPainter *const  destPainter,
int  x,
int  y,
QFont  font,
float  pointSize,
int  textRotation,
QColor  textColor,
int  textOpacity,
int  alignMode,
const QString &  textString,
bool  transparentBackground,
QColor  backgroundColor,
BorderMode  borderMode,
int  borderWidth,
int  spacing,
float  fontScale = 1.0f 
)
protected

◆ getPositionHint()

QRect DigikamEditorInsertTextToolPlugin::InsertTextWidget::getPositionHint ( ) const

◆ imageIface()

ImageIface * DigikamEditorInsertTextToolPlugin::InsertTextWidget::imageIface ( ) const

◆ makeInsertText()

DImg DigikamEditorInsertTextToolPlugin::InsertTextWidget::makeInsertText ( )

◆ makePixmap()

void DigikamEditorInsertTextToolPlugin::InsertTextWidget::makePixmap ( )
protected

◆ mouseMoveEvent()

void DigikamEditorInsertTextToolPlugin::InsertTextWidget::mouseMoveEvent ( QMouseEvent *  e)
overrideprotected

References makePixmap().

◆ mousePressEvent()

void DigikamEditorInsertTextToolPlugin::InsertTextWidget::mousePressEvent ( QMouseEvent *  e)
overrideprotected

◆ mouseReleaseEvent()

void DigikamEditorInsertTextToolPlugin::InsertTextWidget::mouseReleaseEvent ( QMouseEvent *  )
overrideprotected

◆ paintEvent()

void DigikamEditorInsertTextToolPlugin::InsertTextWidget::paintEvent ( QPaintEvent *  )
overrideprotected

◆ resetEdit()

void DigikamEditorInsertTextToolPlugin::InsertTextWidget::resetEdit ( )

References makePixmap().

◆ resizeEvent()

void DigikamEditorInsertTextToolPlugin::InsertTextWidget::resizeEvent ( QResizeEvent *  e)
overrideprotected

References makePixmap().

◆ setBackgroundColor()

void DigikamEditorInsertTextToolPlugin::InsertTextWidget::setBackgroundColor ( const QColor &  bg)

Set background color for pixmap

References makePixmap().

◆ setPositionHint()

void DigikamEditorInsertTextToolPlugin::InsertTextWidget::setPositionHint ( const QRect &  hint)

References makePixmap().

◆ setText()

void DigikamEditorInsertTextToolPlugin::InsertTextWidget::setText ( const QString &  text,
const QFont &  font,
const QColor &  color,
int  opacity,
int  alignMode,
bool  border,
bool  transparent,
int  rotation 
)

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