Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CellFormat Class Reference

#include </home/clem/local/src/opie/noncore/apps/opie-sheet/cellformat.h>

Collaboration diagram for CellFormat:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CellFormat (QWidget *parent=0)
 ~CellFormat ()
int exec (Sheet *s)
void setTextAlign (Qt::AlignmentFlags flags)
void setTextFont (const QFont &font, const QColor &color)
void setBrushBackground (const QBrush &brush)

Private Types

enum  comboType {
  COMBO_OTHER, COMBO_WIDTH, COMBO_FONT, COMBO_SIZE,
  COMBO_STYLE, COMBO_COLOR, COMBO_VALIGN, COMBO_HALIGN
}

Private Slots

void borderClicked (BorderEditor::BorderArea area)
void backgroundClicked (int index)
void fontClicked (bool on)
void fontClicked (int index)
void alignClicked (bool on)
void alignClicked (int index)
void slotBordersDefaults ()
void slotBackgroundDefaults ()
void slotFontDefaults ()
void slotAlignmentDefaults ()

Private Member Functions

void createWidthCombo (QComboBox *combo)
void createFontCombo (QComboBox *combo)
void createHAlignCombo (QComboBox *combo)
void createVAlignCombo (QComboBox *combo)
void createStyleCombo (QComboBox *combo)
void createSizeCombo (QComboBox *combo)
void createColorCombo (QComboBox *combo)
QComboBox * createCombo (comboType type, QWidget *parent, const QString &caption, int y)
int findHAlignIndex (Qt::AlignmentFlags flag)
int findVAlignIndex (Qt::AlignmentFlags flag)
int findComboItemIndex (QComboBox *combo, const QString &item)
int findColorIndex (const QColor &color)
int findBrushStyleIndex (Qt::BrushStyle style)

Private Attributes

QBoxLayout * box
QTabWidget * tabs
QWidget * widgetBorders
QWidget * widgetBackground
QWidget * widgetFont
QWidget * widgetAlignment
QComboBox * comboBordersWidth
QComboBox * comboBordersColor
QComboBox * comboBackgroundColor
QComboBox * comboBackgroundStyle
QComboBox * comboFontColor
QComboBox * comboFontSize
QComboBox * comboFontFamily
QComboBox * comboAlignmentVertical
QComboBox * comboAlignmentHorizontal
QCheckBox * checkFontBold
QCheckBox * checkFontItalic
QCheckBox * checkAlignmentWrap
QPushButton * buttonBordersDefaults
QPushButton * buttonBackgroundDefaults
QPushButton * buttonFontDefaults
QPushButton * buttonAlignmentDefaults
QFrame * frameBackground
QFrame * frameFont
QFrame * frameAlignment
QBrush brushBackground
QFont fontFont
QColor fontColor
Qt::AlignmentFlags textAlignment
FontDatabase fontDB
Sheetsheet
BorderEditorborderEditor
bool changedFont
bool changedAlign
bool changedBrush

Member Enumeration Documentation

enum CellFormat::comboType [private]
 

Enumeration values:
COMBO_OTHER 
COMBO_WIDTH 
COMBO_FONT 
COMBO_SIZE 
COMBO_STYLE 
COMBO_COLOR 
COMBO_VALIGN 
COMBO_HALIGN 

Definition at line 82 of file cellformat.h.


Constructor & Destructor Documentation

CellFormat::CellFormat QWidget *  parent = 0  ) 
 

Definition at line 76 of file cellformat.cpp.

References alignClicked(), backgroundClicked(), borderClicked(), borderEditor, box, buttonAlignmentDefaults, buttonBackgroundDefaults, buttonBordersDefaults, buttonFontDefaults, changedAlign, changedBrush, changedFont, checkAlignmentWrap, checkFontBold, checkFontItalic, COMBO_COLOR, COMBO_FONT, COMBO_HALIGN, COMBO_HEIGHTS, COMBO_SIZE, COMBO_STYLE, COMBO_VALIGN, COMBO_WIDTH, comboAlignmentHorizontal, comboAlignmentVertical, comboBackgroundColor, comboBackgroundStyle, comboBordersColor, comboBordersWidth, comboFontColor, comboFontFamily, comboFontSize, createCombo(), FALSE, fontClicked(), fontDB, frameAlignment, frameBackground, frameFont, FontDatabase::loadRenderers(), slotAlignmentDefaults(), slotBackgroundDefaults(), slotBordersDefaults(), slotFontDefaults(), tabs, tr, widgetAlignment, widgetBackground, widgetBorders, and widgetFont.

CellFormat::~CellFormat  ) 
 

Definition at line 171 of file cellformat.cpp.


Member Function Documentation

