[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for KLFColorChooseWidgetPane:
Collaboration graph
[legend]

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

Referenced by setColor().

◆ keyPressEvent()

void KLFColorChooseWidgetPane::keyPressEvent ( QKeyEvent e)
protectedvirtual

◆ minimumSizeHint()

QSize KLFColorChooseWidgetPane::minimumSizeHint ( ) const

Definition at line 189 of file klfcolorchooser.cpp.

◆ mouseMoveEvent()

void KLFColorChooseWidgetPane::mouseMoveEvent ( QMouseEvent e)
protectedvirtual

◆ mousePressEvent()

void KLFColorChooseWidgetPane::mousePressEvent ( QMouseEvent e)
protectedvirtual

◆ paintEvent()

void KLFColorChooseWidgetPane::paintEvent ( QPaintEvent e)
protectedvirtual

◆ 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()

void KLFColorChooseWidgetPane::wheelEvent ( QWheelEvent e)
protectedvirtual

Property Documentation

◆ color

QColor KLFColorChooseWidgetPane::color
readwrite

Definition at line 277 of file klfcolorchooser.h.

◆ 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.8.13