pqOneLinerTextEdit is a specialization of pqTextEdit to handle one-liner expressions.
More...
#include <pqOneLinerTextEdit.h>
pqOneLinerTextEdit is a specialization of pqTextEdit to handle one-liner expressions.
This widget differs from pqTextEdit with the following:
- New lines characters are disabled from input event and cleaned from pasted text.
- Text is wrapped to fit the widget width.
- Widget height is adapted to the content, so the whole text is displayed.
Definition at line 18 of file pqOneLinerTextEdit.h.
◆ pqOneLinerTextEdit()
pqOneLinerTextEdit::pqOneLinerTextEdit |
( |
QWidget * |
parent = nullptr | ) |
|
◆ ~pqOneLinerTextEdit()
pqOneLinerTextEdit::~pqOneLinerTextEdit |
( |
| ) |
|
|
overridedefault |
◆ keyPressEvent()
void pqOneLinerTextEdit::keyPressEvent |
( |
QKeyEvent * |
e | ) |
|
|
overrideprotected |
Reimplemented to disable "Enter" and "Return" key.
◆ resizeEvent()
void pqOneLinerTextEdit::resizeEvent |
( |
QResizeEvent * |
e | ) |
|
|
overrideprotected |
Reimplemented to update widget height depending on text wrapping.
◆ insertFromMimeData()
void pqOneLinerTextEdit::insertFromMimeData |
( |
const QMimeData * |
source | ) |
|
|
overrideprotected |
Reimplemented to avoid carriage return in pasted text.
Also remove redundant spaces. see QString::simplified()
◆ adjustToText
void pqOneLinerTextEdit::adjustToText |
( |
| ) |
|
|
protectedslot |
Adjust widget height to the number of displayed lines.
The documentation for this class was generated from the following file: