Public Types | Public Member Functions | Protected Attributes | List of all members
pqLinkedObjectInterface Struct Referenceabstract

The interface to a linked Qt text widget. More...

#include <pqLinkedObjectInterface.h>

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

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< pqLinkedObjectInterfaceclone () 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

pqLinkedObjectInterfaceConnectedTo = nullptr
 
QMetaObject::Connection Connection
 
bool SettingText = false
 

Detailed Description

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.

Member Enumeration Documentation

◆ QtSignalState

Used to trigger on and off an object signal.

Enumerator
On 
Off 

Definition at line 57 of file pqLinkedObjectInterface.h.

Constructor & Destructor Documentation

◆ pqLinkedObjectInterface() [1/2]

pqLinkedObjectInterface::pqLinkedObjectInterface ( )
default

Default constructor.

◆ pqLinkedObjectInterface() [2/2]

pqLinkedObjectInterface::pqLinkedObjectInterface ( const pqLinkedObjectInterface )
explicitdefault

Copy constructor needed for the clone method.

◆ ~pqLinkedObjectInterface()

virtual pqLinkedObjectInterface::~pqLinkedObjectInterface ( )
virtualdefaultnoexcept

Default virtual destructor.

Member Function Documentation

◆ clone()

virtual std::unique_ptr<pqLinkedObjectInterface> pqLinkedObjectInterface::clone ( ) const
pure virtual

Pure virtual cloning this widget.

Implemented in pqLinkedObjectQTextEdit, and pqLinkedObjectPythonTextArea.

◆ link()

virtual void pqLinkedObjectInterface::link ( pqLinkedObjectInterface other)
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.

◆ unlink()

virtual void pqLinkedObjectInterface::unlink ( )
pure virtual

Unlinks the objects.

Implemented in pqLinkedObjectQTextEdit.

◆ setText()

virtual void pqLinkedObjectInterface::setText ( const QString &  txt)
pure virtual

Updates the object text.

This effectively should override the current content of the widget

Implemented in pqLinkedObjectQTextEdit.

◆ getText()

virtual QString pqLinkedObjectInterface::getText ( ) const
pure virtual

Returns the current buffer associated with this widget.

Implemented in pqLinkedObjectQTextEdit.

◆ getLinked()

virtual QObject* pqLinkedObjectInterface::getLinked ( ) const
pure virtualnoexcept

Returns the linked QOBject.

Implemented in pqLinkedObjectQTextEdit.

◆ getName()

virtual QString pqLinkedObjectInterface::getName ( ) const
pure virtual

Returns the linked QObject name.

Implemented in pqLinkedObjectQTextEdit.

◆ isLinked()

bool pqLinkedObjectInterface::isLinked ( ) const
inlinenoexcept

Returns true if this object is connected to another one.

Definition at line 86 of file pqLinkedObjectInterface.h.

Member Data Documentation

◆ ConnectedTo

pqLinkedObjectInterface* pqLinkedObjectInterface::ConnectedTo = nullptr
protected

Definition at line 89 of file pqLinkedObjectInterface.h.

◆ Connection

QMetaObject::Connection pqLinkedObjectInterface::Connection
protected

Definition at line 90 of file pqLinkedObjectInterface.h.

◆ SettingText

bool pqLinkedObjectInterface::SettingText = false
protected

Definition at line 91 of file pqLinkedObjectInterface.h.


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