Source-highlight Qt Library
srchiliteqt::LanguageElemColorForm Class Reference

A form that can be used to select the style of a language element to highlight (for instance, color, bold, italic, etc.). More...

#include <LanguageElemColorForm.h>

Collaboration diagram for srchiliteqt::LanguageElemColorForm:

Public Member Functions

 LanguageElemColorForm (QWidget *parent=0)
void setColorDescription (const QString &name)
 Sets the color description label.
void setColor (const QColor &color)
 Sets the color of the foreground button (if valid)
void setBackgroundColor (const QColor &color)
 Sets the color of the background button (if valid)
const QColor & getColor () const
const QColor & getBackgroundColor () const
bool isBold () const
void setBold (bool b)
bool isItalic () const
void setItalic (bool i)
bool isUnderline () const
void setUnderline (bool u)
bool isMonospace () const
void setMonospace (bool m)

Protected Member Functions

virtual void changeEvent (QEvent *e)

Private Slots

void selectBackground ()
void selectForeground ()

Private Attributes

Ui::LanguageElemColorFormm_ui
QColor foreground
QColor background

Detailed Description

A form that can be used to select the style of a language element to highlight (for instance, color, bold, italic, etc.).

Member Function Documentation

const QColor& srchiliteqt::LanguageElemColorForm::getBackgroundColor ( ) const
inline
Returns
the color of the background
const QColor& srchiliteqt::LanguageElemColorForm::getColor ( ) const
inline
Returns
the color of the foreground
void srchiliteqt::LanguageElemColorForm::setBackgroundColor ( const QColor &  color)

Sets the color of the background button (if valid)

Parameters
colorthe color of the button
void srchiliteqt::LanguageElemColorForm::setColor ( const QColor &  color)

Sets the color of the foreground button (if valid)

Parameters
colorthe color of the button
void srchiliteqt::LanguageElemColorForm::setColorDescription ( const QString &  name)

Sets the color description label.

Parameters
namethe color description label

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