HBFormatPanel Class Reference

Class specifying look and behavior of panel used to edit HighlightBlock formating. More...

#include <HBFormatPanel.h>

Inheritance diagram for HBFormatPanel:

QGroupBox

List of all members.

Public Member Functions

 HBFormatPanel (QWidget *parent, HighlightBlock *_block)
 Constructor of this panel. Setups edited block and UI it also connects all buttons with appropriate slots.

Private Slots

void showFontDialog ()
 Shows QFontDialog, allowing user to edit font of current block, and then updates sample with updateSample();.
void showFColorDialog ()
 Shows QColorDialog, allowing user to edit foreground color of current block, and then updates sample with updateSample();.
void showBColorDialog ()
 Shows QColorDialog, allowing user to edit background color of current block, and then updates sample with updateSample();.

Private Member Functions

void updateSample ()
 function used to update sample label with font, usually after font is changed.

Private Attributes

HighlightBlockblock
 Currently edited block.
QVBoxLayout * mainLayout
 Layout organizing sample and buttons layout in 2 rows.
QHBoxLayout * buttonsLayout
 Layout organizing buttons in columns.
QLabel * fontSample
 Label with presentation of sample text using current formating.
QPushButton * editFontButton
 button used to edit font
QPushButton * editFColorButton
 button used to edit foreground color
QPushButton * editBColorButton
 button used to edit background color


Detailed Description

Class specifying look and behavior of panel used to edit HighlightBlock formating.

Definition at line 22 of file HBFormatPanel.h.


Constructor & Destructor Documentation

HBFormatPanel::HBFormatPanel ( QWidget *  parent,
HighlightBlock _block 
)

Constructor of this panel. Setups edited block and UI it also connects all buttons with appropriate slots.

Parameters:
parent QWidget's parent
_block block pointing to edited block

Definition at line 12 of file HBFormatPanel.cpp.

References block, buttonsLayout, editBColorButton, editFColorButton, editFontButton, fontSample, HighlightBlock::getName(), mainLayout, showBColorDialog(), showFColorDialog(), showFontDialog(), and updateSample().


Member Function Documentation

void HBFormatPanel::showBColorDialog (  )  [private, slot]

Shows QColorDialog, allowing user to edit background color of current block, and then updates sample with updateSample();.

Definition at line 58 of file HBFormatPanel.cpp.

References block, HighlightBlock::getBackgroundColor(), HighlightBlock::setBackgroundColor(), and updateSample().

Referenced by HBFormatPanel().

void HBFormatPanel::showFColorDialog (  )  [private, slot]

Shows QColorDialog, allowing user to edit foreground color of current block, and then updates sample with updateSample();.

Definition at line 53 of file HBFormatPanel.cpp.

References block, HighlightBlock::getForegroundColor(), HighlightBlock::setForegroundColor(), and updateSample().

Referenced by HBFormatPanel().

void HBFormatPanel::showFontDialog (  )  [private, slot]

Shows QFontDialog, allowing user to edit font of current block, and then updates sample with updateSample();.

Definition at line 45 of file HBFormatPanel.cpp.

References block, HighlightBlock::getFont(), HighlightBlock::setFont(), and updateSample().

Referenced by HBFormatPanel().

void HBFormatPanel::updateSample (  )  [private]

function used to update sample label with font, usually after font is changed.

Definition at line 36 of file HBFormatPanel.cpp.

References block, fontSample, HighlightBlock::getBackgroundColor(), HighlightBlock::getFont(), and HighlightBlock::getForegroundColor().

Referenced by HBFormatPanel(), showBColorDialog(), showFColorDialog(), and showFontDialog().


Member Data Documentation

Currently edited block.

Definition at line 26 of file HBFormatPanel.h.

Referenced by HBFormatPanel(), showBColorDialog(), showFColorDialog(), showFontDialog(), and updateSample().

QHBoxLayout* HBFormatPanel::buttonsLayout [private]

Layout organizing buttons in columns.

Definition at line 28 of file HBFormatPanel.h.

Referenced by HBFormatPanel().

QPushButton* HBFormatPanel::editBColorButton [private]

button used to edit background color

Definition at line 32 of file HBFormatPanel.h.

Referenced by HBFormatPanel().

QPushButton* HBFormatPanel::editFColorButton [private]

button used to edit foreground color

Definition at line 31 of file HBFormatPanel.h.

Referenced by HBFormatPanel().

QPushButton* HBFormatPanel::editFontButton [private]

button used to edit font

Definition at line 30 of file HBFormatPanel.h.

Referenced by HBFormatPanel().

QLabel* HBFormatPanel::fontSample [private]

Label with presentation of sample text using current formating.

Definition at line 29 of file HBFormatPanel.h.

Referenced by HBFormatPanel(), and updateSample().

QVBoxLayout* HBFormatPanel::mainLayout [private]

Layout organizing sample and buttons layout in 2 rows.

Definition at line 27 of file HBFormatPanel.h.

Referenced by HBFormatPanel().


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

Generated on Fri Jan 9 00:50:59 2009 for HSyntaxHighlighter by  doxygen 1.5.8