Mantid
|
The base class for the details widgets. More...
#include <SampleShapeHelpers.h>
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... | |
The base class for the details widgets.
Definition at line 120 of file SampleShapeHelpers.h.
Enumerator | |
---|---|
millimetre | |
centimetre | |
metre |
Definition at line 138 of file SampleShapeHelpers.h.
|
inline |
Constructor.
Definition at line 125 of file SampleShapeHelpers.h.
|
overridedefault |
Constructor.
|
static |
Convert a string value from the given unit to metres (static)
value | :: The value to change |
start_unit | :: Initial unit |
Definition at line 187 of file SampleShapeHelpers.cpp.
References centimetre, millimetre, and value.
Referenced by MantidQt::CustomDialogs::PointGroupBox::write3DElement(), MantidQt::CustomDialogs::SphereDetails::writeXML(), MantidQt::CustomDialogs::CylinderDetails::writeXML(), MantidQt::CustomDialogs::InfiniteCylinderDetails::writeXML(), MantidQt::CustomDialogs::SliceOfCylinderRingDetails::writeXML(), and MantidQt::CustomDialogs::ConeDetails::writeXML().
|
static |
Create a new length units box.
Create a QComboBox filled with length units (static)
Definition at line 173 of file SampleShapeHelpers.cpp.
Referenced by MantidQt::CustomDialogs::ConeDetails::ConeDetails(), MantidQt::CustomDialogs::CylinderDetails::CylinderDetails(), MantidQt::CustomDialogs::InfiniteCylinderDetails::InfiniteCylinderDetails(), MantidQt::CustomDialogs::PointGroupBox::PointGroupBox(), MantidQt::CustomDialogs::SliceOfCylinderRingDetails::SliceOfCylinderRingDetails(), and MantidQt::CustomDialogs::SphereDetails::SphereDetails().
bool ShapeDetails::getComplementFlag | ( | ) | const |
Get complement flag.
Get the complement flag.
Definition at line 212 of file SampleShapeHelpers.cpp.
References m_isComplement.
|
inline |
void ShapeDetails::setComplementFlag | ( | bool | flag | ) |
Set the complement flag.
flag | :: The value of the flag |
Definition at line 206 of file SampleShapeHelpers.cpp.
References m_isComplement.
|
pure virtual |
Write out the XML definition for this shape.
Implemented in MantidQt::CustomDialogs::SphereDetails, MantidQt::CustomDialogs::CylinderDetails, MantidQt::CustomDialogs::InfiniteCylinderDetails, MantidQt::CustomDialogs::SliceOfCylinderRingDetails, MantidQt::CustomDialogs::ConeDetails, MantidQt::CustomDialogs::InfiniteConeDetails, MantidQt::CustomDialogs::InfinitePlaneDetails, MantidQt::CustomDialogs::CuboidDetails, and MantidQt::CustomDialogs::HexahedronDetails.
|
protected |
ID string of this object.
Definition at line 149 of file SampleShapeHelpers.h.
Referenced by MantidQt::CustomDialogs::ConeDetails::ConeDetails(), MantidQt::CustomDialogs::CuboidDetails::CuboidDetails(), MantidQt::CustomDialogs::CylinderDetails::CylinderDetails(), getShapeID(), MantidQt::CustomDialogs::HexahedronDetails::HexahedronDetails(), MantidQt::CustomDialogs::InfiniteConeDetails::InfiniteConeDetails(), MantidQt::CustomDialogs::InfiniteCylinderDetails::InfiniteCylinderDetails(), MantidQt::CustomDialogs::InfinitePlaneDetails::InfinitePlaneDetails(), MantidQt::CustomDialogs::SliceOfCylinderRingDetails::SliceOfCylinderRingDetails(), MantidQt::CustomDialogs::SphereDetails::SphereDetails(), MantidQt::CustomDialogs::SphereDetails::writeXML(), MantidQt::CustomDialogs::CylinderDetails::writeXML(), MantidQt::CustomDialogs::InfiniteCylinderDetails::writeXML(), MantidQt::CustomDialogs::SliceOfCylinderRingDetails::writeXML(), MantidQt::CustomDialogs::ConeDetails::writeXML(), MantidQt::CustomDialogs::InfiniteConeDetails::writeXML(), MantidQt::CustomDialogs::InfinitePlaneDetails::writeXML(), MantidQt::CustomDialogs::CuboidDetails::writeXML(), and MantidQt::CustomDialogs::HexahedronDetails::writeXML().
|
private |
Take the complement of the shape.
Definition at line 153 of file SampleShapeHelpers.h.
Referenced by getComplementFlag(), and setComplementFlag().