void CellFormat::alignClicked int  index  )  [private, slot]
 

Definition at line 308 of file cellformat.cpp.

References changedAlign, checkAlignmentWrap, comboAlignmentHorizontal, comboAlignmentVertical, flagsHAlign, flagsVAlign, setTextAlign(), TRUE, and Qt::WordBreak.

void CellFormat::alignClicked bool  on  )  [private, slot]
 

Definition at line 303 of file cellformat.cpp.

Referenced by CellFormat().

void CellFormat::backgroundClicked int  index  )  [private, slot]
 

Definition at line 286 of file cellformat.cpp.

References brushStyles, changedBrush, comboBackgroundColor, comboBackgroundStyle, qtColors, setBrushBackground(), and TRUE.

Referenced by CellFormat().

void CellFormat::borderClicked BorderEditor::BorderArea  area  )  [private, slot]
 

Definition at line 322 of file cellformat.cpp.

References borderEditor, comboBordersColor, comboBordersWidth, BorderEditor::getPen(), Qt::gray, Qt::NoPen, qtColors, BorderEditor::setPen(), and Qt::SolidLine.

Referenced by CellFormat().

void CellFormat::createColorCombo QComboBox *  combo  )  [private]
 

Definition at line 410 of file cellformat.cpp.

References COLOR_COUNT, COMBO_HEIGHTS, i, p, pix, qtColors, Qt::SolidLine, and width.

Referenced by createCombo().

QComboBox * CellFormat::createCombo comboType  type,
QWidget *  parent,
const QString caption,
int  y
[private]
 

Definition at line 339 of file cellformat.cpp.

References COMBO_COLOR, COMBO_FONT, COMBO_HALIGN, COMBO_HEIGHTS, COMBO_SIZE, COMBO_STYLE, COMBO_VALIGN, COMBO_WIDTH, COMBO_WIDTHS, createColorCombo(), createFontCombo(), createHAlignCombo(), createSizeCombo(), createStyleCombo(), createVAlignCombo(), createWidthCombo(), and FALSE.

Referenced by CellFormat().

void CellFormat::createFontCombo QComboBox *  combo  )  [private]
 

Definition at line 391 of file cellformat.cpp.

References FontDatabase::families(), and fontDB.

Referenced by createCombo().

void CellFormat::createHAlignCombo QComboBox *  combo  )  [private]
 

Definition at line 364 of file cellformat.cpp.

References HALIGN_COUNT, and i.

Referenced by createCombo().

void CellFormat::createSizeCombo QComboBox *  combo  )  [private]
 

Definition at line 314 of file cellformat.cpp.

References QValueList< T >::begin(), QValueList< T >::end(), fontDB, i, and QString::number().

Referenced by createCombo().

void CellFormat::createStyleCombo QComboBox *  combo  )  [private]
 

Definition at line 396 of file cellformat.cpp.

References brushStyles, COMBO_HEIGHTS, i, p, pix, STYLE_COUNT, and width.

Referenced by createCombo().

void CellFormat::createVAlignCombo QComboBox *  combo  )  [private]
 

Definition at line 370 of file cellformat.cpp.

References i, and VALIGN_COUNT.

Referenced by createCombo().

void CellFormat::createWidthCombo QComboBox *  combo  )  [private]
 

Definition at line 376 of file cellformat.cpp.

References Qt::black, COMBO_HEIGHTS, i, p, pix, Qt::SolidLine, and width.

Referenced by createCombo().

int CellFormat::exec Sheet s  ) 
 

Definition at line 425 of file cellformat.cpp.

References borderEditor, BorderEditor::Bottom, brushBackground, changedAlign, changedBrush, changedFont, col, fontColor, fontFont, Sheet::getAlignment(), Sheet::getBrush(), BorderEditor::getDefaultPen(), Sheet::getFont(), Sheet::getFontColor(), BorderEditor::getPen(), Sheet::getPen(), Sheet::getSelection(), BorderEditor::Horz, BorderEditor::Left, BorderEditor::Right, row, Sheet::setBrush(), setBrushBackground(), Sheet::setPen(), BorderEditor::setPen(), Sheet::setTextAlign(), setTextAlign(), Sheet::setTextFont(), setTextFont(), sheet, textAlignment, BorderEditor::Top, and BorderEditor::Vert.

Referenced by MainWindow::slotFormatCells().

int CellFormat::findBrushStyleIndex Qt::BrushStyle  style  )  [private]
 

Definition at line 198 of file cellformat.cpp.

References brushStyles, i, and STYLE_COUNT.

Referenced by setBrushBackground().

int CellFormat::findColorIndex const QColor &  color  )  [private]
 

