Mantid
Loading...
Searching...
No Matches
MantidTreeWidget.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
8
13
14#include <QTreeWidget>
15#include <memory>
16
17namespace MantidQt {
18namespace MantidWidgets {
19class MantidDisplayBase;
20class WorkspaceTreeWidget;
21
23
24class EXPORT_OPT_MANTIDQT_COMMON MantidTreeWidget : public QTreeWidget {
25 Q_OBJECT
26
27public:
28 MantidTreeWidget(MantidDisplayBase *mui, QWidget *parent = nullptr);
29 void mousePressEvent(QMouseEvent *e) override;
30 void mouseMoveEvent(QMouseEvent *e) override;
31 void mouseDoubleClickEvent(QMouseEvent *e) override;
32
33 QStringList getSelectedWorkspaceNames() const;
34 MantidWSIndexWidget::UserInput chooseSpectrumFromSelected(bool showWaterfallOpt = true, bool showPlotAll = true,
35 bool showTiledOpt = true, bool isAdvanced = false) const;
36 void setSortScheme(MantidItemSortScheme /*sortScheme*/);
37 void setSortOrder(Qt::SortOrder /*sortOrder*/);
38 MantidItemSortScheme getSortScheme() const;
39 Qt::SortOrder getSortOrder() const;
40 void logWarningMessage(const std::string & /*msg*/);
41 void disableNodes(bool);
42 void sort();
43 void dropEvent(QDropEvent *de) override;
44 QList<std::shared_ptr<const Mantid::API::MatrixWorkspace>> getSelectedMatrixWorkspaces() const;
45
47 std::function<void(QString)> m_doubleClickAction = nullptr;
48
49protected:
50 void dragMoveEvent(QDragMoveEvent *de) override;
51 void dragEnterEvent(QDragEnterEvent *de) override;
52
53private:
58 Qt::SortOrder m_sortOrder;
59};
60} // namespace MantidWidgets
61} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition: DllOption.h:15
Mantid::API::AnalysisDataServiceImpl & m_ads
The Analysis data service stores instances of the Workspace objects and anything that derives from te...
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...