A subclass of QPlainTextEdit with additional features. More...
Public Types | |
enum | FormatFlag { Monospace = 0x0001, AllCharacters = 0x0002, ToUpper = 0x0004, ToLower = 0x0008, Spaces = 0x0010, Ascii = 0x0020, Digits = 0x0040, Hexa = 0x0080, Letters = 0x0100 } |
Flags specifying the text format. More... | |
Public Member Functions | |
QtlPlainTextEdit (QWidget *parent=0, FormatFlags format=AllCharacters) | |
Constructor. More... | |
QtlPlainTextEdit (const QString &text, QWidget *parent=0, FormatFlags format=AllCharacters) | |
Constructor. More... | |
FormatFlags | format () const |
Get the format flags. More... | |
void | setFormat (const FormatFlags &format) |
Set the format flags. More... | |
void | setPlainText (const QString &text) |
Set the plain text in the editor. More... | |
Protected Member Functions | |
virtual void | insertFromMimeData (const QMimeData *source) Q_DECL_OVERRIDE |
Insert MIME data into the widget. More... | |
virtual void | keyPressEvent (QKeyEvent *event) Q_DECL_OVERRIDE |
Invoked when a key is pressed. More... | |
Private Member Functions | |
QString | acceptableText (const QString &text) const |
Transform a text into an acceptable string for the current format. More... | |
Private Attributes | |
FormatFlags | _format |
Format flags. More... | |
const QFont | _standardFont |
Standard font for QPlainTextEdit. More... | |
A subclass of QPlainTextEdit with additional features.
Flags specifying the text format.
|
explicit |
Constructor.
[in] | parent | Optional parent widget. |
[in] | format | Format flags. |
|
explicit |
Constructor.
[in] | text | Initial content. |
[in] | parent | Optional parent widget. |
[in] | format | Format flags. |
|
inline |
Get the format flags.
void QtlPlainTextEdit::setFormat | ( | const FormatFlags & | format | ) |
Set the format flags.
[in] | format | The format flags. |
void QtlPlainTextEdit::setPlainText | ( | const QString & | text | ) |
Set the plain text in the editor.
Reimplemented from QPlainTextEdit.
[in] | text | The text to set. |
|
protectedvirtual |
Invoked when a key is pressed.
Reimplemented from superclass.
[in,out] | event | The event to process. |
|
protectedvirtual |
Insert MIME data into the widget.
Reimplemented from QPlainTextEdit.
[in] | source | Source data to check. |
|
private |
Transform a text into an acceptable string for the current format.
[in] | text | The text to transform. |
|
private |
Standard font for QPlainTextEdit.
|
private |
Format flags.