#include <HBFormatPanel.h>

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 | |
| HighlightBlock * | block |
| 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 | |
Definition at line 22 of file HBFormatPanel.h.
| HBFormatPanel::HBFormatPanel | ( | QWidget * | parent, | |
| HighlightBlock * | _block | |||
| ) |
Constructor of this panel. Setups edited block and UI it also connects all buttons with appropriate slots.
| 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, mainLayout, showBColorDialog(), showFColorDialog(), showFontDialog(), and updateSample().
| 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().
HighlightBlock* HBFormatPanel::block [private] |
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().
1.5.8