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

Implements a dialog box that allows users to save multiple Mantid workspaces. More...

#include <SaveWorkspaces.h>

Inheritance diagram for MantidQt::MantidWidgets::SaveWorkspaces:
MantidQt::API::MantidDialog

Public Slots

void onSaveAsZeroErrorFreeChanged (int state)
 
void onUpdateGeomtryInformation (QString &geometryID, QString &sampleHeight, QString &sampleWidth, QString &sampleThickness)
 

Signals

void closing ()
 
void createZeroErrorFreeWorkspace (QString &originalWorkspace, QString &zeroFreeWorkspace)
 
void deleteZeroErrorFreeWorkspace (QString &zeroFreeWorkspace)
 
void updateGeometryInformation ()
 
- Signals inherited from MantidQt::API::MantidDialog
void runAsPythonScript (const QString &code, bool)
 

Public Member Functions

void initLayout ()
 
 SaveWorkspaces (QWidget *parent, const QString &suggFname, QHash< const QCheckBox *const, QString > &defSavs, bool saveAsZeroErrorFree)
 
- Public Member Functions inherited from MantidQt::API::MantidDialog
 MantidDialog (QWidget *parent=nullptr, const Qt::WindowFlags &flags=Qt::WindowCloseButtonHint|Qt::WindowType::WindowTitleHint)
 DefaultConstructor.
 
 ~MantidDialog () override
 Destructor.
 

Static Public Member Functions

static QString getSaveAlgExt (const QString &algName)
 Returns the save extension expected the name algorithm.
 
- Static Public Member Functions inherited from MantidQt::API::MantidDialog
static bool handle (QObject *receiver, const std::exception &e)
 Handles the exception caught in an event handler.
 

Private Types

using SavFormatsConstIt = QHash< QCheckBox *const, QString >::const_iterator
 

Private Slots

void saveFileBrowse ()
 
void saveSel ()
 
void setFileName (int row)
 

Private Member Functions

void addButtonsDisab (int row)
 
void closeEvent (QCloseEvent *event) override
 
bool isValid ()
 
QHash< QString, QString > provideZeroFreeWorkspaces (const QListWidget *workspaces)
 
void readSettings ()
 
void removeZeroFreeWorkspaces (const QHash< QString, QString > &workspaces)
 
QString saveList (const QList< QListWidgetItem * > &list, const QString &algorithm, QString fileBase, bool toAppend, QHash< QString, QString > workspaceMap)
 
void saveSettings () const
 
void setFileName (const QString &newName)
 
void setupFormatTicks (const QHash< const QCheckBox *const, QString > &defSavs)
 
void setupLine1 (QHBoxLayout *const lineOne)
 
void setupLine2 (QHBoxLayout *const lineTwo, const QHash< const QCheckBox *const, QString > &defSavs)
 

Private Attributes

QCheckBox * m_append
 
QLineEdit * m_fNameEdit
 
QString m_geometryID
 
QString m_lastName
 
QString m_sampleHeight
 
QString m_sampleThickness
 
QString m_sampleWidth
 
bool m_saveAsZeroErrorFree
 
QHash< QCheckBox *const, QString > m_savFormats
 
QListWidget * m_workspaces
 

Additional Inherited Members

- Protected Member Functions inherited from MantidQt::API::MantidDialog
virtual void handleException (const std::exception &e)
 Override this method to handle an exception in a derived class.
 
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.
 

Detailed Description

Implements a dialog box that allows users to save multiple Mantid workspaces.

Author
Steve Williams

Definition at line 26 of file SaveWorkspaces.h.

Member Typedef Documentation

◆ SavFormatsConstIt

using MantidQt::MantidWidgets::SaveWorkspaces::SavFormatsConstIt = QHash<QCheckBox *const, QString>::const_iterator
private

Definition at line 58 of file SaveWorkspaces.h.

Constructor & Destructor Documentation

◆ SaveWorkspaces()

MantidQt::MantidWidgets::SaveWorkspaces::SaveWorkspaces ( QWidget *  parent,
const QString &  suggFname,
QHash< const QCheckBox *const, QString > &  defSavs,
bool  saveAsZeroErrorFree 
)

Member Function Documentation

◆ addButtonsDisab()

void MantidQt::MantidWidgets::SaveWorkspaces::addButtonsDisab ( int  row)
private

◆ closeEvent()

void MantidQt::MantidWidgets::SaveWorkspaces::closeEvent ( QCloseEvent *  event)
overrideprivate

◆ closing

void MantidQt::MantidWidgets::SaveWorkspaces::closing ( )
signal

◆ createZeroErrorFreeWorkspace

void MantidQt::MantidWidgets::SaveWorkspaces::createZeroErrorFreeWorkspace ( QString &  originalWorkspace,
QString &  zeroFreeWorkspace 
)
signal

◆ deleteZeroErrorFreeWorkspace

void MantidQt::MantidWidgets::SaveWorkspaces::deleteZeroErrorFreeWorkspace ( QString &  zeroFreeWorkspace)
signal

◆ getSaveAlgExt()

static QString MantidQt::MantidWidgets::SaveWorkspaces::getSaveAlgExt ( const QString &  algName)
static

Returns the save extension expected the name algorithm.

◆ initLayout()

void MantidQt::MantidWidgets::SaveWorkspaces::initLayout ( )

◆ isValid()

bool MantidQt::MantidWidgets::SaveWorkspaces::isValid ( )
private

◆ onSaveAsZeroErrorFreeChanged

void MantidQt::MantidWidgets::SaveWorkspaces::onSaveAsZeroErrorFreeChanged ( int  state)
slot

◆ onUpdateGeomtryInformation

void MantidQt::MantidWidgets::SaveWorkspaces::onUpdateGeomtryInformation ( QString &  geometryID,
QString &  sampleHeight,
QString &  sampleWidth,
QString &  sampleThickness 
)
slot

◆ provideZeroFreeWorkspaces()

QHash< QString, QString > MantidQt::MantidWidgets::SaveWorkspaces::provideZeroFreeWorkspaces ( const QListWidget *  workspaces)
private

◆ readSettings()

void MantidQt::MantidWidgets::SaveWorkspaces::readSettings ( )
private

◆ removeZeroFreeWorkspaces()

void MantidQt::MantidWidgets::SaveWorkspaces::removeZeroFreeWorkspaces ( const QHash< QString, QString > &  workspaces)
private

◆ saveFileBrowse

void MantidQt::MantidWidgets::SaveWorkspaces::saveFileBrowse ( )
privateslot

◆ saveList()

QString MantidQt::MantidWidgets::SaveWorkspaces::saveList ( const QList< QListWidgetItem * > &  list,
const QString &  algorithm,
QString  fileBase,
bool  toAppend,
QHash< QString, QString >  workspaceMap 
)
private

◆ saveSel

void MantidQt::MantidWidgets::SaveWorkspaces::saveSel ( )
privateslot

◆ saveSettings()

void MantidQt::MantidWidgets::SaveWorkspaces::saveSettings ( ) const
private

◆ setFileName() [1/2]

void MantidQt::MantidWidgets::SaveWorkspaces::setFileName ( const QString &  newName)
private

◆ setFileName [2/2]

void MantidQt::MantidWidgets::SaveWorkspaces::setFileName ( int  row)
privateslot

◆ setupFormatTicks()

void MantidQt::MantidWidgets::SaveWorkspaces::setupFormatTicks ( const QHash< const QCheckBox *const, QString > &  defSavs)
private

◆ setupLine1()

void MantidQt::MantidWidgets::SaveWorkspaces::setupLine1 ( QHBoxLayout *const  lineOne)
private

◆ setupLine2()

void MantidQt::MantidWidgets::SaveWorkspaces::setupLine2 ( QHBoxLayout *const  lineTwo,
const QHash< const QCheckBox *const, QString > &  defSavs 
)
private

◆ updateGeometryInformation

void MantidQt::MantidWidgets::SaveWorkspaces::updateGeometryInformation ( )
signal

Member Data Documentation

◆ m_append

QCheckBox* MantidQt::MantidWidgets::SaveWorkspaces::m_append
private

Definition at line 49 of file SaveWorkspaces.h.

◆ m_fNameEdit

QLineEdit* MantidQt::MantidWidgets::SaveWorkspaces::m_fNameEdit
private

Definition at line 47 of file SaveWorkspaces.h.

◆ m_geometryID

QString MantidQt::MantidWidgets::SaveWorkspaces::m_geometryID
private

Definition at line 52 of file SaveWorkspaces.h.

◆ m_lastName

QString MantidQt::MantidWidgets::SaveWorkspaces::m_lastName
private

Definition at line 50 of file SaveWorkspaces.h.

◆ m_sampleHeight

QString MantidQt::MantidWidgets::SaveWorkspaces::m_sampleHeight
private

Definition at line 53 of file SaveWorkspaces.h.

◆ m_sampleThickness

QString MantidQt::MantidWidgets::SaveWorkspaces::m_sampleThickness
private

Definition at line 55 of file SaveWorkspaces.h.

◆ m_sampleWidth

QString MantidQt::MantidWidgets::SaveWorkspaces::m_sampleWidth
private

Definition at line 54 of file SaveWorkspaces.h.

◆ m_saveAsZeroErrorFree

bool MantidQt::MantidWidgets::SaveWorkspaces::m_saveAsZeroErrorFree
private

Definition at line 51 of file SaveWorkspaces.h.

◆ m_savFormats

QHash<QCheckBox *const, QString> MantidQt::MantidWidgets::SaveWorkspaces::m_savFormats
private

Definition at line 57 of file SaveWorkspaces.h.

◆ m_workspaces

QListWidget* MantidQt::MantidWidgets::SaveWorkspaces::m_workspaces
private

Definition at line 48 of file SaveWorkspaces.h.


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