[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
Public Slots | Public Member Functions | Static Public Member Functions | Properties | List of all members
KLFColorDialog Class Reference

A dialog to let the user select a color. More...

#include <klfcolorchooser.h>

Inheritance diagram for KLFColorDialog:
Inheritance graph
[legend]
Collaboration diagram for KLFColorDialog:
Collaboration graph
[legend]

Public Slots

void setColor (const QColor &color)
 

Public Member Functions

 KLFColorDialog (QWidget *parent=0)
 
virtual ~KLFColorDialog ()
 
KLFColorChooseWidgetcolorChooseWidget ()
 
QColor color () const
 

Static Public Member Functions

static QColor getColor (QColor startwith=Qt::black, bool alphaenabled=true, QWidget *parent=0)
 

Properties

QColor color
 

Detailed Description

A dialog to let the user select a color.

Invocation of the dialog is done

Possibility to select either solid colors only or arbitrarily transparent colors (alpha): set the correct parameters to the static getColor() function.

Definition at line 397 of file klfcolorchooser.h.

Constructor & Destructor Documentation

◆ KLFColorDialog()

KLFColorDialog::KLFColorDialog ( QWidget *  parent = 0)

Constructor. If you build the dialog this way, you will have to initialize the colorChooseWidget() manually. Consider using getColor() instead.

Definition at line 52 of file klfcolorchooser.cpp.

◆ ~KLFColorDialog()

KLFColorDialog::~KLFColorDialog ( )
virtual

Definition at line 58 of file klfcolorchooser.cpp.

Member Function Documentation

◆ color()

QColor KLFColorDialog::color ( ) const

Referenced by getColor(), and setColor().

◆ colorChooseWidget()

KLFColorChooseWidget * KLFColorDialog::colorChooseWidget ( )

Accessor to the KLFColorChooseWidget that is displayed in the dialog.

Definition at line 63 of file klfcolorchooser.cpp.

◆ getColor()

QColor KLFColorDialog::getColor ( QColor  startwith = Qt::black,
bool  alphaenabled = true,
QWidget *  parent = 0 
)
static

static method to invoke a new instance of the dialog, display it to user with the given settings (starts displaying the color startwith, and allows the user to select (semi-)transparent colors if alphaenabled is set).

Returns the color which was chosen, or a QColor() if user canceled.

Definition at line 68 of file klfcolorchooser.cpp.

References color().

Referenced by KLFColorChooser::requestColor().

◆ setColor

void KLFColorDialog::setColor ( const QColor color)
slot

Definition at line 84 of file klfcolorchooser.cpp.

References KLFColorChooseWidget::addRecentColor(), and color().

Property Documentation

◆ color

QColor KLFColorDialog::color
readwrite

Definition at line 401 of file klfcolorchooser.h.


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

Generated by doxygen 1.8.13