• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • krita API Reference
  • KDE Home
  • Contact Us
 

KritaWidgets

  • sources
  • kfour-appscomplete
  • krita
  • libs
  • widgets
KisVisualRectangleSelectorShape.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Wolthera van Hovell tot Westerflier <[email protected]>, (C) 2016
3  *
4  * SPDX-License-Identifier: GPL-2.0-or-later
5  */
6 #ifndef KIS_VISUAL_RECTANGLE_SELECTOR_SHAPE_H
7 #define KIS_VISUAL_RECTANGLE_SELECTOR_SHAPE_H
8 
9 #include "KisVisualColorSelectorShape.h"
10 
11 class KisVisualRectangleSelectorShape : public KisVisualColorSelectorShape
12 {
13  Q_OBJECT
14 public:
15  enum singelDTypes{vertical, horizontal, border, borderMirrored};
16  explicit KisVisualRectangleSelectorShape(QWidget *parent,
17  Dimensions dimension,
18  const KoColorSpace *cs,
19  int channel1, int channel2,
20  const KoColorDisplayRendererInterface *displayRenderer = KoDumbColorDisplayRenderer::instance(), int width=20,
21  KisVisualRectangleSelectorShape::singelDTypes d = KisVisualRectangleSelectorShape::vertical
22  );
23  ~KisVisualRectangleSelectorShape() override;
24 
25  void setBorderWidth(int width) override;
26 
32  QRect getSpaceForSquare(QRect geom) override;
33  QRect getSpaceForCircle(QRect geom) override;
34  QRect getSpaceForTriangle(QRect geom) override;
35 protected:
36  QImage renderAlphaMask() const override;
37 
38 private:
39  QPointF convertShapeCoordinateToWidgetCoordinate(QPointF coordinate) const override;
40  QPointF convertWidgetCoordinateToShapeCoordinate(QPointF coordinate) const override;
41 
42  singelDTypes m_type;
43  int m_barWidth;
44  QRegion getMaskMap() override;
45  void drawCursor() override;
46 };
47 
48 #endif
KisVisualRectangleSelectorShape::singelDTypes
singelDTypes
Definition: KisVisualRectangleSelectorShape.h:15
QRegion
KisVisualRectangleSelectorShape::renderAlphaMask
QImage renderAlphaMask() const override
render the alpha mask for the widget background the returned image is expected to be QImage::Format_A...
Definition: KisVisualRectangleSelectorShape.cpp:263
KisVisualRectangleSelectorShape::getSpaceForCircle
QRect getSpaceForCircle(QRect geom) override
Definition: KisVisualRectangleSelectorShape.cpp:62
QRect
KisVisualColorSelectorShape::Dimensions
Dimensions
The Dimensions enum Whether or not the shape is single or two dimensional.
Definition: KisVisualColorSelectorShape.h:45
QWidget
KisVisualRectangleSelectorShape::setBorderWidth
void setBorderWidth(int width) override
setBorderWidth set the border of the single dimensional selector.
Definition: KisVisualRectangleSelectorShape.cpp:36
QPointF
KisVisualRectangleSelectorShape::border
Definition: KisVisualRectangleSelectorShape.h:15
KisVisualRectangleSelectorShape::borderMirrored
Definition: KisVisualRectangleSelectorShape.h:15
KisVisualRectangleSelectorShape::vertical
Definition: KisVisualRectangleSelectorShape.h:15
KisVisualRectangleSelectorShape::KisVisualRectangleSelectorShape
KisVisualRectangleSelectorShape(QWidget *parent, Dimensions dimension, const KoColorSpace *cs, int channel1, int channel2, const KoColorDisplayRendererInterface *displayRenderer=KoDumbColorDisplayRenderer::instance(), int width=20, KisVisualRectangleSelectorShape::singelDTypes d=KisVisualRectangleSelectorShape::vertical)
Definition: KisVisualRectangleSelectorShape.cpp:17
KisVisualColorSelectorShape.h
KisVisualColorSelectorShape
The KisVisualColorSelectorShape class A 2d widget can represent at maximum 2 coordinates.
Definition: KisVisualColorSelectorShape.h:37
KisVisualRectangleSelectorShape
Definition: KisVisualRectangleSelectorShape.h:11
KisVisualRectangleSelectorShape::~KisVisualRectangleSelectorShape
~KisVisualRectangleSelectorShape() override
Definition: KisVisualRectangleSelectorShape.cpp:31
KisVisualRectangleSelectorShape::getSpaceForTriangle
QRect getSpaceForTriangle(QRect geom) override
Definition: KisVisualRectangleSelectorShape.cpp:67
KisVisualRectangleSelectorShape::horizontal
Definition: KisVisualRectangleSelectorShape.h:15
QWidget::width
int width() const
KisVisualRectangleSelectorShape::getSpaceForSquare
QRect getSpaceForSquare(QRect geom) override
getSpaceForSquare
Definition: KisVisualRectangleSelectorShape.cpp:41
QImage
QObject::parent
QObject * parent() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 11:48:22 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KritaWidgets

Skip menu "KritaWidgets"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

krita API Reference

Skip menu "krita API Reference"
  • libs
  •   KritaBasicFlakes
  •   brush
  •   KritaUndo2
  •   KritaFlake
  •   image
  •   KritaPlugin
  •   Krita
  •   KritaPigment
  •   KritaResources
  •   KritaStore
  •   ui
  •   KritaWidgets
  •   KritaWidgetUtils
  • plugins
  •   Assitants
  •   Extensions
  •   Filters
  •   Generators
  •   Formats
  •           src
  •   PaintOps
  •     libpaintop

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal