Mantid
Loading...
Searching...
No Matches
FileDialogHandler.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2009 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 "MantidKernel/DllConfig.h"
10#include "MantidQtWidgets/Common/DllOption.h"
11#include <QFileDialog>
12#ifdef Q_OS_DARWIN
13#include <errno.h>
14#include <sys/sysctl.h>
15#endif
16
17namespace Mantid {
18namespace Kernel {
19class Property;
20}
21} // namespace Mantid
22
23namespace MantidQt {
24namespace API {
29namespace FileDialogHandler {
38EXPORT_OPT_MANTIDQT_COMMON QString getSaveFileName(QWidget *parent = nullptr,
39 const Mantid::Kernel::Property *baseProp = nullptr,
40 const QFileDialog::Options &options = QFileDialog::Options());
41
46EXPORT_OPT_MANTIDQT_COMMON QString addExtension(const QString &filename, const QString &selectedFilter);
47
48EXPORT_OPT_MANTIDQT_COMMON QString getFilter(const Mantid::Kernel::Property *baseProp);
49
51EXPORT_OPT_MANTIDQT_COMMON QString getFilter(const std::vector<std::string> &exts);
52
54EXPORT_OPT_MANTIDQT_COMMON QString formatExtension(const std::string &extension);
55
56EXPORT_OPT_MANTIDQT_COMMON QString getCaption(const std::string &dialogName, const Mantid::Kernel::Property *prop);
57} // namespace FileDialogHandler
58} // namespace API
59} // namespace MantidQt
Base class for properties.
Definition Property.h:95
EXPORT_OPT_MANTIDQT_COMMON QString getCaption(const std::string &dialogName, const Mantid::Kernel::Property *prop)
EXPORT_OPT_MANTIDQT_COMMON QString formatExtension(const std::string &extension)
Format extension into expected form (*.ext)
EXPORT_OPT_MANTIDQT_COMMON QString addExtension(const QString &filename, const QString &selectedFilter)
For file dialogs.
EXPORT_OPT_MANTIDQT_COMMON QString getFilter(const Mantid::Kernel::Property *baseProp)
EXPORT_OPT_MANTIDQT_COMMON QString getSaveFileName(QWidget *parent=nullptr, const Mantid::Kernel::Property *baseProp=nullptr, const QFileDialog::Options &options=QFileDialog::Options())
Contains modifications to Qt functions where problems have been found on certain operating systems.
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...
Helper class which provides the Collimation Length for SANS instruments.