Mantid
Loading...
Searching...
No Matches
FilenameDialogEditor.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 "MantidQtWidgets/Common/QtPropertyBrowser/StringDialogEditor.h"
10
11namespace MantidQt {
12namespace MantidWidgets {
13
17class FilenameDialogEditor : public StringDialogEditor {
18 Q_OBJECT
19public:
20 FilenameDialogEditor(QtProperty *property, QWidget *parent) : StringDialogEditor(property, parent) {}
21protected slots:
22 void runDialog() override;
23};
24
28class FilenameDialogEditorFactory : public StringDialogEditorFactory {
29 Q_OBJECT
30public:
31 FilenameDialogEditorFactory(QObject *parent) : StringDialogEditorFactory(parent) {}
32
33protected:
34 using QtAbstractEditorFactoryBase::createEditor; // Avoid Intel compiler
35 // warning
36 QWidget *createEditorForManager(QtStringPropertyManager *manager, QtProperty *property, QWidget *parent) override {
37 (void)manager; // Avoid unused warning
38 return new FilenameDialogEditor(property, parent);
39 }
40};
41} // namespace MantidWidgets
42} // namespace MantidQt
The factory for the FilenameDialogEditor.
QWidget * createEditorForManager(QtStringPropertyManager *manager, QtProperty *property, QWidget *parent) override
A stringDialogEditor for editing file names.
FilenameDialogEditor(QtProperty *property, QWidget *parent)
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...