Mantid
Loading...
Searching...
No Matches
AddWorkspaceMultiDialog.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
9#include "DllOption.h"
11#include "QtJobRunner.h"
12#include "ui_AddWorkspaceMultiDialog.h"
13
14#include <vector>
15
17#include <QDialog>
18
19namespace MantidQt {
20namespace MantidWidgets {
21
25 Q_OBJECT
26public:
27 explicit AddWorkspaceMultiDialog(QWidget *parent);
28
29 std::string workspaceName() const override;
30 StringPairVec selectedNameIndexPairs() const;
31
32 bool isEmpty() const;
33 void setWSSuffices(const QStringList &suffices) override;
34 void setFBSuffices(const QStringList &suffices) override;
35 void setLoadProperty(const std::string &propname, bool enable) override;
36 void setup();
37
38 void notifyBatchComplete(bool error) override;
39 void notifyBatchCancelled() override {};
40 void notifyAlgorithmStarted(API::IConfiguredAlgorithm_sptr &algorithm) override { UNUSED_ARG(algorithm); };
41 void notifyAlgorithmComplete(API::IConfiguredAlgorithm_sptr &algorithm) override { UNUSED_ARG(algorithm); };
42 void notifyAlgorithmError(API::IConfiguredAlgorithm_sptr &algorithm, std::string const &message) override;
43
44signals:
46
47private slots:
48 void updateSelectedSpectra() override;
49 void selectAllSpectra();
50 void unifyRange();
51 void handleFilesFound();
52 void emitAddData();
53
54private:
55 void updateAddButtonState(bool enabled) const;
56 Ui::AddWorkspaceMultiDialog m_uiForm;
58 std::unique_ptr<MantidQt::API::QtJobRunner> m_algRunner;
60};
61
62} // namespace MantidWidgets
63} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition DllOption.h:15
double error
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
Definition System.h:48
std::vector< std::pair< std::string, std::string > > StringPairVec
JobRunnerSubscriber is an interface to a class that subscribes to notifications from an IJobRunner.
Definition IJobRunner.h:24
void addData(MantidWidgets::IAddWorkspaceDialog *dialog)
void notifyAlgorithmComplete(API::IConfiguredAlgorithm_sptr &algorithm) override
std::unique_ptr< MantidQt::API::QtJobRunner > m_algRunner
Algorithm Runner used to run the load algorithm.
void notifyAlgorithmStarted(API::IConfiguredAlgorithm_sptr &algorithm) override
std::shared_ptr< IConfiguredAlgorithm > IConfiguredAlgorithm_sptr
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...