Definition at line 174 of file cellformat.cpp.

References COLOR_COUNT, i, and qtColors.

Referenced by setBrushBackground(), and setTextFont().

int CellFormat::findComboItemIndex QComboBox *  combo,
const QString item
[private]
 

Definition at line 331 of file cellformat.cpp.

References i.

Referenced by setTextFont().

int CellFormat::findHAlignIndex Qt::AlignmentFlags  flag  )  [private]
 

Definition at line 190 of file cellformat.cpp.

References flagsHAlign, HALIGN_COUNT, and i.

Referenced by setTextAlign().

int CellFormat::findVAlignIndex Qt::AlignmentFlags  flag  )  [private]
 

Definition at line 182 of file cellformat.cpp.

References flagsVAlign, i, and VALIGN_COUNT.

Referenced by setTextAlign().

void CellFormat::fontClicked int  index  )  [private, slot]
 

Definition at line 297 of file cellformat.cpp.

References changedFont, checkFontBold, checkFontItalic, comboFontColor, comboFontFamily, comboFontSize, Dasher::Opts::Normal, qtColors, setTextFont(), and TRUE.

void CellFormat::fontClicked bool  on  )  [private, slot]
 

Definition at line 292 of file cellformat.cpp.

Referenced by CellFormat().

void CellFormat::setBrushBackground const QBrush &  brush  ) 
 

Definition at line 206 of file cellformat.cpp.

References brushBackground, comboBackgroundColor, comboBackgroundStyle, findBrushStyleIndex(), findColorIndex(), frameBackground, p, and pix.

Referenced by backgroundClicked(), exec(), and slotBackgroundDefaults().

void CellFormat::setTextAlign Qt::AlignmentFlags  flags  ) 
 

Definition at line 241 of file cellformat.cpp.

References checkAlignmentWrap, comboAlignmentHorizontal, comboAlignmentVertical, findHAlignIndex(), findVAlignIndex(), frameAlignment, p, pix, textAlignment, tr, Qt::white, and Qt::WordBreak.

Referenced by alignClicked(), exec(), and slotAlignmentDefaults().

void CellFormat::setTextFont const QFont &  font,
const QColor &  color
 

Definition at line 220 of file cellformat.cpp.

References Qt::AlignCenter, checkFontBold, checkFontItalic, comboFontColor, comboFontFamily, comboFontSize, findColorIndex(), findComboItemIndex(), fontColor, fontFont, frameFont, QString::number(), p, pix, tr, and Qt::white.

Referenced by exec(), fontClicked(), and slotFontDefaults().

void CellFormat::slotAlignmentDefaults  )  [private, slot]
 

Definition at line 263 of file cellformat.cpp.

References Qt::AlignLeft, Qt::AlignTop, changedAlign, setTextAlign(), and TRUE.

Referenced by CellFormat().

void CellFormat::slotBackgroundDefaults  )  [private, slot]
 

Definition at line 269 of file cellformat.cpp.

References changedBrush, setBrushBackground(), TRUE, and Qt::white.

Referenced by CellFormat().

void CellFormat::slotBordersDefaults  )  [private, slot]
 

Definition at line 275 of file cellformat.cpp.

References borderEditor, BorderEditor::Bottom, Qt::gray, BorderEditor::Horz, BorderEditor::Left, BorderEditor::Right, BorderEditor::setPen(), Qt::SolidLine, BorderEditor::Top, and BorderEditor::Vert.

Referenced by CellFormat().

void CellFormat::slotFontDefaults  )  [private, slot]
 

Definition at line 257 of file cellformat.cpp.

References Qt::black, changedFont, setTextFont(), and TRUE.

Referenced by CellFormat().


Member Data Documentation

BorderEditor* CellFormat::borderEditor [private]
 

Definition at line 100 of file cellformat.h.

Referenced by borderClicked(), CellFormat(), exec(), and slotBordersDefaults().

QBoxLayout* CellFormat::box [private]
 

Definition at line 85 of file cellformat.h.

Referenced by CellFormat().

QBrush CellFormat::brushBackground [private]
 

Definition at line 92 of file cellformat.h.

Referenced by exec(), and setBrushBackground().

QPushButton * CellFormat::buttonAlignmentDefaults [private]
 

Definition at line 90 of file cellformat.h.

Referenced by CellFormat().

QPushButton * CellFormat::buttonBackgroundDefaults [private]
 

Definition at line 90 of file cellformat.h.

Referenced by CellFormat().

QPushButton* CellFormat::buttonBordersDefaults [private]
 

Definition at line 90 of file cellformat.h.

Referenced by CellFormat().

QPushButton * CellFormat::buttonFontDefaults [private]
 

Definition at line 90 of file cellformat.h.

