The interface to a linked Qt text widget. More...
#include <pqLinkedObjectInterface.h>
Public Types | |
enum | QtSignalState : bool { QtSignalState::On = true, QtSignalState::Off = false } |
Used to trigger on and off an object signal. More... | |
Public Member Functions | |
pqLinkedObjectInterface ()=default | |
Default constructor. More... | |
pqLinkedObjectInterface (const pqLinkedObjectInterface &)=default | |
Copy constructor needed for the clone method. More... | |
virtual | ~pqLinkedObjectInterface () noexcept=default |
Default virtual destructor. More... | |
virtual std::unique_ptr< pqLinkedObjectInterface > | clone () const =0 |
Pure virtual cloning this widget. More... | |
virtual void | link (pqLinkedObjectInterface *other)=0 |
Link this object to the other. More... | |
virtual void | unlink ()=0 |
Unlinks the objects. More... | |
virtual void | setText (const QString &txt)=0 |
Updates the object text. More... | |
virtual QString | getText () const =0 |
Returns the current buffer associated with this widget. More... | |
virtual QObject * | getLinked () const noexcept=0 |
Returns the linked QOBject. More... | |
virtual QString | getName () const =0 |
Returns the linked QObject name. More... | |
bool | isLinked () const noexcept |
Returns true if this object is connected to another one. More... | |
Protected Attributes | |
pqLinkedObjectInterface * | ConnectedTo = nullptr |
QMetaObject::Connection | Connection |
bool | SettingText = false |
The interface to a linked Qt text widget.
Derived classes should implement the proper behavior for all abstract functions.
The pqLinkedObjectInterface acts as an interface between two Qt text widgets that needs to be linked: when the associated text is updated the linked one gets updated too.
Definition at line 21 of file pqLinkedObjectInterface.h.
|
strong |
Used to trigger on and off an object signal.
Enumerator | |
---|---|
On | |
Off |
Definition at line 57 of file pqLinkedObjectInterface.h.
|
default |
Default constructor.
|
explicitdefault |
Copy constructor needed for the clone method.
|
virtualdefaultnoexcept |
Default virtual destructor.
|
pure virtual |
Pure virtual cloning this widget.
Implemented in pqLinkedObjectQTextEdit, and pqLinkedObjectPythonTextArea.
|
pure virtual |
Link this object to the other.
The expected behavior should be that when this object is updated, the other is too.
Implemented in pqLinkedObjectQTextEdit, and pqLinkedObjectPythonTextArea.
|
pure virtual |
Unlinks the objects.
Implemented in pqLinkedObjectQTextEdit.
|
pure virtual |
Updates the object text.
This effectively should override the current content of the widget
Implemented in pqLinkedObjectQTextEdit.
|
pure virtual |
Returns the current buffer associated with this widget.
Implemented in pqLinkedObjectQTextEdit.
|
pure virtualnoexcept |
Returns the linked QOBject.
Implemented in pqLinkedObjectQTextEdit.
|
pure virtual |
Returns the linked QObject name.
Implemented in pqLinkedObjectQTextEdit.
|
inlinenoexcept |
Returns true if this object is connected to another one.
Definition at line 86 of file pqLinkedObjectInterface.h.
|
protected |
Definition at line 89 of file pqLinkedObjectInterface.h.
|
protected |
Definition at line 90 of file pqLinkedObjectInterface.h.
|
protected |
Definition at line 91 of file pqLinkedObjectInterface.h.