Workspace 6.21.5
Public Slots | Signals | Public Member Functions | Properties | List of all members
OperationWidget Class Reference

A container widget for showing a widget for a particular operation. More...

#include <Workspace/Widgets/operationwidget.h>

Inherits QWidget.

Public Slots

bool getCustomDisplayButtonShown () const
 
bool getDefaultCustomDisplayButtonShown () const
 
void setCustomDisplayButtonShown (bool b)
 
void setDefaultCustomDisplayButtonShown (bool b)
 
void setOperation (DataExecution::Operation *op, const QString customUiFile={})
 

Signals

void editRequested ()
 
void titleChanged (const QString &title)
 

Public Member Functions

 OperationWidget (const OperationWidget &)=delete
 
 OperationWidget (DataExecution::Operation *op=nullptr, bool readOnly=false, QWidget *parent=nullptr, const QString customUiFile={})
 
 OperationWidget (QWidget *parent)
 
 ~OperationWidget () override
 
QWidget * getCustomWidget ()
 
DataExecution::OperationgetOperation ()
 
bool getReadOnly () const
 
OperationWidgetoperator= (const OperationWidget &)=delete
 
void setReadOnly (bool b)
 

Properties

bool customDisplayButtonShown
 

Detailed Description

This class is more of a container for IOTreeWidget with some additional functionality to make it easy to create a widget with a custom .ui file for the operation.

Constructor & Destructor Documentation

◆ OperationWidget() [1/3]

OperationWidget ( DataExecution::Operation op = nullptr,
bool  readOnly = false,
QWidget *  parent = nullptr,
const QString  customUiFile = {} 
)
Parameters
opThe operation this IOTreeWidget will represent, or a null pointer if no widget should be displayed initially (in which case setOperation() will need to be called later to make the use of this widget meaningful).
readOnlySet this to true if the widget (excluding the toggle-custom-display buttom) is to be read-only (default is false)
parentThe parent of this widget.
customUiFileFile to read for custom ui

◆ OperationWidget() [2/3]

OperationWidget ( QWidget *  parent)
Parameters
parentThe parent of this widget

Constructs an operation with no selected operation.

◆ ~OperationWidget()

~OperationWidget ( )
override

◆ OperationWidget() [3/3]

OperationWidget ( const OperationWidget )
delete

Member Function Documentation

◆ editRequested

void editRequested ( )
signal

◆ getCustomDisplayButtonShown

bool getCustomDisplayButtonShown ( ) const
slot
Returns
Whether or not the custom display button is shown on the widget.

◆ getCustomWidget()

QWidget * getCustomWidget ( )
Returns
The custom widget. May be null if it is not currently being shown as it is created on-the-fly.

◆ getDefaultCustomDisplayButtonShown

bool getDefaultCustomDisplayButtonShown ( ) const
slot

◆ getOperation()

Operation * getOperation ( )
Returns
The operation this widget is displaying or a null pointer if it is not displaying any widget.

◆ getReadOnly()

bool getReadOnly ( ) const

◆ operator=()

OperationWidget & operator= ( const OperationWidget )
delete

◆ setCustomDisplayButtonShown

void setCustomDisplayButtonShown ( bool  b)
slot
Parameters
bShows or hides the custom display button on the operation widget.

◆ setDefaultCustomDisplayButtonShown

void setDefaultCustomDisplayButtonShown ( bool  b)
slot

◆ setOperation

void setOperation ( DataExecution::Operation op,
const QString  customUiFile = {} 
)
slot

param op The operation this widget should display, or a null pointer if it should display no widget at all

◆ setReadOnly()

void setReadOnly ( bool  b)

This is a delayed-action operation as the pimpl is not created when this is created.

◆ titleChanged

void titleChanged ( const QString &  title)
signal

Property Documentation

◆ customDisplayButtonShown

bool customDisplayButtonShown
readwrite