Referenced by CellFormat().

bool CellFormat::changedAlign [private]
 

Definition at line 101 of file cellformat.h.

Referenced by alignClicked(), CellFormat(), exec(), and slotAlignmentDefaults().

bool CellFormat::changedBrush [private]
 

Definition at line 101 of file cellformat.h.

Referenced by backgroundClicked(), CellFormat(), exec(), and slotBackgroundDefaults().

bool CellFormat::changedFont [private]
 

Definition at line 101 of file cellformat.h.

Referenced by CellFormat(), exec(), fontClicked(), and slotFontDefaults().

QCheckBox * CellFormat::checkAlignmentWrap [private]
 

Definition at line 89 of file cellformat.h.

Referenced by alignClicked(), CellFormat(), and setTextAlign().

QCheckBox* CellFormat::checkFontBold [private]
 

Definition at line 89 of file cellformat.h.

Referenced by CellFormat(), fontClicked(), and setTextFont().

QCheckBox * CellFormat::checkFontItalic [private]
 

Definition at line 89 of file cellformat.h.

Referenced by CellFormat(), fontClicked(), and setTextFont().

QComboBox * CellFormat::comboAlignmentHorizontal [private]
 

Definition at line 88 of file cellformat.h.

Referenced by alignClicked(), CellFormat(), and setTextAlign().

QComboBox * CellFormat::comboAlignmentVertical [private]
 

Definition at line 88 of file cellformat.h.

Referenced by alignClicked(), CellFormat(), and setTextAlign().

QComboBox * CellFormat::comboBackgroundColor [private]
 

Definition at line 88 of file cellformat.h.

Referenced by backgroundClicked(), CellFormat(), and setBrushBackground().

QComboBox * CellFormat::comboBackgroundStyle [private]
 

Definition at line 88 of file cellformat.h.

Referenced by backgroundClicked(), CellFormat(), and setBrushBackground().

QComboBox * CellFormat::comboBordersColor [private]
 

Definition at line 88 of file cellformat.h.

Referenced by borderClicked(), and CellFormat().

QComboBox* CellFormat::comboBordersWidth [private]
 

Definition at line 88 of file cellformat.h.

Referenced by borderClicked(), and CellFormat().

QComboBox * CellFormat::comboFontColor [private]
 

Definition at line 88 of file cellformat.h.

Referenced by CellFormat(), fontClicked(), and setTextFont().

QComboBox * CellFormat::comboFontFamily [private]
 

Definition at line 88 of file cellformat.h.

Referenced by CellFormat(), fontClicked(), and setTextFont().

QComboBox * CellFormat::comboFontSize [private]
 

Definition at line 88 of file cellformat.h.

Referenced by CellFormat(), fontClicked(), and setTextFont().

QColor CellFormat::fontColor [private]
 

Definition at line 94 of file cellformat.h.

Referenced by exec(), and setTextFont().

FontDatabase CellFormat::fontDB [private]
 

Definition at line 96 of file cellformat.h.

Referenced by CellFormat(), createFontCombo(), and createSizeCombo().

QFont CellFormat::fontFont [private]
 

Definition at line 93 of file cellformat.h.

Referenced by exec(), and setTextFont().

QFrame * CellFormat::frameAlignment [private]
 

Definition at line 91 of file cellformat.h.

Referenced by CellFormat(), and setTextAlign().

QFrame* CellFormat::frameBackground [private]
 

Definition at line 91 of file cellformat.h.

Referenced by CellFormat(), and setBrushBackground().

QFrame * CellFormat::frameFont [private]
 

Definition at line 91 of file cellformat.h.

Referenced by CellFormat(), and setTextFont().

Sheet* CellFormat::sheet [private]
 

Definition at line 99 of file cellformat.h.

Referenced by exec().

QTabWidget* CellFormat::tabs [private]
 

Definition at line 86 of file cellformat.h.

Referenced by CellFormat().

Qt::AlignmentFlags CellFormat::textAlignment [private]
 

Definition at line 95 of file cellformat.h.

Referenced by exec(), and setTextAlign().

QWidget * CellFormat::widgetAlignment [private]
 

Definition at line 87 of file cellformat.h.

Referenced by CellFormat().

QWidget * CellFormat::widgetBackground [private]
 

Definition at line 87 of file cellformat.h.

Referenced by CellFormat().

QWidget* CellFormat::widgetBorders [private]
 

Definition at line 87 of file cellformat.h.

Referenced by CellFormat().

QWidget * CellFormat::widgetFont [private]
 

Definition at line 87 of file cellformat.h.

Referenced by CellFormat().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:28:24 2005 for OPIE by  doxygen 1.4.2