Public Member Functions | Protected Slots | Protected Member Functions | List of all members
pqOneLinerTextEdit Class Reference

pqOneLinerTextEdit is a specialization of pqTextEdit to handle one-liner expressions. More...

#include <pqOneLinerTextEdit.h>

Inheritance diagram for pqOneLinerTextEdit:
Inheritance graph
[legend]
Collaboration diagram for pqOneLinerTextEdit:
Collaboration graph
[legend]

Public Member Functions

 pqOneLinerTextEdit (QWidget *parent=nullptr)
 
 ~pqOneLinerTextEdit () override=default
 
- Public Member Functions inherited from pqTextEdit
 pqTextEdit (QWidget *parent=nullptr)
 
 pqTextEdit (const QString &contents, QWidget *parent=nullptr)
 
void setCompleter (pqWidgetCompleter *completer)
 
pqWidgetCompletergetCompleter ()
 
 ~pqTextEdit () override
 

Protected Slots

void adjustToText ()
 Adjust widget height to the number of displayed lines. More...
 

Protected Member Functions

void keyPressEvent (QKeyEvent *e) override
 Reimplemented to disable "Enter" and "Return" key. More...
 
void resizeEvent (QResizeEvent *e) override
 Reimplemented to update widget height depending on text wrapping. More...
 
void insertFromMimeData (const QMimeData *source) override
 Reimplemented to avoid carriage return in pasted text. More...
 
- Protected Member Functions inherited from pqTextEdit
void keyPressEvent (QKeyEvent *e) override
 
void focusOutEvent (QFocusEvent *e) override
 
void focusInEvent (QFocusEvent *e) override
 
QString textUnderCursor () const
 Returns the text of the current line in the input field. More...
 
void updateCompleter ()
 Trigger an update on the completer if any, and show the popup if completions are available. More...
 
void updateCompleterIfVisible ()
 In case the completer popup menu is already shown, update it to reflect modifications on the input text. More...
 
void selectCompletion ()
 Insert the completion in case there is only one available. More...
 

Additional Inherited Members

- Signals inherited from pqTextEdit
void textChangedAndEditingFinished ()
 Unlike editingFinished() which gets fired whenever the widget looses focus irrespective of if the text actually was edited, textChangedAndEditingFinished() is fired only when the text was changed as well. More...
 
void editingFinished ()
 Just like the QLineEdit::editingFinished(), this signal is fired every time the widget loses focus. More...
 
- Protected Attributes inherited from pqTextEdit
QScopedPointer< pqTextEditPrivate > d_ptr
 

Detailed Description

pqOneLinerTextEdit is a specialization of pqTextEdit to handle one-liner expressions.

This widget differs from pqTextEdit with the following:

Definition at line 18 of file pqOneLinerTextEdit.h.

Constructor & Destructor Documentation

◆ pqOneLinerTextEdit()

pqOneLinerTextEdit::pqOneLinerTextEdit ( QWidget *  parent = nullptr)

◆ ~pqOneLinerTextEdit()

pqOneLinerTextEdit::~pqOneLinerTextEdit ( )
overridedefault

Member Function Documentation

◆ 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: