• 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
KoTriangleColorSelector.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2008 Cyrille Berger <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.1-or-later
5  */
6 
7 #ifndef _KO_TRIANGLE_COLOR_SELECTOR_H_
8 #define _KO_TRIANGLE_COLOR_SELECTOR_H_
9 
10 #include <QWidget>
11 
12 #include "kritawidgets_export.h"
13 
14 #include <KisColorSelectorInterface.h>
15 
16 class KoColor;
17 class KoColorDisplayRendererInterface;
18 
19 
20 class KRITAWIDGETS_EXPORT KoTriangleColorSelector : public KisColorSelectorInterface {
21  Q_OBJECT
22  public:
23  explicit KoTriangleColorSelector(QWidget *parent);
24  explicit KoTriangleColorSelector(const KoColorDisplayRendererInterface *displayRenderer, QWidget *parent);
25  ~KoTriangleColorSelector() override;
26  protected: // events
27  void paintEvent( QPaintEvent * event ) override;
28  void resizeEvent( QResizeEvent * event ) override;
29  void mouseReleaseEvent( QMouseEvent * event ) override;
30  void mousePressEvent( QMouseEvent * event ) override;
31  void mouseMoveEvent( QMouseEvent * event ) override;
32  public:
33  int hue() const;
34  int value() const;
35  int saturation() const;
36  KoColor getCurrentColor() const override;
37  public Q_SLOTS:
38  void setHue(int h);
39  void setValue(int v);
40  void setSaturation(int s);
41  void setHSV(int h, int s, int v);
42  void slotSetColor(const KoColor& ) override;
43  Q_SIGNALS:
44  void colorChanged(const QColor& );
45  void requestCloseContainer();
46  private Q_SLOTS:
47  void configurationChanged();
48  private:
49  void tellColorChanged();
50  void generateTriangle();
51  void generateWheel();
52  void updateTriangleCircleParameters();
53  void selectColorAt(int x, int y, bool checkInWheel = true);
54  private:
55  struct Private;
56  Private* const d;
57 };
58 
59 #endif
QColor
KisColorSelectorInterface::getCurrentColor
virtual KoColor getCurrentColor() const =0
QWidget::paintEvent
virtual void paintEvent(QPaintEvent *event)
QWidget::resizeEvent
virtual void resizeEvent(QResizeEvent *event)
QWidget
KisColorSelectorInterface.h
QMouseEvent
KisColorSelectorInterface::slotSetColor
virtual void slotSetColor(const KoColor &c)=0
QWidget::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *event)
QResizeEvent
QPaintEvent
Private
KisColorSelectorInterface
Definition: KisColorSelectorInterface.h:18
QWidget::mouseMoveEvent
virtual void mouseMoveEvent(QMouseEvent *event)
QWidget::mousePressEvent
virtual void mousePressEvent(QMouseEvent *event)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 11:48:23 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