Mantid
Loading...
Searching...
No Matches
Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
MantidQt::MantidWidgets::LogValueSelector Class Reference

LogValueSelector : Select a log name and mean/min/max/first/last. More...

#include <LogValueSelector.h>

Inheritance diagram for MantidQt::MantidWidgets::LogValueSelector:
MantidQt::API::MantidWidget

Signals

void logOptionsEnabled (bool enabled)
 Checkbox state has changed. More...
 
- Signals inherited from MantidQt::API::MantidWidget
void runAsPythonScript (const QString &code, bool)
 

Public Member Functions

Mantid::Kernel::Math::StatisticType getFunction () const
 Get selected function enum value. More...
 
QString getFunctionText () const
 Get selected function text. More...
 
QString getLog () const
 Get selected log text. More...
 
QComboBox * getLogComboBox () const
 Get a pointer to log combo box. More...
 
bool isCheckboxShown () const
 Whether checkbox is shown or not. More...
 
bool isCheckboxTicked () const
 Whether checkbox is ticked or not. More...
 
 LogValueSelector (QWidget *parent)
 Constructor. More...
 
void setCheckboxShown (bool visible)
 Control whether checkbox is shown. More...
 
void setEnabled (bool enabled)
 Set enabled/disabled. More...
 
- Public Member Functions inherited from MantidQt::API::MantidWidget
virtual QVariant getUserInput () const
 Returns a QVariant containing what the widget classes as user input so that input can be returned through a common interface. More...
 
virtual void setUserInput (const QVariant &value)
 Sets a value on a mantid widget through a common interface. More...
 

Private Slots

void setEnabled (int checkstate)
 Set enabled/disabled. More...
 

Private Member Functions

void doConnect ()
 Set up connections. More...
 

Private Attributes

Ui::LogValueSelector m_ui
 User interface. More...
 

Static Private Attributes

static const std::map< std::string, Mantid::Kernel::Math::StatisticTypeSTRING_TO_FUNC
 Converts strings like "Mean" or "Max" to enum values. More...
 

Additional Inherited Members

- Protected Member Functions inherited from MantidQt::API::MantidWidget
 MantidWidget (QWidget *parent=nullptr)
 Default constructor. More...
 
QString runPythonCode (const QString &code, bool no_output=false)
 Run python code that is passed to it and, optionally, return anything it wrote to standard output as a string. More...
 

Detailed Description

LogValueSelector : Select a log name and mean/min/max/first/last.

Definition at line 19 of file LogValueSelector.h.

Constructor & Destructor Documentation

◆ LogValueSelector()

MantidQt::MantidWidgets::LogValueSelector::LogValueSelector ( QWidget *  parent)

Constructor.

Constructor for the widget.

Parameters
parent:: [input] Parent dialog for the widget

Definition at line 24 of file LogValueSelector.cpp.

References doConnect(), m_ui, and setEnabled().

Member Function Documentation

◆ doConnect()

void MantidQt::MantidWidgets::LogValueSelector::doConnect ( )
private

Set up connections.

Set up signal/slot connections.

Definition at line 35 of file LogValueSelector.cpp.

References m_ui, and setEnabled().

Referenced by LogValueSelector().

◆ getFunction()

StatisticType MantidQt::MantidWidgets::LogValueSelector::getFunction ( ) const

Get selected function enum value.

Get selected function.

Returns
Function selected in dropdown

Definition at line 53 of file LogValueSelector.cpp.

References getFunctionText(), and STRING_TO_FUNC.

◆ getFunctionText()

QString MantidQt::MantidWidgets::LogValueSelector::getFunctionText ( ) const

Get selected function text.

Returns
Text selected in function dropdown

Definition at line 47 of file LogValueSelector.cpp.

References m_ui.

Referenced by getFunction().

◆ getLog()

QString MantidQt::MantidWidgets::LogValueSelector::getLog ( ) const

Get selected log text.

Returns
Text selected in log dropdown

Definition at line 41 of file LogValueSelector.cpp.

References m_ui.

◆ getLogComboBox()

QComboBox * MantidQt::MantidWidgets::LogValueSelector::getLogComboBox ( ) const

Get a pointer to log combo box.

Returns
:: Pointer to log combo box

Definition at line 74 of file LogValueSelector.cpp.

References m_ui.

◆ isCheckboxShown()

bool MantidQt::MantidWidgets::LogValueSelector::isCheckboxShown ( ) const

Whether checkbox is shown or not.

Returns
whether checkbox is visible

Definition at line 62 of file LogValueSelector.cpp.

References m_ui.

◆ isCheckboxTicked()

bool MantidQt::MantidWidgets::LogValueSelector::isCheckboxTicked ( ) const

Whether checkbox is ticked or not.

Returns whether checkbox is ticked or not.

Returns
:: true if checkbox is ticked

Definition at line 91 of file LogValueSelector.cpp.

References m_ui.

◆ logOptionsEnabled

void MantidQt::MantidWidgets::LogValueSelector::logOptionsEnabled ( bool  enabled)
signal

Checkbox state has changed.

Referenced by setEnabled().

◆ setCheckboxShown()

void MantidQt::MantidWidgets::LogValueSelector::setCheckboxShown ( bool  visible)

Control whether checkbox is shown.

Parameters
visible:: [input] Whether checkbox should be visible

Definition at line 68 of file LogValueSelector.cpp.

References m_ui.

◆ setEnabled() [1/2]

void MantidQt::MantidWidgets::LogValueSelector::setEnabled ( bool  enabled)
inline

Set enabled/disabled.

Definition at line 44 of file LogValueSelector.h.

References setEnabled().

Referenced by setEnabled().

◆ setEnabled [2/2]

void MantidQt::MantidWidgets::LogValueSelector::setEnabled ( int  checkstate)
privateslot

Set enabled/disabled.

Slot: set enabled/disabled.

Parameters
checkstate:: [input] State of checkbox

Definition at line 80 of file LogValueSelector.cpp.

References logOptionsEnabled(), and m_ui.

Referenced by doConnect(), and LogValueSelector().

Member Data Documentation

◆ m_ui

Ui::LogValueSelector MantidQt::MantidWidgets::LogValueSelector::m_ui
private

◆ STRING_TO_FUNC

const std::map< std::string, StatisticType > MantidQt::MantidWidgets::LogValueSelector::STRING_TO_FUNC
staticprivate
Initial value:
= {{"Mean", StatisticType::Mean},
{"Min", StatisticType::Minimum},
{"Max", StatisticType::Maximum},
{"First", StatisticType::FirstValue},
{"Last", StatisticType::LastValue}}

Converts strings like "Mean" or "Max" to enum values.

Definition at line 65 of file LogValueSelector.h.

Referenced by getFunction().


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