Mantid
Loading...
Searching...
No Matches
LoadDialog.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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//------------------------------------------------------------------------------
10// Includes
11//------------------------------------------------------------------------------
13#include "ui_LoadDialog.h"
14
15//------------------------------------------------------------------------------
16// Qt Forward declarations
17//------------------------------------------------------------------------------
18class QVBoxLayout;
19
20namespace MantidQt {
21//------------------------------------------------------------------------------
22// Mantid Forward declarations
23//------------------------------------------------------------------------------
24namespace API {
25class FileFinderWidget;
26}
27
28namespace CustomDialogs {
29
46class PreventLoadRequests;
47
48class LoadDialog final : public API::AlgorithmDialog {
49 Q_OBJECT
51
52public:
54 LoadDialog(QWidget *parent = nullptr);
55
56private slots:
61 void helpClicked() override;
63 void suggestWSName();
66 void enableNameSuggestion(const bool on = false);
68 void accept() override;
69
70private:
72 void initLayout() override;
74 void saveInput() override;
76 void tieStaticWidgets(const bool readHistory);
78 void removeOldInputWidgets(QVBoxLayout *layout);
82 int createWidgetsForProperty(const Mantid::Kernel::Property *prop, QVBoxLayout *propertyLayout, QWidget *parent);
86 void enableLoadRequests();
87
88private:
90 Ui::LoadDialog m_form;
97};
98} // namespace CustomDialogs
99} // namespace MantidQt
This class should be the basis for all customised algorithm dialogs.
void tieStaticWidgets(const bool readHistory)
Tie static widgets to their properties.
Definition: LoadDialog.cpp:205
void saveInput() override
Save the input history.
Definition: LoadDialog.cpp:194
int m_initialHeight
The initial height.
Definition: LoadDialog.h:94
int createWidgetsForProperty(const Mantid::Kernel::Property *prop, QVBoxLayout *propertyLayout, QWidget *parent)
Create the widgets for a given property.
Definition: LoadDialog.cpp:314
void helpClicked() override
Override the help button clicked method.
Definition: LoadDialog.cpp:86
void enableNameSuggestion(const bool on=false)
Connect/Disconnect the signal that updates the workspace name with a suggested value.
Definition: LoadDialog.cpp:117
void accept() override
Override accept() slot.
Definition: LoadDialog.cpp:132
void suggestWSName()
Suggest a workspace name from the file.
Definition: LoadDialog.cpp:97
void initLayout() override
Initialize the layout.
Definition: LoadDialog.cpp:159
bool m_populating
Flag to indicating if we are populating the dialog.
Definition: LoadDialog.h:96
void enableLoadRequests()
Accept requests to load until they are disabled.
Definition: LoadDialog.cpp:125
void createDynamicWidgets()
Create the widgets and layouts that are dynamic, i.e they depend on the specific load algorithm.
Definition: LoadDialog.cpp:77
void removeOldInputWidgets(QVBoxLayout *layout)
Clears all of the widgets from the old layout.
Definition: LoadDialog.cpp:221
void disableLoadRequests()
Ignore requests to load until they are re-enabled.
Definition: LoadDialog.cpp:127
QString m_currentFiles
The current file.
Definition: LoadDialog.h:92
Base class for properties.
Definition: Property.h:94
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...