|
Mantid
|
#include <MantidWSIndexDialog.h>
Public Member Functions | |
| void | addInterval (int single) |
| Add an interval starting and ending at single. | |
| void | addInterval (int start, int end) |
| Add an interval starting at start and ending at end. | |
| void | addInterval (Interval) |
| Add an interval. | |
| void | addIntervalList (const IntervalList &) |
| Adds an IntervalList to this IntervalList. | |
| void | addIntervals (QString) |
| Attempts to parse the given string into a IntervalList to add. | |
| void | clear () |
| Clears the interval list. | |
| bool | contains (const Interval &) const |
| Returns true if this interval list completely contains the interval passed to it, else false. | |
| bool | contains (const IntervalList &) const |
| Returns true if this interval list completely contains the interval list passed to it, else false. | |
| std::set< int > | getIntSet () const |
| Returns a set of ints that represents the interval. | |
| const QList< Interval > & | getList () const |
| Returns a reference to the list of Intervals. | |
| IntervalList (const Interval &) | |
| Constructor - with a list containing a single Interval. | |
| IntervalList (const QString &) | |
| Constructor - with a list created by parsing the input string. | |
| IntervalList (void) | |
| Constructor - with empty list. | |
| void | setIntervalList (const IntervalList &) |
| Replaces the current list with the list belonging to given IntervalList object. | |
| QString | toQString (int numOfIntervals=6) const |
| Convenience function that returns the contents of toStdString as a QString object. | |
| std::string | toStdString (int numOfIntervals=6) const |
| Returns a string that represents the IntervalList, of the form "0, 2-5, 8, 10-12". | |
| int | totalIntervalLength () const |
| Returns the combined length of all Intervals in the list. | |
Static Public Member Functions | |
| static IntervalList | intersect (const IntervalList &, const Interval &) |
| Returns an IntervalList which is the intersection of the given IntervalList and Interval. | |
| static IntervalList | intersect (const IntervalList &, const IntervalList &) |
| Returns an IntervalList which is the intersection of the given IntervalLists. | |
| static bool | isParsable (const QString &) |
| Returns true if the QString can be parsed into an IntervalList, else false. | |
| static bool | isParsable (const QString &, const IntervalList &) |
| Returns true if the QString can be parsed into an IntervalList which can then be contained in the IntervalList given, else false. | |
Private Attributes | |
| QList< Interval > | m_list |
| A list of all the Intervals in this IntervalList. | |
Definition at line 113 of file MantidWSIndexDialog.h.
|
default |
Constructor - with empty list.
|
explicit |
Constructor - with a list created by parsing the input string.
Definition at line 1008 of file MantidWSIndexDialog.cpp.
References addIntervals().
|
explicit |
Constructor - with a list containing a single Interval.
Definition at line 1010 of file MantidWSIndexDialog.cpp.
References m_list.
| void MantidQt::MantidWidgets::IntervalList::addInterval | ( | int | single | ) |
Add an interval starting and ending at single.
Definition at line 1055 of file MantidWSIndexDialog.cpp.
References addInterval().
Referenced by addInterval(), addInterval(), addIntervalList(), addIntervals(), MantidQt::MantidWidgets::MantidWSIndexWidget::generateSpectraNumIntervals(), MantidQt::MantidWidgets::MantidWSIndexWidget::generateWsIndexIntervals(), and intersect().
| void MantidQt::MantidWidgets::IntervalList::addInterval | ( | int | start, |
| int | end | ||
| ) |
Add an interval starting at start and ending at end.
Definition at line 1119 of file MantidWSIndexDialog.cpp.
References addInterval().
| void MantidQt::MantidWidgets::IntervalList::addInterval | ( | Interval | interval | ) |
Add an interval.
Definition at line 1064 of file MantidWSIndexDialog.cpp.
References m_list, MantidQt::MantidWidgets::Interval::merge(), and MantidQt::MantidWidgets::Interval::start().
| void MantidQt::MantidWidgets::IntervalList::addIntervalList | ( | const IntervalList & | intervals | ) |
Adds an IntervalList to this IntervalList.
Definition at line 1138 of file MantidWSIndexDialog.cpp.
References addInterval(), and getList().
| void MantidQt::MantidWidgets::IntervalList::addIntervals | ( | QString | intervals | ) |
Attempts to parse the given string into a IntervalList to add.
Definition at line 1125 of file MantidWSIndexDialog.cpp.
References addInterval().
Referenced by IntervalList(), and MantidQt::MantidWidgets::MantidWSIndexWidget::plotRequested().
| void MantidQt::MantidWidgets::IntervalList::clear | ( | ) |
Clears the interval list.
Definition at line 1150 of file MantidWSIndexDialog.cpp.
References m_list.
Referenced by MantidQt::MantidWidgets::MantidWSIndexWidget::validatePlotOptions().
| bool MantidQt::MantidWidgets::IntervalList::contains | ( | const Interval & | other | ) | const |
Returns true if this interval list completely contains the interval passed to it, else false.
Definition at line 1163 of file MantidWSIndexDialog.cpp.
References m_list.
Referenced by isParsable().
| bool MantidQt::MantidWidgets::IntervalList::contains | ( | const IntervalList & | other | ) | const |
Returns true if this interval list completely contains the interval list passed to it, else false.
Definition at line 1169 of file MantidWSIndexDialog.cpp.
| std::set< int > MantidQt::MantidWidgets::IntervalList::getIntSet | ( | ) | const |
Returns a set of ints that represents the interval.
Definition at line 1152 of file MantidWSIndexDialog.cpp.
References m_list.
Referenced by MantidQt::MantidWidgets::MantidWSIndexWidget::getPlots(), and intersect().
Returns a reference to the list of Intervals.
Definition at line 1012 of file MantidWSIndexDialog.cpp.
References m_list.
Referenced by addIntervalList(), MantidQt::MantidWidgets::MantidWSIndexWidget::getPlots(), setIntervalList(), and MantidQt::MantidWidgets::MantidWSIndexWidget::usingSpectraNumbers().
|
static |
Returns an IntervalList which is the intersection of the given IntervalList and Interval.
Definition at line 1193 of file MantidWSIndexDialog.cpp.
References intersect().
Referenced by MantidQt::MantidWidgets::MantidWSIndexWidget::generateSpectraNumIntervals(), MantidQt::MantidWidgets::MantidWSIndexWidget::generateWsIndexIntervals(), and intersect().
|
static |
Returns an IntervalList which is the intersection of the given IntervalLists.
Definition at line 1199 of file MantidWSIndexDialog.cpp.
References addInterval(), and getIntSet().
|
static |
Returns true if the QString can be parsed into an IntervalList, else false.
Definition at line 1184 of file MantidWSIndexDialog.cpp.
Referenced by MantidQt::MantidWidgets::IntervalListValidator::validate().
|
static |
Returns true if the QString can be parsed into an IntervalList which can then be contained in the IntervalList given, else false.
Definition at line 1175 of file MantidWSIndexDialog.cpp.
References contains().
| void MantidQt::MantidWidgets::IntervalList::setIntervalList | ( | const IntervalList & | intervals | ) |
Replaces the current list with the list belonging to given IntervalList object.
Definition at line 1148 of file MantidWSIndexDialog.cpp.
References getList(), and m_list.
Referenced by MantidQt::MantidWidgets::MantidWSIndexWidget::generateSpectraNumIntervals(), and MantidQt::MantidWidgets::MantidWSIndexWidget::generateWsIndexIntervals().
| QString MantidQt::MantidWidgets::IntervalList::toQString | ( | int | numOfIntervals = 6 | ) | const |
Convenience function that returns the contents of toStdString as a QString object.
Definition at line 1049 of file MantidWSIndexDialog.cpp.
References toStdString().
Referenced by MantidQt::MantidWidgets::MantidWSIndexWidget::initSpectraBox(), and MantidQt::MantidWidgets::MantidWSIndexWidget::initWorkspaceBox().
| std::string MantidQt::MantidWidgets::IntervalList::toStdString | ( | int | numOfIntervals = 6 | ) | const |
Returns a string that represents the IntervalList, of the form "0, 2-5, 8, 10-12".
String is cut short by default to 6 intervals.
Definition at line 1020 of file MantidWSIndexDialog.cpp.
References m_list.
Referenced by toQString().
| int MantidQt::MantidWidgets::IntervalList::totalIntervalLength | ( | ) | const |
Returns the combined length of all Intervals in the list.
Definition at line 1014 of file MantidWSIndexDialog.cpp.
References m_list.
Referenced by MantidQt::MantidWidgets::MantidWSIndexWidget::validatePlotOptions().
A list of all the Intervals in this IntervalList.
Definition at line 182 of file MantidWSIndexDialog.h.
Referenced by addInterval(), clear(), contains(), getIntSet(), getList(), IntervalList(), setIntervalList(), toStdString(), and totalIntervalLength().