Mantid
Loading...
Searching...
No Matches
IJobTreeView.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 +
7#pragma once
16#include <boost/optional.hpp>
17
18namespace MantidQt {
19namespace MantidWidgets {
20namespace Batch {
21
23public:
24 virtual void notifyCellTextChanged(RowLocation const &itemIndex, int column, std::string const &oldValue,
25 std::string const &newValue) = 0;
26 virtual void notifySelectionChanged() = 0;
27 virtual void notifyRowInserted(RowLocation const &newRowLocation) = 0;
31 virtual void notifyRemoveRowsRequested(std::vector<RowLocation> const &locationsOfRowsToRemove) = 0;
32 virtual void notifyCutRowsRequested() = 0;
33 virtual void notifyCopyRowsRequested() = 0;
34 virtual void notifyPasteRowsRequested() = 0;
35 virtual void notifyFilterReset() = 0;
36 virtual ~JobTreeViewSubscriber() = default;
37};
38
40public:
41 virtual void filterRowsBy(std::unique_ptr<RowPredicate> predicate) = 0;
42 virtual void filterRowsBy(RowPredicate *predicate) = 0;
43 virtual void resetFilter() = 0;
44 virtual bool hasFilter() const = 0;
45
46 virtual void setHintsForColumn(int column, std::unique_ptr<HintStrategy> hintStrategy) = 0;
47 virtual void setHintsForColumn(int column, HintStrategy *hintStrategy) = 0;
48
49 virtual void subscribe(JobTreeViewSubscriber *subscriber) = 0;
50
51 virtual RowLocation insertChildRowOf(RowLocation const &parent, int beforeRow, std::vector<Cell> const &rowText) = 0;
52 virtual RowLocation insertChildRowOf(RowLocation const &parent, int beforeRow) = 0;
53 virtual RowLocation appendChildRowOf(RowLocation const &parent) = 0;
54 virtual RowLocation appendChildRowOf(RowLocation const &parentLocation, std::vector<Cell> const &rowText) = 0;
55 virtual void appendAndEditAtChildRow() = 0;
56 virtual void appendAndEditAtRowBelow() = 0;
57 virtual void editAtRowAbove() = 0;
58
59 virtual void removeRowAt(RowLocation const &location) = 0;
60 virtual void removeRows(std::vector<RowLocation> rowsToRemove) = 0;
61 virtual void removeAllRows() = 0;
62
63 virtual bool isOnlyChildOfRoot(RowLocation const &location) const = 0;
64
65 virtual void replaceRows(std::vector<RowLocation> replacementPoints, std::vector<Subtree> replacements) = 0;
66
67 virtual void appendSubtreesAt(RowLocation const &parent, std::vector<Subtree> subtrees) = 0;
68 virtual void appendSubtreeAt(RowLocation const &parent, Subtree const &subtree) = 0;
69
70 virtual void replaceSubtreeAt(RowLocation const &rootToRemove, Subtree const &toInsert) = 0;
71 virtual void insertSubtreeAt(RowLocation const &parent, int index, Subtree const &subtree) = 0;
72
73 virtual std::vector<Cell> cellsAt(RowLocation const &location) const = 0;
74 virtual void setCellsAt(RowLocation const &location, std::vector<Cell> const &rowText) = 0;
75
76 virtual Cell cellAt(RowLocation location, int column) const = 0;
77 virtual void setCellAt(RowLocation location, int column, Cell const &cellText) = 0;
78
79 virtual void clearSelection() = 0;
80 virtual void expandAll() = 0;
81 virtual void collapseAll() = 0;
82
83 virtual std::vector<RowLocation> selectedRowLocations() const = 0;
84 virtual boost::optional<std::vector<Subtree>> selectedSubtrees() const = 0;
85 virtual boost::optional<std::vector<RowLocation>> selectedSubtreeRoots() const = 0;
86 virtual int currentColumn() const = 0;
87 virtual Cell deadCell() const = 0;
88 virtual ~IJobTreeView() = default;
89};
90} // namespace Batch
91} // namespace MantidWidgets
92} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition: DllOption.h:15
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
virtual std::vector< RowLocation > selectedRowLocations() const =0
virtual void appendSubtreesAt(RowLocation const &parent, std::vector< Subtree > subtrees)=0
virtual bool isOnlyChildOfRoot(RowLocation const &location) const =0
virtual boost::optional< std::vector< RowLocation > > selectedSubtreeRoots() const =0
virtual RowLocation appendChildRowOf(RowLocation const &parentLocation, std::vector< Cell > const &rowText)=0
virtual void setHintsForColumn(int column, std::unique_ptr< HintStrategy > hintStrategy)=0
virtual void removeRows(std::vector< RowLocation > rowsToRemove)=0
virtual RowLocation insertChildRowOf(RowLocation const &parent, int beforeRow, std::vector< Cell > const &rowText)=0
virtual void appendSubtreeAt(RowLocation const &parent, Subtree const &subtree)=0
virtual RowLocation insertChildRowOf(RowLocation const &parent, int beforeRow)=0
virtual void setCellsAt(RowLocation const &location, std::vector< Cell > const &rowText)=0
virtual void setCellAt(RowLocation location, int column, Cell const &cellText)=0
virtual void insertSubtreeAt(RowLocation const &parent, int index, Subtree const &subtree)=0
virtual void replaceSubtreeAt(RowLocation const &rootToRemove, Subtree const &toInsert)=0
virtual Cell cellAt(RowLocation location, int column) const =0
virtual void filterRowsBy(std::unique_ptr< RowPredicate > predicate)=0
virtual void removeRowAt(RowLocation const &location)=0
virtual RowLocation appendChildRowOf(RowLocation const &parent)=0
virtual void setHintsForColumn(int column, HintStrategy *hintStrategy)=0
virtual boost::optional< std::vector< Subtree > > selectedSubtrees() const =0
virtual std::vector< Cell > cellsAt(RowLocation const &location) const =0
virtual void filterRowsBy(RowPredicate *predicate)=0
virtual void replaceRows(std::vector< RowLocation > replacementPoints, std::vector< Subtree > replacements)=0
virtual void subscribe(JobTreeViewSubscriber *subscriber)=0
virtual void notifyRowInserted(RowLocation const &newRowLocation)=0
virtual void notifyRemoveRowsRequested(std::vector< RowLocation > const &locationsOfRowsToRemove)=0
virtual void notifyCellTextChanged(RowLocation const &itemIndex, int column, std::string const &oldValue, std::string const &newValue)=0
HintStrategy : Provides an interface for generating hints to be used by a HintingLineEdit.
Definition: HintStrategy.h:19
std::vector< Row > Subtree
Definition: Subtree.h:18
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...