digiKam
Digikam::SketchWidget Class Reference
+ Inheritance diagram for Digikam::SketchWidget:

Public Slots

void setPenColor (const QColor &newColor)
 
void setPenWidth (int newWidth)
 
void slotClear ()
 
void slotRedo ()
 
void slotUndo ()
 

Signals

void signalPenColorChanged (const QColor &)
 
void signalPenSizeChanged (int)
 
void signalSketchChanged (const QImage &)
 
void signalUndoRedoStateChanged (bool hasUndo, bool hasRedo)
 

Public Member Functions

bool isClear () const
 
QColor penColor () const
 
int penWidth () const
 
void setSketchImage (const QImage &image)
 
bool setSketchImageFromXML (const QString &xml)
 
bool setSketchImageFromXML (QXmlStreamReader &reader)
 
QImage sketchImage () const
 
QString sketchImageToXML ()
 
void sketchImageToXML (QXmlStreamWriter &writer)
 
 SketchWidget (QWidget *const parent=nullptr)
 
 ~SketchWidget () override
 

Protected Member Functions

void keyPressEvent (QKeyEvent *) override
 
void keyReleaseEvent (QKeyEvent *) override
 
void mouseMoveEvent (QMouseEvent *) override
 
void mousePressEvent (QMouseEvent *) override
 
void mouseReleaseEvent (QMouseEvent *) override
 
void paintEvent (QPaintEvent *) override
 
void wheelEvent (QWheelEvent *) override
 

Constructor & Destructor Documentation

◆ SketchWidget()

Digikam::SketchWidget::SketchWidget ( QWidget *const  parent = nullptr)
explicit

References slotClear().

◆ ~SketchWidget()

Digikam::SketchWidget::~SketchWidget ( )
override

Member Function Documentation

◆ isClear()

bool Digikam::SketchWidget::isClear ( ) const

◆ keyPressEvent()

void Digikam::SketchWidget::keyPressEvent ( QKeyEvent *  e)
overrideprotected

◆ keyReleaseEvent()

void Digikam::SketchWidget::keyReleaseEvent ( QKeyEvent *  e)
overrideprotected

◆ mouseMoveEvent()

void Digikam::SketchWidget::mouseMoveEvent ( QMouseEvent *  e)
overrideprotected

◆ mousePressEvent()

void Digikam::SketchWidget::mousePressEvent ( QMouseEvent *  e)
overrideprotected

◆ mouseReleaseEvent()

void Digikam::SketchWidget::mouseReleaseEvent ( QMouseEvent *  e)
overrideprotected

◆ paintEvent()

void Digikam::SketchWidget::paintEvent ( QPaintEvent *  )
overrideprotected

◆ penColor()

QColor Digikam::SketchWidget::penColor ( ) const

◆ penWidth()

int Digikam::SketchWidget::penWidth ( ) const

◆ setPenColor

void Digikam::SketchWidget::setPenColor ( const QColor &  newColor)
slot

◆ setPenWidth

void Digikam::SketchWidget::setPenWidth ( int  newWidth)
slot

◆ setSketchImage()

void Digikam::SketchWidget::setSketchImage ( const QImage &  image)

◆ setSketchImageFromXML() [1/2]

bool Digikam::SketchWidget::setSketchImageFromXML ( const QString &  xml)

◆ setSketchImageFromXML() [2/2]

bool Digikam::SketchWidget::setSketchImageFromXML ( QXmlStreamReader &  reader)

This method set sketch image using XML data based on drawing line history. Return true if data are imported successfully.

References signalUndoRedoStateChanged().

Referenced by setSketchImageFromXML().

◆ signalPenColorChanged

void Digikam::SketchWidget::signalPenColorChanged ( const QColor &  )
signal

Referenced by mousePressEvent().

◆ signalPenSizeChanged

void Digikam::SketchWidget::signalPenSizeChanged ( int  )
signal

Referenced by wheelEvent().

◆ signalSketchChanged

void Digikam::SketchWidget::signalSketchChanged ( const QImage &  )
signal

◆ signalUndoRedoStateChanged

void Digikam::SketchWidget::signalUndoRedoStateChanged ( bool  hasUndo,
bool  hasRedo 
)
signal

◆ sketchImage()

QImage Digikam::SketchWidget::sketchImage ( ) const

◆ sketchImageToXML() [1/2]

QString Digikam::SketchWidget::sketchImageToXML ( )

◆ sketchImageToXML() [2/2]

void Digikam::SketchWidget::sketchImageToXML ( QXmlStreamWriter &  writer)

This method return the drawing line history as XML, to be stored in database as SAlbum data.

Referenced by Digikam::SearchModificationHelper::createFuzzySearchFromSketch().

◆ slotClear

void Digikam::SketchWidget::slotClear ( )
slot

References signalUndoRedoStateChanged().

Referenced by SketchWidget().

◆ slotRedo

void Digikam::SketchWidget::slotRedo ( )
slot

◆ slotUndo

void Digikam::SketchWidget::slotUndo ( )
slot

◆ wheelEvent()

void Digikam::SketchWidget::wheelEvent ( QWheelEvent *  e)
overrideprotected

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