QDesignerDialogGuiInterface Class

The QDesignerDialogGuiInterface allows integrations of Qt Designer to replace the message boxes displayed by Qt Designer by custom dialogs. More...

Header: #include <QDesignerDialogGuiInterface>

Public Types

enum Message { FormLoadFailureMessage, UiVersionMismatchMessage, ResourceLoadFailureMessage, TopLevelSpacerMessage, PropertyEditorMessage, …, OtherMessage }

Public Functions

QDesignerDialogGuiInterface()
virtual ~QDesignerDialogGuiInterface()
virtual QString getOpenImageFileName(QWidget *parent = nullptr, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = nullptr, QFileDialog::Options options = {})
virtual QStringList getOpenImageFileNames(QWidget *parent = nullptr, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = nullptr, QFileDialog::Options options = {})

Detailed Description

\since4.4 \internal

\inmoduleQtDesigner

QDesignerDialogGuiInterface provides virtual functions that can be overwritten to display message boxes and file dialogs.

See also QMessageBox and QFileDialog.

Member Type Documentation

enum QDesignerDialogGuiInterface::Message

This enum specifies the context from within the message box is called.

ConstantValueDescription
QDesignerDialogGuiInterface::FormLoadFailureMessage0Loading of a form failed
QDesignerDialogGuiInterface::UiVersionMismatchMessage1Attempt to load a file created with an old version of Designer
QDesignerDialogGuiInterface::ResourceLoadFailureMessage2Resources specified in a file could not be found
QDesignerDialogGuiInterface::TopLevelSpacerMessage3Spacer items detected on a container without layout
QDesignerDialogGuiInterface::PropertyEditorMessage4Messages of the propert yeditor
QDesignerDialogGuiInterface::SignalSlotEditorMessage5Messages of the signal / slot editor
QDesignerDialogGuiInterface::FormEditorMessage6Messages of the form editor
QDesignerDialogGuiInterface::PreviewFailureMessage7A preview could not be created
QDesignerDialogGuiInterface::PromotionErrorMessage8Messages related to promotion of a widget
QDesignerDialogGuiInterface::ResourceEditorMessage9Messages of the resource editor
QDesignerDialogGuiInterface::ScriptDialogMessage10Messages of the script dialog
QDesignerDialogGuiInterface::SignalSlotDialogMessage11Messages of the signal slot dialog
QDesignerDialogGuiInterface::OtherMessage12Unspecified context

Member Function Documentation

QDesignerDialogGuiInterface::QDesignerDialogGuiInterface()

Constructs a QDesignerDialogGuiInterface object.

[virtual noexcept] QDesignerDialogGuiInterface::~QDesignerDialogGuiInterface()

Destroys the QDesignerDialogGuiInterface object.

[virtual] QString QDesignerDialogGuiInterface::getOpenImageFileName(QWidget *parent = nullptr, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = nullptr, QFileDialog::Options options = {})

Opens a file dialog with image browsing capabilities as child of parent using the parameters caption, dir, filter, selectedFilter and options that prompts the user for an existing file. Returns a file selected by the user.

The default implementation simply calls getOpenFileName(). On platforms that do not support an image preview in the QFileDialog, the function can be reimplemented to provide an image browser.

\since4.5

[virtual] QStringList QDesignerDialogGuiInterface::getOpenImageFileNames(QWidget *parent = nullptr, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = nullptr, QFileDialog::Options options = {})

Opens a file dialog with image browsing capabilities as child of parent using the parameters caption, dir, filter, selectedFilter and options that prompts the user for a set of existing files. Returns one or more existing files selected by the user.

The default implementation simply calls getOpenFileNames(). On platforms that do not support an image preview in the QFileDialog, the function can be reimplemented to provide an image browser.

\since4.5