AvogadroLibs 1.97.0
|
#include <fileformatdialog.h>
Public Types | |
typedef QPair< const Io::FileFormat *, QString > | FormatFilePair |
Static Public Member Functions | |
static FormatFilePair | fileToRead (QWidget *parent, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString()) |
Show a QFileDialog to prompt the user for a file to open and resolve any file format conflicts. This method returns the selected file and FileFormat reader. More... | |
static FormatFilePair | fileToWrite (QWidget *parent, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString()) |
Show a QFileDialog to prompt the user for a file to save and resolve any file format conflicts. This method returns the selected file and FileFormat writer. More... | |
static const Io::FileFormat * | findFileFormat (QWidget *parentWidget, const QString &caption, const QString &fileName, const Io::FileFormat::Operations formatFlags, const QString &formatPrefix=QString()) |
enum | FilterStringOption { NoFilterStringOption = 0x0 , AllFormats = 0x1 , AllFiles = 0x2 , WriteFormats = 0x4 } |
<avogadro/qtgui/fileformatdialog.h>
Allow users to select save/open filenames that can be handled by registered FileFormats.
typedef QPair<const Io::FileFormat*, QString> FormatFilePair |
Container for a filename and a compatible file format, used as return values in static functions.
enum FilterStringOption |
Used internally by readFileFilter() and writeFileFilter().
|
static |
parent | The parent of the dialog windows. |
caption | The dialog window titles. |
dir | The initial directory shown to the user. |
filter | A list of filters for limiting the files shown to the user. See the QFileDialog documentation for format. If the string is empty, a default list of all suitable registered formats will be used. |
|
static |
parent | The parent of the dialog windows. |
caption | The dialog window titles. |
dir | The initial directory shown to the user. |
filter | A list of filters for limiting the files shown to the user. See the QFileDialog documentation for format. If the string is empty, a default list of all suitable registered formats will be used. |
|
static |
Given a filename and a set of Io::FileFormat::Operation flags, find a suitable file format from the FileFormatManager. If multiple readers are found, ask the user to select one. If no suitable format is found, return nullptr.
parentWidget | Parent for any dialog windows that will appear. |
caption | Window title for any dialog windows. |
fileName | Filename to use when searching for a format. Formats are chosen based on the file extension. |
formatFlags | Operations that the format must support. Most likely (Io::FileFormat::)Read | File or Write | File. |
formatPrefix | Filter on the supplied prefix (default to none). |