[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
KLFColorChooseWidgetPane Class Reference

A pane displaying a gradient of colors, controlling one or two (arbitrary) components of a color. More...

#include <klfcolorchooser.h>

Inheritance diagram for KLFColorChooseWidgetPane:
Collaboration diagram for KLFColorChooseWidgetPane:

Public Slots

void setColor (const QColor &newcolor)
void setPaneType (const QString &panetype)

Signals

void colorChanged (const QColor &color)

Public Member Functions

 KLFColorChooseWidgetPane (QWidget *parent=0)
virtual ~KLFColorChooseWidgetPane ()
QString paneType () const
QColor color () const
QSize sizeHint () const
QSize minimumSizeHint () const

Protected Member Functions

virtual void paintEvent (QPaintEvent *e)
virtual void mousePressEvent (QMouseEvent *e)
virtual void mouseMoveEvent (QMouseEvent *e)
virtual void wheelEvent (QWheelEvent *e)
virtual void keyPressEvent (QKeyEvent *e)
Protected Member Functions inherited from KLFColorComponentsEditorBase
int valueAFromNewColor (const QColor &color) const
int valueBFromNewColor (const QColor &color) const
int valueA () const
int valueB () const
int valueAMax () const
int valueBMax () const
QColor colorFromValues (QColor color_base, int value_a, int value_b=-1)
bool refreshColorFromInternalValues (int value_a, int value_b=-1)

Properties

QString paneType
QColor color

Additional Inherited Members

Static Protected Member Functions inherited from KLFColorComponentsEditorBase
static int valueFromNewColor (const QColor &color, const QString &component)
static int valueMax (const QString &component)
Protected Attributes inherited from KLFColorComponentsEditorBase
QColor _color
QString _colorcomponent
QString _colorcomponent_b

Detailed Description

A pane displaying a gradient of colors, controlling one or two (arbitrary) components of a color.

Most common would be eg. hue and saturation in the big pane in most common selection dialogs.

The pane type is the two components that this pane is editing, concatenated with a "+" sign, eg. a red-blue 2-D editor pane would be described by the pane type "Red+Blue". Note that pane types are case-insensitive and are converted to lower case.

This class can also display only one editing dimension and keep the other fixed, just give "fix" to that fixed dimension.

For an example, look at the dynamic properties set in klfcolorchoosewidget.ui in each color pane widget.

The zeros of the components are placed top left of the pane.

Definition at line 274 of file klfcolorchooser.h.

Constructor & Destructor Documentation

◆ KLFColorChooseWidgetPane()

KLFColorChooseWidgetPane::KLFColorChooseWidgetPane ( QWidget * parent = 0)

Definition at line 178 of file klfcolorchooser.cpp.

References KLFColorComponentsEditorBase::_color, and setPaneType().

◆ ~KLFColorChooseWidgetPane()

virtual KLFColorChooseWidgetPane::~KLFColorChooseWidgetPane ( )
inlinevirtual

Definition at line 281 of file klfcolorchooser.h.

Member Function Documentation

◆ color()

QColor KLFColorChooseWidgetPane::color ( ) const
inline

Definition at line 284 of file klfcolorchooser.h.

References KLFColorComponentsEditorBase::_color.

◆ colorChanged

void KLFColorChooseWidgetPane::colorChanged ( const QColor & color)
signal

◆ keyPressEvent()

◆ minimumSizeHint()

QSize KLFColorChooseWidgetPane::minimumSizeHint ( ) const

Definition at line 189 of file klfcolorchooser.cpp.

◆ mouseMoveEvent()

◆ mousePressEvent()

◆ paintEvent()

◆ paneType()

QString KLFColorChooseWidgetPane::paneType ( ) const
inline

◆ setColor

void KLFColorChooseWidgetPane::setColor ( const QColor & newcolor)
slot

◆ setPaneType

void KLFColorChooseWidgetPane::setPaneType ( const QString & panetype)
slot

◆ sizeHint()

QSize KLFColorChooseWidgetPane::sizeHint ( ) const

◆ wheelEvent()

Property Documentation

◆ color

QColor KLFColorChooseWidgetPane::color
readwrite

Definition at line 278 of file klfcolorchooser.h.

Referenced by colorChanged().

◆ paneType

QString KLFColorChooseWidgetPane::paneType
readwrite

Definition at line 277 of file klfcolorchooser.h.


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

Generated by doxygen 1.14.0