Main Page   Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

QOptionsWidget Class Reference

Widget for controlling options for the main display in the program. More...

#include <qoptionswidget.h>

Class diagram for QOptionsWidget:

QDialog

List of all members.

Public Members

 QOptionsWidget ()
 ~QOptionsWidget ()
int fontSize () const
const char* fontFamily () const
QColor fontColor () const
QColor bgColor () const
QColor dolarColor () const

Public Slots

void setFontSize ( int )
void setFontFamily ( const char* )
void setFontColor ( QColor )
void setBgColor ( QColor )
void setDolarColor ( QColor )

Protected Members

int font_size
QString font_family
QColor font_color
QColor dolar_color
QColor bg_color
QSpinBox* font_size_widget
QComboBox* font_family_widget
QComboBox* font_color_widget
QComboBox* bg_color_widget
QComboBox* dolar_color_widget

Protected Slots

void accept ()
void reject ()

Static Protected Members

void setSelectedColor ( QComboBox* widget, QColor color )
const char* font_families []
const QColor* colors []

Detailed Description

Widget for controlling options for the main display in the program.

This class provides a simple layouted widgets that allow control over such parameters as font family, size, color and background color. All of the values controlled by the child widgets can be accessed via the following pairs of functions: fontSize(), setFontSize(), fontFamily(), setFontFamily(), fontColor(), setFontColor(), bgColor(), setBgColor().


Member Function Documentation

QOptionsWidget::QOptionsWidget ()

Constructor.

Constructs QOptionsWidget as a modal dialog without any parent. This method further constructs and layouts the controls and initialises them with the default values.

QOptionsWidget::~QOptionsWidget ()

Destructor.

Does nothing.

int QOptionsWidget::fontSize () const [inline]

Returns font_size value.

const char * QOptionsWidget::fontFamily () const [inline]

Returns font_family value.

QColor QOptionsWidget::fontColor () const [inline]

Returns font_color value.

QColor QOptionsWidget::bgColor () const [inline]

Returns bg_color value.

QColor QOptionsWidget::dolarColor () const [inline]

Returns dolar_color value;.

void QOptionsWidget::setFontSize (int size) [slot]

Sets font_size value.

This method updates bot the font_size and font_size_widget members according to given value.

Parameters:
size   the size of font in points.

void QOptionsWidget::setFontFamily (const char * family) [slot]

Sets font_family value.

This method updates bot the font_family and font_family_widget members according to given value. If the family name is not in the static list, it is inserted at the begining of the list.

Parameters:
family   the name of the font family.

void QOptionsWidget::setFontColor (QColor color) [slot]

Sets font_color value.

This method updates bot the font_color and font_color_widget members according to given value. If the color is not on the static list of colors, the default black is chosen.

Parameters:
color   the color of the font.

void QOptionsWidget::setBgColor (QColor color) [slot]

Sets bg_color value.

This method updates bot the bg_color and bg_color_widget members according to given value. If the color is not on the static list of colors, the default black is chosen.

Parameters:
color   the color of the background.

void QOptionsWidget::setDolarColor (QColor color) [slot]

Sets dolar_color value.

This method updates bot the dolar_color and dolar_color_widget members according to given value. If the color is not on the static list of colors, the default black is chosen.

Parameters:
color   the color of the background.

void QOptionsWidget::accept () [protected, slot]

Overloaded QDialog::accept() slot.

This function updates all members of the class according to the state of the controls and calls QDialog::accept().

void QOptionsWidget::reject () [protected, slot]

Overloaded QDialog::reject() slot.

This function simply calls QDialog::reject(), so in a way it is totally not needed here, but who knows what will happen in the future ?

void QOptionsWidget::setSelectedColor (QComboBox * widget, QColor color) [static, protected]

Just a helper function.

This function searches through the list of static colors in order to find the one that is given as a parameter. If it succeeds, the appropriate combobox item is selected.


Member Data Documentation

int QOptionsWidget::font_size [protected]

Size of the font in points.

QString QOptionsWidget::font_family [protected]

Family of the font (helvetica, times, etc.).

QColor QOptionsWidget::font_color [protected]

Color of the font.

QColor QOptionsWidget::dolar_color [protected]

Color of the font in '$' scope.

QColor QOptionsWidget::bg_color [protected]

Color of the background.

QSpinBox* QOptionsWidget::font_size_widget [protected]

Spinbox control for the size of the font.

QComboBox* QOptionsWidget::font_family_widget [protected]

Combobox control for the family of the font.

QComboBox* QOptionsWidget::font_color_widget [protected]

Combobox control for the color of the font.

QComboBox* QOptionsWidget::bg_color_widget [protected]

Combobox control for the color of the background.

QComboBox* QOptionsWidget::dolar_color_widget [protected]

Combobox control for the color of the font in '$' scope.

const char* QOptionsWidget::font_families[] [static, protected]

const QColor* QOptionsWidget::colors[] [static, protected]


The documentation for this class was generated from the following files:
Generated at Thu Jul 13 15:38:11 2000 for Prompt Show by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999