#include <GraphicTextWidget.h>
Public Slots | |
| void | setText (const QString &text) |
| void | setAlignment (int alignment) |
| void | setTextFont (const QFont &textFont) |
| void | setColor (const QColor &color) |
| void | setTextReadOnly (bool bTextReadOnly) |
Signals | |
| void | textChanged (const QString &text) |
| void | alignmentChanged (int alignment) |
| void | fontChanged (const QFont &textFont) |
| void | colorChanged (const QColor &color) |
Public Member Functions | |
| GraphicTextWidget (QWidget *pParent=NULL) | |
| virtual | ~GraphicTextWidget () |
| QString | getText () const |
| int | getAlignment () const |
| QFont | getTextFont () const |
| QColor | getColor () const |
Protected Slots | |
| void | notifyTextChange () |
| void | notifyAlignmentChange () |
| void | notifyFontChange () |
The graphic text widget will allow users to customize text, specifying alignment, font, and color. In addition, users may be able to modify the text. This widget is not meant to display the text but rather to allow the user to customize text which is displayed elsewhere, such as a Measurement or Plot.
Definition at line 30 of file GraphicTextWidget.h.
| GraphicTextWidget::GraphicTextWidget | ( | QWidget * | pParent = NULL |
) |
Creates a graphic text widget.
| pParent | The parent widget. |
| virtual GraphicTextWidget::~GraphicTextWidget | ( | ) | [virtual] |
Destroys the graphic text widget and all child items.
| QString GraphicTextWidget::getText | ( | ) | const |
Returns the text to be displayed to the user.
| int GraphicTextWidget::getAlignment | ( | ) | const |
Returns the alignment which should be used to display the text.
This will correspond to one or more of the values in Qt::AlignmentFlag.
| QFont GraphicTextWidget::getTextFont | ( | ) | const |
Returns the font which should be used to display the text.
| QColor GraphicTextWidget::getColor | ( | ) | const |
Returns the color which should be used to display the text.
| void GraphicTextWidget::setText | ( | const QString & | text | ) | [slot] |
Sets the text to be displayed to the user.
| text | The text to display. |
| void GraphicTextWidget::setAlignment | ( | int | alignment | ) | [slot] |
Sets the alignment which should be used to display the text.
By default, the alignment is Qt::AlignLeft.
| alignment | The alignment to use. The only supported values are Qt::AlignLeft, Qt::AlignHCenter, and Qt::AlignRight. |
| void GraphicTextWidget::setTextFont | ( | const QFont & | textFont | ) | [slot] |
Sets the font which should be used to display the text.
By default, the QFontComboBox default font is used without bold, italics, or underlining. By default, the FontSizeComboBox default font size is used.
| textFont | The font to use. |
| void GraphicTextWidget::setColor | ( | const QColor & | color | ) | [slot] |
Sets the color which should be used to display the text.
By default, the CustomColorButton default color is used.
| color | The color to use. |
| void GraphicTextWidget::setTextReadOnly | ( | bool | bTextReadOnly | ) | [slot] |
Sets whether the user can modify the text.
By default, the text can be edited by the user.
| bTextReadOnly | True to disable editing, false otherwise. |
| void GraphicTextWidget::textChanged | ( | const QString & | text | ) | [signal] |
Emitted when the text is changed.
| text | The newly set text. |
| void GraphicTextWidget::alignmentChanged | ( | int | alignment | ) | [signal] |
Emitted when the alignment is changed.
| alignment | The newly set alignment. |
| void GraphicTextWidget::fontChanged | ( | const QFont & | textFont | ) | [signal] |
Emitted when the font is changed.
| textFont | The newly set font. |
| void GraphicTextWidget::colorChanged | ( | const QColor & | color | ) | [signal] |
Emitted when the color is changed.
| color | The newly set color. |
| void GraphicTextWidget::notifyTextChange | ( | ) | [protected, slot] |
Causes textChanged() to be emitted.
| void GraphicTextWidget::notifyAlignmentChange | ( | ) | [protected, slot] |
Causes alignmentChanged() to be emitted.
| void GraphicTextWidget::notifyFontChange | ( | ) | [protected, slot] |
Causes fontChanged() to be emitted.