Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pqTextEdit Class Reference

pqTextEdit is a specialization of QTextEdit which provide a editingFinished() signal and a textChangedAndEditingFinished(). More...

#include <pqTextEdit.h>

Inherits QTextEdit.

Signals

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...
 

Public Member Functions

 pqTextEdit (QWidget *parent=0)
 
 pqTextEdit (const QString &contents, QWidget *parent=0)
 
 ~pqTextEdit () override
 

Protected Member Functions

void keyPressEvent (QKeyEvent *e) override
 
void focusOutEvent (QFocusEvent *e) override
 

Protected Attributes

QScopedPointer< pqTextEditPrivate > d_ptr
 

Detailed Description

pqTextEdit is a specialization of QTextEdit which provide a editingFinished() signal and a textChangedAndEditingFinished().

Unlike editingFinished() which gets fired whenever the widget looses focus irrespective of if the text if actually was edited, textChangedAndEditingFinished() is fired only when the text was changed as well.

Important Notes: The editingFinished() signals and the textChangedAndEditingFinished() are NOT sent when using the setText, setPlainText and setHtml methods.

Also the textChangedAndEditingFinished() is not truly emitted only when the text has changed and the edition is finished. For example, removing a letter and adding it back will cause the signal to be fired even though the text is the same as before.

Definition at line 57 of file pqTextEdit.h.

Constructor & Destructor Documentation

◆ pqTextEdit() [1/2]

pqTextEdit::pqTextEdit ( QWidget *  parent = 0)

◆ pqTextEdit() [2/2]

pqTextEdit::pqTextEdit ( const QString &  contents,
QWidget *  parent = 0 
)

◆ ~pqTextEdit()

pqTextEdit::~pqTextEdit ( )
override

Member Function Documentation

◆ textChangedAndEditingFinished

void pqTextEdit::textChangedAndEditingFinished ( )
signal

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.

◆ editingFinished

void pqTextEdit::editingFinished ( )
signal

Just like the QLineEdit::editingFinished(), this signal is fired every time the widget loses focus.

◆ keyPressEvent()

void pqTextEdit::keyPressEvent ( QKeyEvent *  e)
overrideprotected

◆ focusOutEvent()

void pqTextEdit::focusOutEvent ( QFocusEvent *  e)
overrideprotected

Member Data Documentation

◆ d_ptr

QScopedPointer<pqTextEditPrivate> pqTextEdit::d_ptr
protected

Definition at line 91 of file pqTextEdit.h.


The documentation for this class was generated from the following file: