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

This class defines the interface and functionality for the cataloging system within Mantid. More...

#include <CatalogSearch.h>

Inheritance diagram for MantidQt::MantidWidgets::CatalogSearch:

Public Member Functions

 CatalogSearch (QWidget *parent=nullptr)
 Default constructor. More...
 
 ~CatalogSearch () override
 Destructor. More...
 

Private Slots

void advancedSearchChecked ()
 Show the advanced field when checked. More...
 
void dataFileCheckboxSelected (QTableWidgetItem *item)
 Select/Deselect row when a checkbox is selected. More...
 
void dataFileRowSelected ()
 Select/Deselect row & check-box when a row is selected. More...
 
void dateSelected (QDate date)
 Update text field when date is selected. More...
 
void disableDatafileButtons ()
 Disable load/download buttons if no datafile is selected. More...
 
void doFilter (const int &index)
 Performs filterDataFileType() for specified filer type. More...
 
void downloadDataFiles ()
 Downloads selected datFiles to a specified location. More...
 
void goToInputPage ()
 Populate's result table depending page number input by user. More...
 
void helpClicked ()
 When the help button is clicked. More...
 
void hideErrorLabels ()
 Hide the error message labels. More...
 
void investigationSelected (QTableWidgetItem *item)
 Checks that the investigation is selected and performs investigationClicked. More...
 
void loadDataFiles ()
 Loads the selected dataFiles into workspaces. More...
 
void nextPageClicked ()
 Populate the result table, and update the page number. More...
 
void onFacilityLogin ()
 When the facility login button is clicked. More...
 
void onReset ()
 Reset all fields when "Reset" is clicked. More...
 
void openCalendar ()
 Open the DateTime Calendar to select date. More...
 
void openFacilitySelection ()
 Enables user to select specific facilities that they want to search the catalogs of. More...
 
void prevPageClicked ()
 Populate the result table, and update the page number. More...
 
void searchClicked ()
 When the "Search" button is clicked, display "Search results" frame. More...
 
void selectAllDataFiles (const bool &toggled)
 Selects/deselects ALL rows in dataFile table. More...
 
void showCatalogSearch ()
 When checked, show the Catalog search frame. More...
 
void showDataFileInfo ()
 When checked, show the data file info frame. More...
 
void showErrorLabels (std::map< std::string, std::string > &errors)
 Show the error message labels, including the error message on the tooltips. More...
 
void showSearchResults ()
 Shows/Hides the "Search results" frame when search results combo box is checked. More...
 
void sortByFileSize (int column)
 Sort table by file size when certain column is clicked (E.g. More...
 

Private Member Functions

void addCheckBoxColumn (QTableWidget *table)
 Add a row of checkboxes to the first column of a table. More...
 
void clearDataFileFrame ()
 Clear "dataFileFrame" when the user tries to search again. More...
 
void clearSearch (QTableWidget *table, const std::string &workspace)
 Removes data associated with previous search. More...
 
void clearSearchFrame ()
 Clear the "search" frame when an investigation has been selected. More...
 
void clearSearchResultFrame ()
 Clear the "search results" frame if no results are returned from search. More...
 
void correctedToolTip (const std::string &toolTip, QLabel *label)
 
void dateSelected (const std::string &buttonName)
 
void disableDownloadButtonIfArchives (int row)
 Disable the download button if user can access the files locally from the archives. More...
 
void emboldenTableHeaders (QTableWidget *table)
 Make the headers in the provided table bold. More...
 
std::unordered_set< std::string > getDataFileExtensions (const Mantid::API::Column_sptr &column)
 Obtain all file extensions from the provided column (dataFileResults -> File name). More...
 
const std::map< std::string, std::string > getSearchFields ()
 Obtain the users' text input for each search field. More...
 
int headerIndexByName (QTableWidget *table, const std::string &searchFor)
 Obtain the index of the column in a table that contains a specified name. More...
 
virtual void initLayout ()
 Initialise the layout. More...
 
void loadSettings ()
 Read settings from store. More...
 
void populateDataFileTable ()
 Populates the table from the results of investigationSelected();. More...
 
void populateDataFileType (const std::unordered_set< std::string > &extensions)
 Add the list of file extensions to the "Filter type..." drop-down. More...
 
void populateInstrumentBox ()
 Populate the instrument list-box. More...
 
void populateInvestigationTypeBox ()
 Populate the investigation type list-box. More...
 
void populateResultTable (int sort_section, Qt::SortOrder sort_order)
 Outputs the results of the query into a table. More...
 
void populateTable (QTableWidget *table, const Mantid::API::ITableWorkspace_sptr &workspace)
 Populate the provided table with data from the provided workspace. More...
 
void saveSettings ()
 Save the current state of ICAT for next time. More...
 
const std::vector< std::pair< int64_t, std::string > > selectedDataFileNames ()
 Obtain the file details (file ID and name) for the file to download. More...
 
std::string selectedInvestigationSession ()
 Obtain the sessionID for the selected investigation. More...
 
void setupTable (QTableWidget *table, const size_t &numOfRows, const size_t &numOfColumns)
 Setup table prior to adding data to it, such hiding vertical header. More...
 
void updateDataFileLabels (QTableWidgetItem *item)
 Updates the dataFile text boxes with relevant info about the selected dataFile. More...
 
bool validateDates ()
 Checks if start date is greater than end date. More...
 

Private Attributes

QCalendarWidget * m_calendar
 The calendar widget that will allow the user to select start and end date/times. More...
 
CatalogSelectorm_catalogSelector
 Access methods of catalog selector GUI, e.g. selected facilities. More...
 
int m_currentPageNumber
 The current page the user is on in the results window. Used for paging. More...
 
CheckboxHeaderm_customHeader
 The custom table header with checkbox functionality. More...
 
QString m_dateButtonName
 The name of the date button the user pressed to open the calendar. More...
 
QString m_downloadSaveDir
 The directory to save the downloaded dataFiles. More...
 
CatalogHelperm_icatHelper
 The helper class that accesses ICAT algorithmic functionality. More...
 
Ui::CatalogSearch m_icatUiForm
 The form generated by QT Designer. More...
 

Detailed Description

This class defines the interface and functionality for the cataloging system within Mantid.

Author
Jay Rainey
Date
08/10/2013

Definition at line 28 of file CatalogSearch.h.

Constructor & Destructor Documentation

◆ CatalogSearch()

MantidQt::MantidWidgets::CatalogSearch::CatalogSearch ( QWidget *  parent = nullptr)

Default constructor.

Constructor.

Definition at line 34 of file CatalogSearch.cpp.

References initLayout(), and loadSettings().

◆ ~CatalogSearch()

MantidQt::MantidWidgets::CatalogSearch::~CatalogSearch ( )
override

Destructor.

Member Function Documentation

◆ addCheckBoxColumn()

void MantidQt::MantidWidgets::CatalogSearch::addCheckBoxColumn ( QTableWidget *  table)
private

Add a row of checkboxes to the first column of a table.

Parameters
table:: The table to add the checkboxes to.

Definition at line 956 of file CatalogSearch.cpp.

References m_customHeader, and selectAllDataFiles().

Referenced by populateDataFileTable().

◆ advancedSearchChecked

void MantidQt::MantidWidgets::CatalogSearch::advancedSearchChecked ( )
privateslot

Show the advanced field when checked.

Show or hide advanced options if "Advanced Search" checked.

Definition at line 539 of file CatalogSearch.cpp.

References m_icatUiForm.

Referenced by initLayout().

◆ clearDataFileFrame()

void MantidQt::MantidWidgets::CatalogSearch::clearDataFileFrame ( )
private

Clear "dataFileFrame" when the user tries to search again.

Definition at line 316 of file CatalogSearch.cpp.

References m_icatUiForm.

Referenced by populateDataFileTable(), and searchClicked().

◆ clearSearch()

void MantidQt::MantidWidgets::CatalogSearch::clearSearch ( QTableWidget *  table,
const std::string &  workspace 
)
private

Removes data associated with previous search.

Clears data associated with previous search.

Parameters
table:: The table to modify and remove previous results from.
workspace:: The workspace to remove.

Definition at line 284 of file CatalogSearch.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance(), setupTable(), and workspace.

Referenced by investigationSelected(), and searchClicked().

◆ clearSearchFrame()

void MantidQt::MantidWidgets::CatalogSearch::clearSearchFrame ( )
private

Clear the "search" frame when an investigation has been selected.

Definition at line 297 of file CatalogSearch.cpp.

References m_icatUiForm.

Referenced by investigationSelected().

◆ clearSearchResultFrame()

void MantidQt::MantidWidgets::CatalogSearch::clearSearchResultFrame ( )
private

Clear the "search results" frame if no results are returned from search.

Definition at line 305 of file CatalogSearch.cpp.

References m_icatUiForm.

Referenced by populateResultTable(), and searchClicked().

◆ correctedToolTip()

void MantidQt::MantidWidgets::CatalogSearch::correctedToolTip ( const std::string &  toolTip,
QLabel *  label 
)
private

Definition at line 528 of file CatalogSearch.cpp.

Referenced by showErrorLabels(), and validateDates().

◆ dataFileCheckboxSelected

void MantidQt::MantidWidgets::CatalogSearch::dataFileCheckboxSelected ( QTableWidgetItem *  item)
privateslot

Select/Deselect row when a checkbox is selected.

Select/Deselect row when related checkbox is selected.

Parameters
item:: The item from the table the user has selected.

Definition at line 1198 of file CatalogSearch.cpp.

References m_icatUiForm.

Referenced by initLayout().

◆ dataFileRowSelected

void MantidQt::MantidWidgets::CatalogSearch::dataFileRowSelected ( )
privateslot

Select/Deselect row & check-box when a row is selected.

Disable/Enable download button if user has access to the archives.

Definition at line 1220 of file CatalogSearch.cpp.

References disableDatafileButtons(), disableDownloadButtonIfArchives(), and m_icatUiForm.

Referenced by initLayout().

◆ dateSelected() [1/2]

void MantidQt::MantidWidgets::CatalogSearch::dateSelected ( const std::string &  buttonName)
private

◆ dateSelected [2/2]

void MantidQt::MantidWidgets::CatalogSearch::dateSelected ( QDate  date)
privateslot

Update text field when date is selected.

Parameters
date:: The date the user has selected.

Definition at line 490 of file CatalogSearch.cpp.

References m_calendar, m_dateButtonName, and m_icatUiForm.

Referenced by initLayout().

◆ disableDatafileButtons

void MantidQt::MantidWidgets::CatalogSearch::disableDatafileButtons ( )
privateslot

Disable load/download buttons if no datafile is selected.

Disable the load/download button to prevent the user from downloading/loading nothing.

Definition at line 1084 of file CatalogSearch.cpp.

References m_icatUiForm.

Referenced by dataFileRowSelected().

◆ disableDownloadButtonIfArchives()

void MantidQt::MantidWidgets::CatalogSearch::disableDownloadButtonIfArchives ( int  row)
private

Disable the download button if user can access the files locally from the archives.

Parameters
row:: The row the user has selected from the table.

Definition at line 1053 of file CatalogSearch.cpp.

References headerIndexByName(), Mantid::Kernel::SingletonHolder< T >::Instance(), m_icatUiForm, Mantid::Kernel::makeCatalogConfigServiceAdapter(), and Mantid::Kernel::ICatalogInfo::transformArchivePath().

Referenced by dataFileRowSelected().

◆ doFilter

void MantidQt::MantidWidgets::CatalogSearch::doFilter ( const int &  index)
privateslot

Performs filterDataFileType() for specified filer type.

Performs filter option for specified filer type.

Definition at line 1094 of file CatalogSearch.cpp.

References headerIndexByName(), index, and m_icatUiForm.

Referenced by initLayout().

◆ downloadDataFiles

void MantidQt::MantidWidgets::CatalogSearch::downloadDataFiles ( )
privateslot

Downloads selected datFiles to a specified location.

Definition at line 1121 of file CatalogSearch.cpp.

References MantidQt::MantidWidgets::CatalogHelper::downloadDataFiles(), m_downloadSaveDir, m_icatHelper, saveSettings(), selectedDataFileNames(), and selectedInvestigationSession().

Referenced by initLayout().

◆ emboldenTableHeaders()

void MantidQt::MantidWidgets::CatalogSearch::emboldenTableHeaders ( QTableWidget *  table)
private

Make the headers in the provided table bold.

Embolden the headers in the provided table.

Definition at line 210 of file CatalogSearch.cpp.

Referenced by populateTable().

◆ getDataFileExtensions()

std::unordered_set< std::string > MantidQt::MantidWidgets::CatalogSearch::getDataFileExtensions ( const Mantid::API::Column_sptr column)
private

Obtain all file extensions from the provided column (dataFileResults -> File name).

Obtain all file extensions from the provided column.

Parameters
column:: The fileName column in the dataFile workspace.
Returns
A set containing all file extensions.

Definition at line 1026 of file CatalogSearch.cpp.

Referenced by populateDataFileTable().

◆ getSearchFields()

const std::map< std::string, std::string > MantidQt::MantidWidgets::CatalogSearch::getSearchFields ( )
private

Obtain the users' text input for each search field.

Get the users' input for each search field.

Returns
A map containing all users' search fields - (key => FieldName, value => FieldValue).

Definition at line 428 of file CatalogSearch.cpp.

References m_icatUiForm.

Referenced by searchClicked().

◆ goToInputPage

void MantidQt::MantidWidgets::CatalogSearch::goToInputPage ( )
privateslot

Populate's result table depending page number input by user.

Definition at line 819 of file CatalogSearch.cpp.

References m_currentPageNumber, m_icatUiForm, and searchClicked().

Referenced by initLayout().

◆ headerIndexByName()

int MantidQt::MantidWidgets::CatalogSearch::headerIndexByName ( QTableWidget *  table,
const std::string &  searchFor 
)
private

Obtain the index of the column in a table that contains a specified name.

Parameters
table:: The table to search the headers on.
searchFor:: The header name to search against.
Returns
The index of the column with the specified name.

Definition at line 329 of file CatalogSearch.cpp.

Referenced by disableDownloadButtonIfArchives(), doFilter(), investigationSelected(), populateDataFileTable(), populateResultTable(), selectedDataFileNames(), selectedInvestigationSession(), sortByFileSize(), and updateDataFileLabels().

◆ helpClicked

void MantidQt::MantidWidgets::CatalogSearch::helpClicked ( )
privateslot

When the help button is clicked.

Sends the user to relevant search page on the Mantid project site.

Definition at line 168 of file CatalogSearch.cpp.

References MantidQt::API::MantidDesktopServices::openUrl().

Referenced by initLayout().

◆ hideErrorLabels

void MantidQt::MantidWidgets::CatalogSearch::hideErrorLabels ( )
privateslot

Hide the error message labels.

Hides the error message labels on the GUI.

Definition at line 660 of file CatalogSearch.cpp.

References m_icatUiForm.

Referenced by initLayout(), and searchClicked().

◆ initLayout()

void MantidQt::MantidWidgets::CatalogSearch::initLayout ( )
privatevirtual

◆ investigationSelected

void MantidQt::MantidWidgets::CatalogSearch::investigationSelected ( QTableWidgetItem *  item)
privateslot

Checks that the investigation is selected and performs investigationClicked.

Hides the "search results" frame, and shows the "dataFiles" frame when an investigation is selected.

Definition at line 835 of file CatalogSearch.cpp.

References clearSearch(), clearSearchFrame(), MantidQt::MantidWidgets::CatalogHelper::executeGetDataFiles(), headerIndexByName(), m_icatHelper, m_icatUiForm, populateDataFileTable(), and updateDataFileLabels().

Referenced by initLayout().

◆ loadDataFiles

void MantidQt::MantidWidgets::CatalogSearch::loadDataFiles ( )
privateslot

◆ loadSettings()

void MantidQt::MantidWidgets::CatalogSearch::loadSettings ( )
private

Read settings from store.

Read the saved settings from the store.

Definition at line 357 of file CatalogSearch.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance(), and m_downloadSaveDir.

Referenced by CatalogSearch().

◆ nextPageClicked

void MantidQt::MantidWidgets::CatalogSearch::nextPageClicked ( )
privateslot

Populate the result table, and update the page number.

Definition at line 789 of file CatalogSearch.cpp.

References m_currentPageNumber, m_icatUiForm, and searchClicked().

Referenced by initLayout().

◆ onFacilityLogin

void MantidQt::MantidWidgets::CatalogSearch::onFacilityLogin ( )
privateslot

When the facility login button is clicked.

Opens the login dialog to allow the user to log into another facility.

Definition at line 163 of file CatalogSearch.cpp.

◆ onReset

void MantidQt::MantidWidgets::CatalogSearch::onReset ( )
privateslot

Reset all fields when "Reset" is clicked.

Reset all fields when the "Reset" button is pressed.

Definition at line 679 of file CatalogSearch.cpp.

References m_icatUiForm.

Referenced by initLayout().

◆ openCalendar

void MantidQt::MantidWidgets::CatalogSearch::openCalendar ( )
privateslot

Open the DateTime Calendar to select date.

SLOTS for "Catalog Search".

Opens the DateTime m_calendar box when start or end date selected.

Definition at line 468 of file CatalogSearch.cpp.

References m_calendar, and m_dateButtonName.

Referenced by initLayout().

◆ openFacilitySelection

void MantidQt::MantidWidgets::CatalogSearch::openFacilitySelection ( )
privateslot

Enables user to select specific facilities that they want to search the catalogs of.

Allows a user to select specific facilities that they want to search the catalogs of.

Definition at line 693 of file CatalogSearch.cpp.

References m_catalogSelector, and MantidQt::MantidWidgets::CatalogSelector::populateFacilitySelection().

Referenced by initLayout().

◆ populateDataFileTable()

void MantidQt::MantidWidgets::CatalogSearch::populateDataFileTable ( )
private

Populates the table from the results of investigationSelected();.

Outputs related dataFiles (from selected investigation) into the "DataFile information" table.

Definition at line 881 of file CatalogSearch.cpp.

References addCheckBoxColumn(), clearDataFileFrame(), getDataFileExtensions(), headerIndexByName(), Mantid::Kernel::SingletonHolder< T >::Instance(), m_customHeader, m_icatUiForm, populateDataFileType(), populateTable(), setupTable(), sortByFileSize(), and workspace.

Referenced by investigationSelected().

◆ populateDataFileType()

void MantidQt::MantidWidgets::CatalogSearch::populateDataFileType ( const std::unordered_set< std::string > &  extensions)
private

Add the list of file extensions to the "Filter type..." drop-down.

Definition at line 1042 of file CatalogSearch.cpp.

References m_icatUiForm.

Referenced by populateDataFileTable().

◆ populateInstrumentBox()

void MantidQt::MantidWidgets::CatalogSearch::populateInstrumentBox ( )
private

◆ populateInvestigationTypeBox()

void MantidQt::MantidWidgets::CatalogSearch::populateInvestigationTypeBox ( )
private

Populate the investigation type list-box.

Populates the "Investigation type" list-box.

Definition at line 405 of file CatalogSearch.cpp.

References MantidQt::MantidWidgets::CatalogHelper::getInvestigationTypeList(), MantidQt::MantidWidgets::CatalogSelector::getSelectedCatalogSessions(), m_catalogSelector, m_icatHelper, and m_icatUiForm.

Referenced by initLayout().

◆ populateResultTable()

void MantidQt::MantidWidgets::CatalogSearch::populateResultTable ( int  sort_section,
Qt::SortOrder  sort_order 
)
private

Outputs the results of the query into a table.

Outputs the results of the search into the "Search results" table.

Parameters
sort_section:: An int giving the column number by which to sort the data (0 will sort by StartDate)
sort_order:: A Qt::SortOrder giving the order of sorting

Definition at line 709 of file CatalogSearch.cpp.

References clearSearchResultFrame(), headerIndexByName(), Mantid::Kernel::SingletonHolder< T >::Instance(), m_icatUiForm, populateTable(), setupTable(), and workspace.

Referenced by searchClicked().

◆ populateTable()

void MantidQt::MantidWidgets::CatalogSearch::populateTable ( QTableWidget *  table,
const Mantid::API::ITableWorkspace_sptr workspace 
)
private

Populate the provided table with data from the provided workspace.

Parameters
table:: The table we want to setup.
workspace:: The workspace to obtain data information from.

Definition at line 245 of file CatalogSearch.cpp.

References emboldenTableHeaders(), and workspace.

Referenced by populateDataFileTable(), and populateResultTable().

◆ prevPageClicked

void MantidQt::MantidWidgets::CatalogSearch::prevPageClicked ( )
privateslot

Populate the result table, and update the page number.

Definition at line 806 of file CatalogSearch.cpp.

References m_currentPageNumber, and searchClicked().

Referenced by initLayout().

◆ saveSettings()

void MantidQt::MantidWidgets::CatalogSearch::saveSettings ( )
private

Save the current state of ICAT for next time.

Definition at line 347 of file CatalogSearch.cpp.

References m_downloadSaveDir.

Referenced by downloadDataFiles().

◆ searchClicked

void MantidQt::MantidWidgets::CatalogSearch::searchClicked ( )
privateslot

◆ selectAllDataFiles

void MantidQt::MantidWidgets::CatalogSearch::selectAllDataFiles ( const bool &  toggled)
privateslot

Selects/deselects ALL rows in dataFile table.

If the user has checked "check all", then check and select ALL rows.

Otherwise, deselect all.

Parameters
toggled:: True if user has checked the checkbox in the dataFile table header.

Definition at line 1173 of file CatalogSearch.cpp.

References m_icatUiForm.

Referenced by addCheckBoxColumn().

◆ selectedDataFileNames()

const std::vector< std::pair< int64_t, std::string > > MantidQt::MantidWidgets::CatalogSearch::selectedDataFileNames ( )
private

Obtain the file details (file ID and name) for the file to download.

Obtains the names of the selected dataFiles, in preparation for download.

(Used in downloadDataFiles).

Returns
A vector containing the fileID and fileName of the datafile(s) to download.

Definition at line 983 of file CatalogSearch.cpp.

References headerIndexByName(), and m_icatUiForm.

Referenced by downloadDataFiles(), and loadDataFiles().

◆ selectedInvestigationSession()

std::string MantidQt::MantidWidgets::CatalogSearch::selectedInvestigationSession ( )
private

Obtain the sessionID for the selected investigation.

Obtain the sessionID for the specific row selected in the search results table.

(only one row can be selected at a time)

Returns
The sessionID from the selected row.

Definition at line 773 of file CatalogSearch.cpp.

References headerIndexByName(), and m_icatUiForm.

Referenced by downloadDataFiles(), and loadDataFiles().

◆ setupTable()

void MantidQt::MantidWidgets::CatalogSearch::setupTable ( QTableWidget *  table,
const size_t &  numOfRows,
const size_t &  numOfColumns 
)
private

Setup table prior to adding data to it, such hiding vertical header.

Set the table properties prior to adding data to it.

Parameters
table:: The table we want to setup.
numOfRows:: The number of rows in the workspace.
numOfColumns:: The number of columns in the workspace.

Definition at line 224 of file CatalogSearch.cpp.

Referenced by clearSearch(), populateDataFileTable(), and populateResultTable().

◆ showCatalogSearch

void MantidQt::MantidWidgets::CatalogSearch::showCatalogSearch ( )
privateslot

When checked, show the Catalog search frame.

Shows/hides the "Catalog search" frame when search combo box is checked.

Definition at line 176 of file CatalogSearch.cpp.

References m_icatUiForm.

Referenced by initLayout().

◆ showDataFileInfo

void MantidQt::MantidWidgets::CatalogSearch::showDataFileInfo ( )
privateslot

When checked, show the data file info frame.

Hides "Search results" frame when a result is double clicked.

Definition at line 199 of file CatalogSearch.cpp.

References m_icatUiForm.

Referenced by initLayout().

◆ showErrorLabels

void MantidQt::MantidWidgets::CatalogSearch::showErrorLabels ( std::map< std::string, std::string > &  errors)
privateslot

Show the error message labels, including the error message on the tooltips.

Parameters
errors:: A map containing the error label names, and the related error message.

Definition at line 645 of file CatalogSearch.cpp.

References correctedToolTip(), error, and m_icatUiForm.

Referenced by searchClicked().

◆ showSearchResults

void MantidQt::MantidWidgets::CatalogSearch::showSearchResults ( )
privateslot

Shows/Hides the "Search results" frame when search results combo box is checked.

Definition at line 188 of file CatalogSearch.cpp.

References m_icatUiForm.

Referenced by initLayout().

◆ sortByFileSize

void MantidQt::MantidWidgets::CatalogSearch::sortByFileSize ( int  column)
privateslot

Sort table by file size when certain column is clicked (E.g.

When the user clicks "File size" column sort the table by "File size(bytes)".

"File size" row).

Parameters
column:: The column that was clicked by the user.

Definition at line 1247 of file CatalogSearch.cpp.

References headerIndexByName(), and m_icatUiForm.

Referenced by populateDataFileTable().

◆ updateDataFileLabels()

void MantidQt::MantidWidgets::CatalogSearch::updateDataFileLabels ( QTableWidgetItem *  item)
private

Updates the dataFile text boxes with relevant info about the selected dataFile.

Updates the dataFile text boxes with relevant info regarding the selected dataFile.

Definition at line 1003 of file CatalogSearch.cpp.

References headerIndexByName(), and m_icatUiForm.

Referenced by investigationSelected().

◆ validateDates()

bool MantidQt::MantidWidgets::CatalogSearch::validateDates ( )
private

Checks if start date is greater than end date.

Returns
true if start date is greater than end date.

Definition at line 506 of file CatalogSearch.cpp.

References correctedToolTip(), MantidQt::MantidWidgets::CatalogHelper::getTimevalue(), m_icatHelper, and m_icatUiForm.

Referenced by searchClicked().

Member Data Documentation

◆ m_calendar

QCalendarWidget* MantidQt::MantidWidgets::CatalogSearch::m_calendar
private

The calendar widget that will allow the user to select start and end date/times.

Definition at line 187 of file CatalogSearch.h.

Referenced by dateSelected(), initLayout(), and openCalendar().

◆ m_catalogSelector

CatalogSelector* MantidQt::MantidWidgets::CatalogSearch::m_catalogSelector
private

Access methods of catalog selector GUI, e.g. selected facilities.

Definition at line 191 of file CatalogSearch.h.

Referenced by openFacilitySelection(), populateInstrumentBox(), populateInvestigationTypeBox(), and searchClicked().

◆ m_currentPageNumber

int MantidQt::MantidWidgets::CatalogSearch::m_currentPageNumber
private

The current page the user is on in the results window. Used for paging.

Definition at line 195 of file CatalogSearch.h.

Referenced by goToInputPage(), nextPageClicked(), prevPageClicked(), and searchClicked().

◆ m_customHeader

CheckboxHeader* MantidQt::MantidWidgets::CatalogSearch::m_customHeader
private

The custom table header with checkbox functionality.

Definition at line 182 of file CatalogSearch.h.

Referenced by addCheckBoxColumn(), and populateDataFileTable().

◆ m_dateButtonName

QString MantidQt::MantidWidgets::CatalogSearch::m_dateButtonName
private

The name of the date button the user pressed to open the calendar.

Definition at line 180 of file CatalogSearch.h.

Referenced by dateSelected(), and openCalendar().

◆ m_downloadSaveDir

QString MantidQt::MantidWidgets::CatalogSearch::m_downloadSaveDir
private

The directory to save the downloaded dataFiles.

Definition at line 193 of file CatalogSearch.h.

Referenced by downloadDataFiles(), loadDataFiles(), loadSettings(), and saveSettings().

◆ m_icatHelper

CatalogHelper* MantidQt::MantidWidgets::CatalogSearch::m_icatHelper
private

The helper class that accesses ICAT algorithmic functionality.

Definition at line 189 of file CatalogSearch.h.

Referenced by downloadDataFiles(), investigationSelected(), loadDataFiles(), populateInstrumentBox(), populateInvestigationTypeBox(), searchClicked(), and validateDates().

◆ m_icatUiForm

Ui::CatalogSearch MantidQt::MantidWidgets::CatalogSearch::m_icatUiForm
private

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