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 <QFileDialog>
11#ifdef Q_OS_DARWIN
12#include <errno.h>
13#include <sys/sysctl.h>
14#endif
15
16namespace Mantid {
17namespace Kernel {
18class Property;
19}
20} // namespace Mantid
21
22namespace MantidQt {
23namespace API {
28namespace FileDialogHandler {
37DLLExport QString getSaveFileName(QWidget *parent = nullptr, const Mantid::Kernel::Property *baseProp = nullptr,
38 const QFileDialog::Options &options = QFileDialog::Options());
39
44DLLExport QString addExtension(const QString &filename, const QString &selectedFilter);
45
46DLLExport QString getFilter(const Mantid::Kernel::Property *baseProp);
47
53DLLExport QString getFilter(const std::vector<std::string> &exts);
54
60DLLExport QString formatExtension(const std::string &extension);
61
62DLLExport QString getCaption(const std::string &dialogName, const Mantid::Kernel::Property *prop);
63} // namespace FileDialogHandler
64} // namespace API
65} // namespace MantidQt
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
Definition: System.h:53
Base class for properties.
Definition: Property.h:94
DLLExport QString getCaption(const std::string &dialogName, const Mantid::Kernel::Property *prop)
DLLExport QString formatExtension(const std::string &extension)
Format extension into expected form (*.ext)
DLLExport QString addExtension(const QString &filename, const QString &selectedFilter)
For file dialogs.
DLLExport QString getFilter(const Mantid::Kernel::Property *baseProp)
DLLExport 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.