Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QDesignerDialogGuiInterface Class Referenceabstract

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

#include <abstractdialoggui_p.h>

+ Inheritance diagram for QDesignerDialogGuiInterface:
+ Collaboration diagram for QDesignerDialogGuiInterface:

Public Types

enum  Message {
  FormLoadFailureMessage , UiVersionMismatchMessage , ResourceLoadFailureMessage , TopLevelSpacerMessage ,
  PropertyEditorMessage , SignalSlotEditorMessage , FormEditorMessage , PreviewFailureMessage ,
  PromotionErrorMessage , ResourceEditorMessage , ScriptDialogMessage , SignalSlotDialogMessage ,
  OtherMessage , FileChangedMessage
}
 This enum specifies the context from within the message box is called. More...
 

Public Member Functions

 QDesignerDialogGuiInterface ()
 Constructs a QDesignerDialogGuiInterface object.
 
virtual ~QDesignerDialogGuiInterface ()
 Destroys the QDesignerDialogGuiInterface object.
 
virtual QMessageBox::StandardButton message (QWidget *parent, Message context, QMessageBox::Icon icon, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=QMessageBox::Ok, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton)=0
 Opens a message box as child of parent within the context context, using icon, title, text, buttons and defaultButton and returns the button chosen by the user.
 
virtual QMessageBox::StandardButton message (QWidget *parent, Message context, QMessageBox::Icon icon, const QString &title, const QString &text, const QString &informativeText, QMessageBox::StandardButtons buttons=QMessageBox::Ok, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton)=0
 
virtual QMessageBox::StandardButton message (QWidget *parent, Message context, QMessageBox::Icon icon, const QString &title, const QString &text, const QString &informativeText, const QString &detailedText, QMessageBox::StandardButtons buttons=QMessageBox::Ok, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton)=0
 
virtual QString getExistingDirectory (QWidget *parent=nullptr, const QString &caption=QString(), const QString &dir=QString(), QFileDialog::Options options=QFileDialog::ShowDirsOnly)=0
 Opens a file dialog as child of parent using the parameters caption, dir and options that prompts the user for an existing directory.
 
virtual QString getOpenFileName (QWidget *parent=nullptr, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=nullptr, QFileDialog::Options options={})=0
 Opens a file dialog as child of parent using the parameters caption, dir, filter, selectedFilter and options that prompts the user for an existing file.
 
virtual QString 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.
 
virtual QStringList getOpenFileNames (QWidget *parent=nullptr, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=nullptr, QFileDialog::Options options={})=0
 Opens a file dialog as child of parent using the parameters caption, dir, filter, selectedFilter and options that prompts the user for a set of existing files.
 
virtual QStringList 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.
 
virtual QString getSaveFileName (QWidget *parent=nullptr, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=nullptr, QFileDialog::Options options={})=0
 Opens a file dialog as child of parent using the parameters caption, dir, filter, selectedFilter and options that prompts the user for a file.
 

Detailed Description

The QDesignerDialogGuiInterface allows integrations of \QD to replace the message boxes displayed by \QD by custom dialogs.

Since
4.4

\inmodule QtDesigner

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

See also
QMessageBox, QFileDialog

Definition at line 26 of file abstractdialoggui_p.h.

Member Enumeration Documentation

◆ Message

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

\value FormLoadFailureMessage Loading of a form failed \value UiVersionMismatchMessage Attempt to load a file created with an old version of Designer \value ResourceLoadFailureMessage Resources specified in a file could not be found \value TopLevelSpacerMessage Spacer items detected on a container without layout \value PropertyEditorMessage Messages of the propert yeditor \value SignalSlotEditorMessage Messages of the signal / slot editor \value FormEditorMessage Messages of the form editor \value PreviewFailureMessage A preview could not be created \value PromotionErrorMessage Messages related to promotion of a widget \value ResourceEditorMessage Messages of the resource editor \value ScriptDialogMessage Messages of the script dialog \value SignalSlotDialogMessage Messages of the signal slot dialog \value OtherMessage Unspecified context

Enumerator
FormLoadFailureMessage 
UiVersionMismatchMessage 
ResourceLoadFailureMessage 
TopLevelSpacerMessage 
PropertyEditorMessage 
SignalSlotEditorMessage 
FormEditorMessage 
PreviewFailureMessage 
PromotionErrorMessage 
ResourceEditorMessage 
ScriptDialogMessage 
SignalSlotDialogMessage 
OtherMessage 
FileChangedMessage 

Definition at line 34 of file abstractdialoggui_p.h.

Constructor & Destructor Documentation

◆ QDesignerDialogGuiInterface()

QDesignerDialogGuiInterface::QDesignerDialogGuiInterface ( )
default

Constructs a QDesignerDialogGuiInterface object.

◆ ~QDesignerDialogGuiInterface()

QDesignerDialogGuiInterface::~QDesignerDialogGuiInterface ( )
virtualdefault

Destroys the QDesignerDialogGuiInterface object.

Member Function Documentation

◆ getExistingDirectory()

virtual QString QDesignerDialogGuiInterface::getExistingDirectory ( QWidget * parent = nullptr,
const QString & caption = QString(),
const QString & dir = QString(),
QFileDialog::Options options = QFileDialog::ShowDirsOnly )
pure virtual

Opens a file dialog as child of parent using the parameters caption, dir and options that prompts the user for an existing directory.

Returns a directory selected by the user.

Implemented in qdesigner_internal::DialogGui.

◆ getOpenFileName()

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

Opens a file dialog 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.

Implemented in qdesigner_internal::DialogGui.

◆ getOpenFileNames()

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

Opens a file dialog 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.

Implemented in qdesigner_internal::DialogGui.

◆ getOpenImageFileName()

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

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.

Since
4.5

Reimplemented in qdesigner_internal::DialogGui.

Definition at line 92 of file abstractdialoggui.cpp.

◆ getOpenImageFileNames()

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

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.

Since
4.5

Reimplemented in qdesigner_internal::DialogGui.

Definition at line 107 of file abstractdialoggui.cpp.

◆ getSaveFileName()

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

Opens a file dialog as child of parent using the parameters caption, dir, filter, selectedFilter and options that prompts the user for a file.

Returns a file selected by the user. The file does not have to exist.

Implemented in qdesigner_internal::DialogGui.

◆ message() [1/3]

virtual QMessageBox::StandardButton QDesignerDialogGuiInterface::message ( QWidget * parent,
Message context,
QMessageBox::Icon icon,
const QString & title,
const QString & text,
const QString & informativeText,
const QString & detailedText,
QMessageBox::StandardButtons buttons = QMessageBox::Ok,
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton )
pure virtual

Implemented in qdesigner_internal::DialogGui.

Referenced by PRESUBMIT_test_mocks.MockOutputApi.PresubmitResult::__repr__().

+ Here is the caller graph for this function:

◆ message() [2/3]

virtual QMessageBox::StandardButton QDesignerDialogGuiInterface::message ( QWidget * parent,
Message context,
QMessageBox::Icon icon,
const QString & title,
const QString & text,
const QString & informativeText,
QMessageBox::StandardButtons buttons = QMessageBox::Ok,
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton )
pure virtual

Implemented in qdesigner_internal::DialogGui.

Referenced by PRESUBMIT_test_mocks.MockOutputApi.PresubmitResult::__repr__().

+ Here is the caller graph for this function:

◆ message() [3/3]

virtual QMessageBox::StandardButton QDesignerDialogGuiInterface::message ( QWidget * parent,
Message context,
QMessageBox::Icon icon,
const QString & title,
const QString & text,
QMessageBox::StandardButtons buttons = QMessageBox::Ok,
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton )
pure virtual

Opens a message box as child of parent within the context context, using icon, title, text, buttons and defaultButton and returns the button chosen by the user.

Implemented in qdesigner_internal::DialogGui.

Referenced by PRESUBMIT_test_mocks.MockOutputApi.PresubmitResult::__repr__().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: