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

#include <klfcolorchooser.h>

Inheritance diagram for KLFColorClickSquare:
Collaboration diagram for KLFColorClickSquare:

Public Slots

void setColor (const QColor &col)
void activate ()
void setSqSize (int sqsize)
void setRemovable (bool removable)

Signals

void activated ()
void colorActivated (const QColor &color)
void wantRemove ()
void wantRemoveColor (const QColor &color)

Public Member Functions

 KLFColorClickSquare (QColor color=Qt::white, int size=16, bool removable=true, QWidget *parent=0)
 KLFColorClickSquare (QWidget *parent)
virtual QSize sizeHint () const
QColor color () const
int sqSize () const
bool removable () const

Protected Member Functions

void paintEvent (QPaintEvent *event)
void resizeEvent (QResizeEvent *event)
void keyPressEvent (QKeyEvent *event)
void mousePressEvent (QMouseEvent *event)
void contextMenuEvent (QContextMenuEvent *event)

Properties

QColor color
int sqSize
bool removable

Detailed Description

Definition at line 47 of file klfcolorchooser.h.

Constructor & Destructor Documentation

◆ KLFColorClickSquare() [1/2]

KLFColorClickSquare::KLFColorClickSquare ( QColor color = Qt::white,
int size = 16,
bool removable = true,
QWidget * parent = 0 )

Definition at line 95 of file klfcolorchooser.cpp.

References color, removable, and setSqSize().

◆ KLFColorClickSquare() [2/2]

KLFColorClickSquare::KLFColorClickSquare ( QWidget * parent)
explicit

Definition at line 101 of file klfcolorchooser.cpp.

References setSqSize().

Member Function Documentation

◆ activate

void KLFColorClickSquare::activate ( )
inlineslot

Definition at line 72 of file klfcolorchooser.h.

References activated(), and colorActivated().

Referenced by keyPressEvent(), and mousePressEvent().

◆ activated

void KLFColorClickSquare::activated ( )
signal

Referenced by activate().

◆ color()

QColor KLFColorClickSquare::color ( ) const
inline

Definition at line 60 of file klfcolorchooser.h.

◆ colorActivated

void KLFColorClickSquare::colorActivated ( const QColor & color)
signal

References color.

Referenced by activate().

◆ contextMenuEvent()

void KLFColorClickSquare::contextMenuEvent ( QContextMenuEvent * event)
protected

Definition at line 162 of file klfcolorchooser.cpp.

References QContextMenuEvent::globalPos().

◆ keyPressEvent()

void KLFColorClickSquare::keyPressEvent ( QKeyEvent * event)
protected

Definition at line 155 of file klfcolorchooser.cpp.

References activate(), and QKeyEvent::key().

◆ mousePressEvent()

void KLFColorClickSquare::mousePressEvent ( QMouseEvent * event)
protected

Definition at line 151 of file klfcolorchooser.cpp.

References activate().

◆ paintEvent()

void KLFColorClickSquare::paintEvent ( QPaintEvent * event)
protected

◆ removable()

bool KLFColorClickSquare::removable ( ) const
inline

Definition at line 62 of file klfcolorchooser.h.

◆ resizeEvent()

void KLFColorClickSquare::resizeEvent ( QResizeEvent * event)
protected

Definition at line 146 of file klfcolorchooser.cpp.

◆ setColor

void KLFColorClickSquare::setColor ( const QColor & col)
inlineslot

Definition at line 71 of file klfcolorchooser.h.

◆ setRemovable

void KLFColorClickSquare::setRemovable ( bool removable)
slot

Definition at line 124 of file klfcolorchooser.cpp.

References removable.

◆ setSqSize

void KLFColorClickSquare::setSqSize ( int sqsize)
slot

Definition at line 115 of file klfcolorchooser.cpp.

Referenced by KLFColorClickSquare(), and KLFColorClickSquare().

◆ sizeHint()

virtual QSize KLFColorClickSquare::sizeHint ( ) const
inlinevirtual

Definition at line 58 of file klfcolorchooser.h.

◆ sqSize()

int KLFColorClickSquare::sqSize ( ) const
inline

Definition at line 61 of file klfcolorchooser.h.

◆ wantRemove

void KLFColorClickSquare::wantRemove ( )
signal

◆ wantRemoveColor

void KLFColorClickSquare::wantRemoveColor ( const QColor & color)
signal

References color.

Property Documentation

◆ color

QColor KLFColorClickSquare::color
readwrite

Definition at line 51 of file klfcolorchooser.h.

Referenced by colorActivated(), KLFColorClickSquare(), and wantRemoveColor().

◆ removable

bool KLFColorClickSquare::removable
readwrite

Definition at line 53 of file klfcolorchooser.h.

Referenced by KLFColorClickSquare(), and setRemovable().

◆ sqSize

int KLFColorClickSquare::sqSize
readwrite

Definition at line 52 of file klfcolorchooser.h.


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

Generated by doxygen 1.14.0