Mantid
Loading...
Searching...
No Matches
qt
widgets
common
inc
MantidQtWidgets
Common
Batch
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>
14
namespace
MantidQt
{
15
namespace
MantidWidgets {
16
namespace
Batch {
17
18
using
QtTreeCursorNavigationResult
= std::pair<bool, QModelIndex>;
19
class
QtTreeCursorNavigation
{
20
public
:
21
QtTreeCursorNavigation
(QAbstractItemModel
const
*model);
22
QModelIndex
moveCursorPrevious
(QModelIndex
const
¤tIndex)
const
;
23
QtTreeCursorNavigationResult
moveCursorNext
(QModelIndex
const
¤tIndex)
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
37
private
:
38
QAbstractItemModel
const
*
m_model
;
39
QtTreeCursorNavigationResult
withoutAppendedRow
(QModelIndex
const
&
index
)
const
;
40
QtTreeCursorNavigationResult
withAppendedRow
(QModelIndex
const
&
index
)
const
;
41
};
42
}
// namespace Batch
43
}
// namespace MantidWidgets
44
}
// namespace MantidQt
index
std::map< DeltaEMode::Type, std::string > index
Definition:
DeltaEMode.cpp:19
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation
Definition:
QtTreeCursorNavigation.h:19
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::isNotLastCellOnThisRow
bool isNotLastCellOnThisRow(QModelIndex const &index) const
Definition:
QtTreeCursorNavigation.cpp:78
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::m_model
QAbstractItemModel const * m_model
Definition:
QtTreeCursorNavigation.h:38
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::lastCellInParentRowElseNone
QModelIndex lastCellInParentRowElseNone(QModelIndex const &index) const
Definition:
QtTreeCursorNavigation.cpp:64
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::isNotFirstRowInThisNode
bool isNotFirstRowInThisNode(QModelIndex const &index) const
Definition:
QtTreeCursorNavigation.cpp:48
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::nextCellOnThisRow
QModelIndex nextCellOnThisRow(QModelIndex const &index) const
Definition:
QtTreeCursorNavigation.cpp:76
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::moveCursorNext
QtTreeCursorNavigationResult moveCursorNext(QModelIndex const ¤tIndex) const
Definition:
QtTreeCursorNavigation.cpp:22
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::isNotFirstCellInThisRow
bool isNotFirstCellInThisRow(QModelIndex const &index) const
Definition:
QtTreeCursorNavigation.cpp:46
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::lastRowInThisNode
QModelIndex lastRowInThisNode(QModelIndex const &index) const
Definition:
QtTreeCursorNavigation.cpp:60
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::previousCellInThisRow
QModelIndex previousCellInThisRow(QModelIndex const &index) const
Definition:
QtTreeCursorNavigation.cpp:50
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::moveCursorPrevious
QModelIndex moveCursorPrevious(QModelIndex const ¤tIndex) const
Definition:
QtTreeCursorNavigation.cpp:34
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::isNotLastRowInThisNode
bool isNotLastRowInThisNode(QModelIndex const &index) const
Definition:
QtTreeCursorNavigation.cpp:80
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::withAppendedRow
QtTreeCursorNavigationResult withAppendedRow(QModelIndex const &index) const
Definition:
QtTreeCursorNavigation.cpp:18
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::withoutAppendedRow
QtTreeCursorNavigationResult withoutAppendedRow(QModelIndex const &index) const
Definition:
QtTreeCursorNavigation.cpp:14
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::firstCellOnNextRow
QModelIndex firstCellOnNextRow(QModelIndex const &rowAbove) const
Definition:
QtTreeCursorNavigation.cpp:72
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigation::lastCellInPreviousRow
QModelIndex lastCellInPreviousRow(QModelIndex const &index) const
Definition:
QtTreeCursorNavigation.cpp:52
MantidQt::MantidWidgets::Batch::QtTreeCursorNavigationResult
std::pair< bool, QModelIndex > QtTreeCursorNavigationResult
Definition:
QtTreeCursorNavigation.h:18
MantidQt
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...
Definition:
AddWorkspaceDialog.h:20
Generated on Tue Jan 3 2023 11:58:01 for Mantid by
1.9.5