Workspace 6.21.5
Signals | Public Member Functions | Static Public Member Functions | List of all members
TextManipulation Class Reference

#include <Workspace/Presentation/Logging/textmanipulation.h>

Inherits QObject.

Signals

void modified ()
 

Public Member Functions

 TextManipulation (QObject *parent=nullptr)
 
void addText (const QString &text)
 
void addToContextMenu (QMenu *menu)
 
QTextCharFormat & getDefaultFormat ()
 
QTextDocument & getDocument ()
 
void setDefaultFormat (const QTextCharFormat &format)
 
void setWorkspace (const CSIRO::DataExecution::Workspace *workspace)
 

Static Public Member Functions

static const QString & wsAnchor ()
 

Constructor & Destructor Documentation

◆ TextManipulation()

TextManipulation ( QObject *  parent = nullptr)

Member Function Documentation

◆ addText()

void addText ( const QString &  text)
Parameters
textis the text to add to an existing document being manipulated.

Adds text to a document under manipulation. This calls Filtering::addText to add the text, filtering the results. Highlighting will automatically highlight the text, as when the text is added, the contents that have been changed are marked as dirty, a singal that Highlighting listens to.

◆ addToContextMenu()

void addToContextMenu ( QMenu *  menu)
Parameters
menuThe context menu to populate.

Adds items to menu for manipulating the appearance of text in a TextViewer.

◆ getDefaultFormat()

QTextCharFormat & getDefaultFormat ( )
Returns
a pointer to the default QTextCharFormat

Returns the default format. This is used for specifying how newly added text looks like, and what new highlighters base their highlighter formats on.

◆ getDocument()

QTextDocument & getDocument ( )
Returns
The document used internally by this object. It would normally be used as an argument to QTextEdit::setDocument().

◆ modified

void modified ( )
signal

◆ setDefaultFormat()

void setDefaultFormat ( const QTextCharFormat &  format)
Parameters
formatis the format to set to be the default.

Sets the default format to use. This is what the document is set to by default, and what new Highlighter's base their formats on.

◆ setWorkspace()

void setWorkspace ( const CSIRO::DataExecution::Workspace workspace)
Parameters
workspaceThe workspace associated with the text that is being manipulated.

◆ wsAnchor()

const QString & wsAnchor ( )
static

Workspace anchor, will be used as a protocol in URL.