digiKam
DigikamEditorRatioCropToolPlugin::RatioCropWidget Class Reference
+ Inheritance diagram for DigikamEditorRatioCropToolPlugin::RatioCropWidget:

Public Types

enum  CenterType { CenterWidth = 0 , CenterHeight , CenterImage }
 
enum  GuideLineType {
  RulesOfThirds = 0 , DiagonalMethod , HarmoniousTriangles , GoldenMean ,
  GuideNone
}
 
enum  Orient { Landscape = 0 , Portrait }
 
enum  RatioAspect {
  RATIOCUSTOM = 0 , RATIO01X01 , RATIO02x01 , RATIO02x03 ,
  RATIO03X01 , RATIO03X04 , RATIO04X01 , RATIO04X05 ,
  RATIO05x07 , RATIO07x10 , RATIO08x05 , RATIO16x09 ,
  RATIODINA0 , RATIOGOLDEN , RATIOCURRENT , RATIONONE
}
 < Constrained Aspect Ratio list. See RatioCropWidget::setSelectionAspectRatioType() method for crop-value implementations. More...
 

Public Slots

void slotChangeGuideColor (const QColor &color)
 
void slotChangeGuideSize (int size)
 
void slotGuideLines (int guideLinesType)
 

Signals

void signalSelectionChanged (const QRect &rect)
 
void signalSelectionMoved (const QRect &rect)
 
void signalSelectionOrientationChanged (int newOrientation)
 

Public Member Functions

int getHeightStep () const
 
int getMaxHeightRange () const
 
int getMaxWidthRange () const
 
int getMinHeightRange () const
 
int getMinWidthRange () const
 
int getOriginalImageHeight () const
 
int getOriginalImageWidth () const
 
QRect getRegionSelection () const
 
int getWidthStep () const
 
ImageIfaceimageIface () const
 
void maxAspectSelection ()
 
bool preciseCropAvailable () const
 
 RatioCropWidget (int width, int height, bool initDrawing, QWidget *const parent=nullptr)
 
 RatioCropWidget (int width, int height, QWidget *const parent=nullptr)
 
void resetSelection ()
 
void setAutoOrientation (bool orientation)
 
void setBackgroundColor (const QColor &bg)
 
void setCenterSelection (int centerType=CenterImage)
 
void setGoldenGuideTypes (bool drawGoldenSection, bool drawGoldenSpiralSection, bool drawGoldenSpiral, bool drawGoldenTriangle, bool flipHorGoldenGuide, bool flipVerGoldenGuide)
 
void setIsDrawingSelection (bool draw)
 
void setPreciseCrop (bool precise)
 
void setSelectionAspectRatioType (int aspectRatioType)
 
void setSelectionAspectRatioValue (int widthRatioValue, int heightRatioValue)
 
void setSelectionHeight (int h)
 
void setSelectionOrientation (int orient)
 
void setSelectionWidth (int w)
 
void setSelectionX (int x)
 
void setSelectionY (int y)
 
 ~RatioCropWidget () override
 

Protected Member Functions

void mouseMoveEvent (QMouseEvent *) override
 
void mousePressEvent (QMouseEvent *) override
 
void mouseReleaseEvent (QMouseEvent *) override
 
void paintEvent (QPaintEvent *) override
 
void resizeEvent (QResizeEvent *) override
 

Member Enumeration Documentation

◆ CenterType

Enumerator
CenterWidth 

Center selection to the center of image width.

CenterHeight 

Center selection to the center of image height.

CenterImage 

Center selection to the center of image.

◆ GuideLineType

Enumerator
RulesOfThirds 

Line guides position to 1/3 width and height.

DiagonalMethod 

Diagonal Method to improve composition.

HarmoniousTriangles 

Harmonious Triangle to improve composition.

GoldenMean 

Guides tools using Phi ratio (1.618).

GuideNone 

No guide line.

◆ Orient

Enumerator
Landscape 
Portrait 

◆ RatioAspect

< Constrained Aspect Ratio list. See RatioCropWidget::setSelectionAspectRatioType() method for crop-value implementations.

Enumerator
RATIOCUSTOM 

Custom aspect ratio.

RATIO01X01 

1:1

RATIO02x01 

2:1

RATIO02x03 

2:3

RATIO03X01 

3:1

RATIO03X04 

3:4

RATIO04X01 

4:1

RATIO04X05 

4:5

RATIO05x07 

5:7

RATIO07x10 

7:10

RATIO08x05 

8:5

RATIO16x09 

19:9

RATIODINA0 

DIN A.

RATIOGOLDEN 

Golden ratio : 1:1.618.

RATIOCURRENT 

Current loaded image aspect ratio.

RATIONONE 

No aspect ratio.

Constructor & Destructor Documentation

◆ RatioCropWidget() [1/2]

DigikamEditorRatioCropToolPlugin::RatioCropWidget::RatioCropWidget ( int  width,
int  height,
QWidget *const  parent = nullptr 
)

◆ RatioCropWidget() [2/2]

