Mantid
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Attributes | List of all members
MantidQt::CustomDialogs::ShapeDetails Class Referenceabstract

The base class for the details widgets. More...

#include <SampleShapeHelpers.h>

Inheritance diagram for MantidQt::CustomDialogs::ShapeDetails:
MantidQt::CustomDialogs::ConeDetails MantidQt::CustomDialogs::CuboidDetails MantidQt::CustomDialogs::CylinderDetails MantidQt::CustomDialogs::HexahedronDetails MantidQt::CustomDialogs::InfiniteConeDetails MantidQt::CustomDialogs::InfiniteCylinderDetails MantidQt::CustomDialogs::InfinitePlaneDetails MantidQt::CustomDialogs::SliceOfCylinderRingDetails MantidQt::CustomDialogs::SphereDetails

Public Types

enum  Unit { millimetre = 0 , centimetre = 1 , metre = 2 }
 

Public Member Functions

bool getComplementFlag () const
 Get complement flag. More...
 
QString getShapeID () const
 Get the id string. More...
 
void setComplementFlag (bool flag)
 Set the complement flag. More...
 
 ShapeDetails (QWidget *parent=nullptr)
 Constructor. More...
 
virtual QString writeXML () const =0
 Write out the XML definition for this shape. More...
 
 ~ShapeDetails () override=default
 Constructor. More...
 

Static Public Member Functions

static QString convertToMetres (const QString &value, Unit start_unit)
 Convert a string value from the given unit to metres (static) More...
 
static QComboBox * createLengthUnitsCombo ()
 Create a new length units box. More...
 

Protected Attributes

QString m_idvalue
 ID string of this object. More...
 

Private Attributes

bool m_isComplement
 Take the complement of the shape. More...
 

Detailed Description

The base class for the details widgets.

Definition at line 120 of file SampleShapeHelpers.h.

Member Enumeration Documentation

◆ Unit

Enumerator
millimetre 
centimetre 
metre 

Definition at line 138 of file SampleShapeHelpers.h.

Constructor & Destructor Documentation

◆ ShapeDetails()

MantidQt::CustomDialogs::ShapeDetails::ShapeDetails ( QWidget *  parent = nullptr)
inline

Constructor.

Definition at line 125 of file SampleShapeHelpers.h.

◆ ~ShapeDetails()

MantidQt::CustomDialogs::ShapeDetails::~ShapeDetails ( )
overridedefault

Constructor.

Member Function Documentation

◆ convertToMetres()

QString ShapeDetails::convertToMetres ( const QString &  value,
Unit  start_unit 
)
static

◆ createLengthUnitsCombo()

QComboBox * ShapeDetails::createLengthUnitsCombo ( )
static

◆ getComplementFlag()

bool ShapeDetails::getComplementFlag ( ) const

Get complement flag.

Get the complement flag.

Returns
The value of the complement flag

Definition at line 212 of file SampleShapeHelpers.cpp.

References m_isComplement.

◆ getShapeID()

QString MantidQt::CustomDialogs::ShapeDetails::getShapeID ( ) const
inline

Get the id string.

Definition at line 133 of file SampleShapeHelpers.h.

References m_idvalue.

◆ setComplementFlag()

void ShapeDetails::setComplementFlag ( bool  flag)

Set the complement flag.

Parameters
flag:: The value of the flag

Definition at line 206 of file SampleShapeHelpers.cpp.

References m_isComplement.

◆ writeXML()

virtual QString MantidQt::CustomDialogs::ShapeDetails::writeXML ( ) const
pure virtual

Member Data Documentation

◆ m_idvalue

QString MantidQt::CustomDialogs::ShapeDetails::m_idvalue
protected

◆ m_isComplement

bool MantidQt::CustomDialogs::ShapeDetails::m_isComplement
private

Take the complement of the shape.

Definition at line 153 of file SampleShapeHelpers.h.

Referenced by getComplementFlag(), and setComplementFlag().


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