Mantid
Loading...
Searching...
No Matches
QtTreeCursorNavigation.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
11#pragma once
12#include <QModelIndex>
13#include <utility>
14namespace MantidQt {
15namespace MantidWidgets {
16namespace Batch {
17
18using QtTreeCursorNavigationResult = std::pair<bool, QModelIndex>;
20public:
21 QtTreeCursorNavigation(QAbstractItemModel const *model);
22 QModelIndex moveCursorPrevious(QModelIndex const &currentIndex) const;
23 QtTreeCursorNavigationResult moveCursorNext(QModelIndex const &currentIndex) const;
24
25 QModelIndex previousCellInThisRow(QModelIndex const &index) const;
26 QModelIndex lastCellInPreviousRow(QModelIndex const &index) const;
27 QModelIndex lastCellInParentRowElseNone(QModelIndex const &index) const;
28 QModelIndex firstCellOnNextRow(QModelIndex const &rowAbove) const;
29 QModelIndex nextCellOnThisRow(QModelIndex const &index) const;
30 QModelIndex lastRowInThisNode(QModelIndex const &index) const;
31
32 bool isNotLastCellOnThisRow(QModelIndex const &index) const;
33 bool isNotLastRowInThisNode(QModelIndex const &index) const;
34 bool isNotFirstCellInThisRow(QModelIndex const &index) const;
35 bool isNotFirstRowInThisNode(QModelIndex const &index) const;
36
37private:
38 QAbstractItemModel const *m_model;
40 QtTreeCursorNavigationResult withAppendedRow(QModelIndex const &index) const;
41};
42} // namespace Batch
43} // namespace MantidWidgets
44} // namespace MantidQt
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
QModelIndex lastCellInParentRowElseNone(QModelIndex const &index) const
bool isNotFirstRowInThisNode(QModelIndex const &index) const
QModelIndex nextCellOnThisRow(QModelIndex const &index) const
QtTreeCursorNavigationResult moveCursorNext(QModelIndex const &currentIndex) const
bool isNotFirstCellInThisRow(QModelIndex const &index) const
QModelIndex lastRowInThisNode(QModelIndex const &index) const
QModelIndex previousCellInThisRow(QModelIndex const &index) const
QModelIndex moveCursorPrevious(QModelIndex const &currentIndex) const
QtTreeCursorNavigationResult withAppendedRow(QModelIndex const &index) const
QtTreeCursorNavigationResult withoutAppendedRow(QModelIndex const &index) const
QModelIndex firstCellOnNextRow(QModelIndex const &rowAbove) const
QModelIndex lastCellInPreviousRow(QModelIndex const &index) const
std::pair< bool, QModelIndex > QtTreeCursorNavigationResult
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...