DigikamEditorRatioCropToolPlugin::RatioCropWidget::RatioCropWidget ( int  width,
int  height,
bool  initDrawing,
QWidget *const  parent = nullptr 
)

◆ ~RatioCropWidget()

DigikamEditorRatioCropToolPlugin::RatioCropWidget::~RatioCropWidget ( )
override

Member Function Documentation

◆ getHeightStep()

int DigikamEditorRatioCropToolPlugin::RatioCropWidget::getHeightStep ( ) const

◆ getMaxHeightRange()

int DigikamEditorRatioCropToolPlugin::RatioCropWidget::getMaxHeightRange ( ) const

References RATIONONE.

◆ getMaxWidthRange()

int DigikamEditorRatioCropToolPlugin::RatioCropWidget::getMaxWidthRange ( ) const

References RATIONONE.

◆ getMinHeightRange()

int DigikamEditorRatioCropToolPlugin::RatioCropWidget::getMinHeightRange ( ) const

References MINRANGE.

◆ getMinWidthRange()

int DigikamEditorRatioCropToolPlugin::RatioCropWidget::getMinWidthRange ( ) const

References MINRANGE.

◆ getOriginalImageHeight()

int DigikamEditorRatioCropToolPlugin::RatioCropWidget::getOriginalImageHeight ( ) const

◆ getOriginalImageWidth()

int DigikamEditorRatioCropToolPlugin::RatioCropWidget::getOriginalImageWidth ( ) const

◆ getRegionSelection()

QRect DigikamEditorRatioCropToolPlugin::RatioCropWidget::getRegionSelection ( ) const

◆ getWidthStep()

int DigikamEditorRatioCropToolPlugin::RatioCropWidget::getWidthStep ( ) const

◆ imageIface()

ImageIface * DigikamEditorRatioCropToolPlugin::RatioCropWidget::imageIface ( ) const

◆ maxAspectSelection()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::maxAspectSelection ( )

Draw a new centered selection with max size

References CenterImage, Portrait, RATIONONE, and setCenterSelection().

◆ mouseMoveEvent()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::mouseMoveEvent ( QMouseEvent *  e)
overrideprotected

◆ mousePressEvent()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::mousePressEvent ( QMouseEvent *  e)
overrideprotected

◆ mouseReleaseEvent()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::mouseReleaseEvent ( QMouseEvent *  )
overrideprotected

◆ paintEvent()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::paintEvent ( QPaintEvent *  )
overrideprotected

◆ preciseCropAvailable()

bool DigikamEditorRatioCropToolPlugin::RatioCropWidget::preciseCropAvailable ( ) const

◆ resetSelection()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::resetSelection ( )

Draw a new centered selection with half width (if orientation = Landscape) or with half height (if orientation = Portrait)

References CenterImage, Portrait, and setCenterSelection().

◆ resizeEvent()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::resizeEvent ( QResizeEvent *  e)
overrideprotected

◆ setAutoOrientation()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::setAutoOrientation ( bool  orientation)

◆ setBackgroundColor()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::setBackgroundColor ( const QColor &  bg)

◆ setCenterSelection()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::setCenterSelection ( int  centerType = CenterImage)

References CenterHeight, and CenterWidth.

Referenced by maxAspectSelection(), and resetSelection().

◆ setGoldenGuideTypes()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::setGoldenGuideTypes ( bool  drawGoldenSection,
bool  drawGoldenSpiralSection,
bool  drawGoldenSpiral,
bool  drawGoldenTriangle,
bool  flipHorGoldenGuide,
bool  flipVerGoldenGuide 
)

◆ setIsDrawingSelection()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::setIsDrawingSelection ( bool  draw)

◆ setPreciseCrop()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::setPreciseCrop ( bool  precise)

◆ setSelectionAspectRatioType()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::setSelectionAspectRatioType ( int  aspectRatioType)

◆ setSelectionAspectRatioValue()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::setSelectionAspectRatioValue ( int  widthRatioValue,
int  heightRatioValue 
)

◆ setSelectionHeight()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::setSelectionHeight ( int  h)

◆ setSelectionOrientation()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::setSelectionOrientation ( int  orient)

◆ setSelectionWidth()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::setSelectionWidth ( int  w)

◆ setSelectionX()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::setSelectionX ( int  x)

◆ setSelectionY()

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::setSelectionY ( int  y)

◆ signalSelectionChanged

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::signalSelectionChanged ( const QRect &  rect)
signal

◆ signalSelectionMoved

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::signalSelectionMoved ( const QRect &  rect)
signal

◆ signalSelectionOrientationChanged

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::signalSelectionOrientationChanged ( int  newOrientation)
signal

◆ slotChangeGuideColor

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::slotChangeGuideColor ( const QColor &  color)
slot

◆ slotChangeGuideSize

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::slotChangeGuideSize ( int  size)
slot

◆ slotGuideLines

void DigikamEditorRatioCropToolPlugin::RatioCropWidget::slotGuideLines ( int  guideLinesType)
slot

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