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
47class LoadDialog final : public API::AlgorithmDialog {
48 Q_OBJECT
49
50public:
52 LoadDialog(QWidget *parent = nullptr);
53
54private slots:
59 void helpClicked() override;
61 void suggestWSName();
64 void enableNameSuggestion(const bool on = false);
66 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);
83
84private:
86 Ui::LoadDialog m_form;
95};
96} // namespace CustomDialogs
97} // namespace MantidQt
This class should be the basis for all customised algorithm dialogs.
This class gives specialised dialog for the Load algorithm.
Definition LoadDialog.h:47
void tieStaticWidgets(const bool readHistory)
Tie static widgets to their properties.
void resultInspectionFinished()
Accept the load dialog when user input is inspected and is valid.
void saveInput() override
Save the input history.
int m_initialHeight
The initial height.
Definition LoadDialog.h:90
int createWidgetsForProperty(const Mantid::Kernel::Property *prop, QVBoxLayout *propertyLayout, QWidget *parent)
Create the widgets for a given property.
void helpClicked() override
Override the help button clicked method.
void enableNameSuggestion(const bool on=false)
Connect/Disconnect the signal that updates the workspace name with a suggested value.
void accept() override
Override accept() slot.
bool m_userAccept
Flag to indicate the user accepted the load dialog.
Definition LoadDialog.h:94
void suggestWSName()
Suggest a workspace name from the file.
void initLayout() override
Initialize the layout.
bool m_populating
Flag to indicating if we are populating the dialog.
Definition LoadDialog.h:92
void createDynamicWidgets()
Create the widgets and layouts that are dynamic, i.e they depend on the specific load algorithm.
void removeOldInputWidgets(QVBoxLayout *layout)
Clears all of the widgets from the old layout.
QString m_currentFiles
The current file.
Definition LoadDialog.h:88
Base class for properties.
Definition Property.h:94
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...