[][src]Struct qt_widgets::QFontDialog

#[repr(C)]
pub struct QFontDialog { /* fields omitted */ }

The QFontDialog class provides a dialog widget for selecting a font.

C++ class: QFontDialog.

C++ documentation:

The QFontDialog class provides a dialog widget for selecting a font.

A font dialog is created through one of the static getFont() functions.

Examples:

bool ok; QFont font = QFontDialog::getFont( &ok, QFont("Helvetica [Cronyx]", 10), this); if (ok) { // the user clicked OK and font is set to the font the user selected } else { // the user canceled the dialog; font is set to the initial // value, in this case Helvetica [Cronyx], 10 }

The dialog can also be used to set a widget's font directly:

myWidget.setFont(QFontDialog::getFont(0, myWidget.font()));

If the user clicks OK the font they chose will be used for myWidget, and if they click Cancel the original font is used.

A font dialog in the Fusion widget style.

Methods

impl QFontDialog[src]

pub fn current_font_changed(&self) -> Signal<(*const QFont,)>[src]

This signal is emitted when the current font is changed. The new font is specified in font.

Returns a built-in Qt signal QFontDialog::currentFontChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the current font is changed. The new font is specified in font.

The signal is emitted while a user is selecting a font. Ultimately, the chosen font may differ from the font currently selected.

This function was introduced in Qt 4.5.

Note: Notifier signal for property currentFont.

See also currentFont, fontSelected(), and selectedFont().

pub fn font_selected(&self) -> Signal<(*const QFont,)>[src]

This signal is emitted when a font has been selected. The selected font is specified in font.

Returns a built-in Qt signal QFontDialog::fontSelected that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when a font has been selected. The selected font is specified in font.

The signal is only emitted when a user has chosen the final font to be used. It is not emitted while the user is changing the current font in the font dialog.

This function was introduced in Qt 4.5.

See also selectedFont(), currentFontChanged(), and currentFont.

pub unsafe fn current_font(&self) -> CppBox<QFont>[src]

This property holds the current font of the dialog.

Calls C++ function: QFont QFontDialog::currentFont() const.

C++ documentation:

This property holds the current font of the dialog.

This property was introduced in Qt 4.5.

Access functions:

QFont currentFont() const
void setCurrentFont(const QFont &font)

Notifier signal:

void currentFontChanged(const QFont &font)

pub unsafe fn get_font_bool_q_widget(
    ok: impl CastInto<MutPtr<bool>>,
    parent: impl CastInto<MutPtr<QWidget>>
) -> CppBox<QFont>
[src]

This is an overloaded function.

Calls C++ function: static QFont QFontDialog::getFont(bool* ok, QWidget* parent = …).

C++ documentation:

This is an overloaded function.

Executes a modal font dialog and returns a font.

If the user clicks OK, the selected font is returned. If the user clicks Cancel, the Qt default font is returned.

The dialog is constructed with the given parent. If the ok parameter is not-null, the value it refers to is set to true if the user clicks OK, and false if the user clicks Cancel.

Example:

bool ok; QFont font = QFontDialog::getFont(&ok, this); if (ok) { // font is set to the font the user selected } else { // the user canceled the dialog; font is set to the default // application font, QApplication::font() }

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFontDialog constructors.

pub unsafe fn get_font_bool_q_font_q_widget_q_string_q_flags_font_dialog_option(
    ok: impl CastInto<MutPtr<bool>>,
    initial: impl CastInto<Ref<QFont>>,
    parent: impl CastInto<MutPtr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    options: QFlags<FontDialogOption>
) -> CppBox<QFont>
[src]

Executes a modal font dialog and returns a font.

Calls C++ function: static QFont QFontDialog::getFont(bool* ok, const QFont& initial, QWidget* parent = …, const QString& title = …, QFlags<QFontDialog::FontDialogOption> options = …).

C++ documentation:

Executes a modal font dialog and returns a font.

If the user clicks OK, the selected font is returned. If the user clicks Cancel, the initial font is returned.

The dialog is constructed with the given parent and the options specified in options. title is shown as the window title of the dialog and initial is the initially selected font. If the ok parameter is not-null, the value it refers to is set to true if the user clicks OK, and set to false if the user clicks Cancel.

Examples:

bool ok; QFont font = QFontDialog::getFont(&ok, QFont("Times", 12), this); if (ok) { // font is set to the font the user selected } else { // the user canceled the dialog; font is set to the initial // value, in this case Times, 12. }

The dialog can also be used to set a widget's font directly:

myWidget.setFont(QFontDialog::getFont(0, myWidget.font()));

In this example, if the user clicks OK the font they chose will be used, and if they click Cancel the original font is used.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFontDialog constructors.

pub unsafe fn get_font_bool(ok: impl CastInto<MutPtr<bool>>) -> CppBox<QFont>[src]

This is an overloaded function.

Calls C++ function: static QFont QFontDialog::getFont(bool* ok).

C++ documentation:

This is an overloaded function.

Executes a modal font dialog and returns a font.

If the user clicks OK, the selected font is returned. If the user clicks Cancel, the Qt default font is returned.

The dialog is constructed with the given parent. If the ok parameter is not-null, the value it refers to is set to true if the user clicks OK, and false if the user clicks Cancel.

Example:

bool ok; QFont font = QFontDialog::getFont(&ok, this); if (ok) { // font is set to the font the user selected } else { // the user canceled the dialog; font is set to the default // application font, QApplication::font() }

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFontDialog constructors.

pub unsafe fn get_font_bool_q_font_q_widget_q_string(
    ok: impl CastInto<MutPtr<bool>>,
    initial: impl CastInto<Ref<QFont>>,
    parent: impl CastInto<MutPtr<QWidget>>,
    title: impl CastInto<Ref<QString>>
) -> CppBox<QFont>
[src]

Executes a modal font dialog and returns a font.

Calls C++ function: static QFont QFontDialog::getFont(bool* ok, const QFont& initial, QWidget* parent = …, const QString& title = …).

C++ documentation:

Executes a modal font dialog and returns a font.

If the user clicks OK, the selected font is returned. If the user clicks Cancel, the initial font is returned.

The dialog is constructed with the given parent and the options specified in options. title is shown as the window title of the dialog and initial is the initially selected font. If the ok parameter is not-null, the value it refers to is set to true if the user clicks OK, and set to false if the user clicks Cancel.

Examples:

bool ok; QFont font = QFontDialog::getFont(&ok, QFont("Times", 12), this); if (ok) { // font is set to the font the user selected } else { // the user canceled the dialog; font is set to the initial // value, in this case Times, 12. }

The dialog can also be used to set a widget's font directly:

myWidget.setFont(QFontDialog::getFont(0, myWidget.font()));

In this example, if the user clicks OK the font they chose will be used, and if they click Cancel the original font is used.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFontDialog constructors.

pub unsafe fn get_font_bool_q_font_q_widget(
    ok: impl CastInto<MutPtr<bool>>,
    initial: impl CastInto<Ref<QFont>>,
    parent: impl CastInto<MutPtr<QWidget>>
) -> CppBox<QFont>
[src]

Executes a modal font dialog and returns a font.

Calls C++ function: static QFont QFontDialog::getFont(bool* ok, const QFont& initial, QWidget* parent = …).

C++ documentation:

Executes a modal font dialog and returns a font.

If the user clicks OK, the selected font is returned. If the user clicks Cancel, the initial font is returned.

The dialog is constructed with the given parent and the options specified in options. title is shown as the window title of the dialog and initial is the initially selected font. If the ok parameter is not-null, the value it refers to is set to true if the user clicks OK, and set to false if the user clicks Cancel.

Examples:

bool ok; QFont font = QFontDialog::getFont(&ok, QFont("Times", 12), this); if (ok) { // font is set to the font the user selected } else { // the user canceled the dialog; font is set to the initial // value, in this case Times, 12. }

The dialog can also be used to set a widget's font directly:

myWidget.setFont(QFontDialog::getFont(0, myWidget.font()));

In this example, if the user clicks OK the font they chose will be used, and if they click Cancel the original font is used.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFontDialog constructors.

pub unsafe fn get_font_bool_q_font(
    ok: impl CastInto<MutPtr<bool>>,
    initial: impl CastInto<Ref<QFont>>
) -> CppBox<QFont>
[src]

Executes a modal font dialog and returns a font.

Calls C++ function: static QFont QFontDialog::getFont(bool* ok, const QFont& initial).

C++ documentation:

Executes a modal font dialog and returns a font.

If the user clicks OK, the selected font is returned. If the user clicks Cancel, the initial font is returned.

The dialog is constructed with the given parent and the options specified in options. title is shown as the window title of the dialog and initial is the initially selected font. If the ok parameter is not-null, the value it refers to is set to true if the user clicks OK, and set to false if the user clicks Cancel.

Examples:

bool ok; QFont font = QFontDialog::getFont(&ok, QFont("Times", 12), this); if (ok) { // font is set to the font the user selected } else { // the user canceled the dialog; font is set to the initial // value, in this case Times, 12. }

The dialog can also be used to set a widget's font directly:

myWidget.setFont(QFontDialog::getFont(0, myWidget.font()));

In this example, if the user clicks OK the font they chose will be used, and if they click Cancel the original font is used.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFontDialog constructors.

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QFontDialog::metaObject() const.

pub unsafe fn from_q_widget(
    parent: impl CastInto<MutPtr<QWidget>>
) -> CppBox<QFontDialog>
[src]

Constructs a standard font dialog.

Calls C++ function: [constructor] void QFontDialog::QFontDialog(QWidget* parent = …).

C++ documentation:

Constructs a standard font dialog.

Use setCurrentFont() to set the initial font attributes.

The parent parameter is passed to the QDialog constructor.

This function was introduced in Qt 4.5.

See also getFont().

pub unsafe fn from_q_font_q_widget(
    initial: impl CastInto<Ref<QFont>>,
    parent: impl CastInto<MutPtr<QWidget>>
) -> CppBox<QFontDialog>
[src]

Constructs a standard font dialog with the given parent and specified initial color.

Calls C++ function: [constructor] void QFontDialog::QFontDialog(const QFont& initial, QWidget* parent = …).

C++ documentation:

Constructs a standard font dialog with the given parent and specified initial color.

This function was introduced in Qt 4.5.

pub unsafe fn new() -> CppBox<QFontDialog>[src]

The QFontDialog class provides a dialog widget for selecting a font.

Calls C++ function: [constructor] void QFontDialog::QFontDialog().

C++ documentation:

The QFontDialog class provides a dialog widget for selecting a font.

A font dialog is created through one of the static getFont() functions.

Examples:

bool ok; QFont font = QFontDialog::getFont( &ok, QFont("Helvetica [Cronyx]", 10), this); if (ok) { // the user clicked OK and font is set to the font the user selected } else { // the user canceled the dialog; font is set to the initial // value, in this case Helvetica [Cronyx], 10 }

The dialog can also be used to set a widget's font directly:

myWidget.setFont(QFontDialog::getFont(0, myWidget.font()));

If the user clicks OK the font they chose will be used for myWidget, and if they click Cancel the original font is used.

A font dialog in the Fusion widget style.

pub unsafe fn from_q_font(
    initial: impl CastInto<Ref<QFont>>
) -> CppBox<QFontDialog>
[src]

Constructs a standard font dialog with the given parent and specified initial color.

Calls C++ function: [constructor] void QFontDialog::QFontDialog(const QFont& initial).

C++ documentation:

Constructs a standard font dialog with the given parent and specified initial color.

This function was introduced in Qt 4.5.

pub unsafe fn open(
    &mut self,
    receiver: impl CastInto<MutPtr<QObject>>,
    member: impl CastInto<Ptr<c_char>>
)
[src]

Opens the dialog and connects its fontSelected() signal to the slot specified by receiver and member.

Calls C++ function: void QFontDialog::open(QObject* receiver, const char* member).

C++ documentation:

Opens the dialog and connects its fontSelected() signal to the slot specified by receiver and member.

The signal will be disconnected from the slot when the dialog is closed.

This function was introduced in Qt 4.5.

pub unsafe fn options(&self) -> QFlags<FontDialogOption>[src]

This property holds the various options that affect the look and feel of the dialog

Calls C++ function: QFlags<QFontDialog::FontDialogOption> QFontDialog::options() const.

C++ documentation:

This property holds the various options that affect the look and feel of the dialog

By default, all options are disabled.

Options should be set before showing the dialog. Setting them while the dialog is visible is not guaranteed to have an immediate effect on the dialog (depending on the option and on the platform).

This property was introduced in Qt 4.5.

Access functions:

FontDialogOptions options() const
void setOptions(FontDialogOptions options)

See also setOption() and testOption().

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int QFontDialog::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

Calls C++ function: virtual void* QFontDialog::qt_metacast(const char* arg1).

pub unsafe fn selected_font(&self) -> CppBox<QFont>[src]

Returns the font that the user selected by clicking the OK or equivalent button.

Calls C++ function: QFont QFontDialog::selectedFont() const.

C++ documentation:

Returns the font that the user selected by clicking the OK or equivalent button.

Note: This font is not always the same as the font held by the currentFont property since the user can choose different fonts before finally selecting the one to use.

pub unsafe fn set_current_font(&mut self, font: impl CastInto<Ref<QFont>>)[src]

Sets the font highlighted in the QFontDialog to the given font.

Calls C++ function: void QFontDialog::setCurrentFont(const QFont& font).

C++ documentation:

Sets the font highlighted in the QFontDialog to the given font.

This function was introduced in Qt 4.5.

Note: Setter function for property currentFont.

See also currentFont() and selectedFont().

pub unsafe fn set_option_2a(&mut self, option: FontDialogOption, on: bool)[src]

Sets the given option to be enabled if on is true; otherwise, clears the given option.

Calls C++ function: void QFontDialog::setOption(QFontDialog::FontDialogOption option, bool on = …).

C++ documentation:

Sets the given option to be enabled if on is true; otherwise, clears the given option.

See also options and testOption().

pub unsafe fn set_option_1a(&mut self, option: FontDialogOption)[src]

Sets the given option to be enabled if on is true; otherwise, clears the given option.

Calls C++ function: void QFontDialog::setOption(QFontDialog::FontDialogOption option).

C++ documentation:

Sets the given option to be enabled if on is true; otherwise, clears the given option.

See also options and testOption().

pub unsafe fn set_options(&mut self, options: QFlags<FontDialogOption>)[src]

This property holds the various options that affect the look and feel of the dialog

Calls C++ function: void QFontDialog::setOptions(QFlags<QFontDialog::FontDialogOption> options).

C++ documentation:

This property holds the various options that affect the look and feel of the dialog

By default, all options are disabled.

Options should be set before showing the dialog. Setting them while the dialog is visible is not guaranteed to have an immediate effect on the dialog (depending on the option and on the platform).

This property was introduced in Qt 4.5.

Access functions:

FontDialogOptions options() const
void setOptions(FontDialogOptions options)

See also setOption() and testOption().

pub unsafe fn set_visible(&mut self, visible: bool)[src]

Reimplemented from QWidget::setVisible().

Calls C++ function: virtual void QFontDialog::setVisible(bool visible).

C++ documentation:

Reimplemented from QWidget::setVisible().

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn test_option(&self, option: FontDialogOption) -> bool[src]

Returns true if the given option is enabled; otherwise, returns false.

Calls C++ function: bool QFontDialog::testOption(QFontDialog::FontDialogOption option) const.

C++ documentation:

Returns true if the given option is enabled; otherwise, returns false.

See also options and setOption().

pub unsafe fn tr(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QFontDialog::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QFontDialog::trUtf8(const char* s, const char* c, int n).

Methods from Deref<Target = QDialog>

pub fn finished(&self) -> Signal<(c_int,)>[src]

This signal is emitted when the dialog's result code has been set, either by the user or by calling done(), accept(), or reject().

Returns a built-in Qt signal QDialog::finished that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the dialog's result code has been set, either by the user or by calling done(), accept(), or reject().

Note that this signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.

This function was introduced in Qt 4.1.

See also accepted() and rejected().

pub fn accepted(&self) -> Signal<()>[src]

This signal is emitted when the dialog has been accepted either by the user or by calling accept() or done() with the QDialog::Accepted argument.

Returns a built-in Qt signal QDialog::accepted that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the dialog has been accepted either by the user or by calling accept() or done() with the QDialog::Accepted argument.

Note that this signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.

This function was introduced in Qt 4.1.

See also finished() and rejected().

pub fn rejected(&self) -> Signal<()>[src]

This signal is emitted when the dialog has been rejected either by the user or by calling reject() or done() with the QDialog::Rejected argument.

Returns a built-in Qt signal QDialog::rejected that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the dialog has been rejected either by the user or by calling reject() or done() with the QDialog::Rejected argument.

Note that this signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.

This function was introduced in Qt 4.1.

See also finished() and accepted().

pub fn slot_open(&self) -> Receiver<()>[src]

Shows the dialog as a window modal dialog, returning immediately.

Returns a built-in Qt slot QDialog::open that can be passed to qt_core::Signal::connect.

C++ documentation:

Shows the dialog as a window modal dialog, returning immediately.

This function was introduced in Qt 4.5.

See also exec(), show(), result(), and setWindowModality().

pub fn slot_exec(&self) -> Receiver<()>[src]

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

Returns a built-in Qt slot QDialog::exec that can be passed to qt_core::Signal::connect.

C++ documentation:

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

If the dialog is application modal, users cannot interact with any other window in the same application until they close the dialog. If the dialog is window modal, only interaction with the parent window is blocked while the dialog is open. By default, the dialog is application modal.

See also open(), show(), result(), and setWindowModality().

pub fn slot_done(&self) -> Receiver<(c_int,)>[src]

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

Returns a built-in Qt slot QDialog::done that can be passed to qt_core::Signal::connect.

C++ documentation:

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

As with QWidget::close(), done() deletes the dialog if the Qt::WA_DeleteOnClose flag is set. If the dialog is the application's main widget, the application terminates. If the dialog is the last window closed, the QApplication::lastWindowClosed() signal is emitted.

See also accept(), reject(), QApplication::activeWindow(), and QCoreApplication::quit().

pub fn slot_accept(&self) -> Receiver<()>[src]

Hides the modal dialog and sets the result code to Accepted.

Returns a built-in Qt slot QDialog::accept that can be passed to qt_core::Signal::connect.

C++ documentation:

Hides the modal dialog and sets the result code to Accepted.

See also reject() and done().

pub fn slot_reject(&self) -> Receiver<()>[src]

Hides the modal dialog and sets the result code to Rejected.

Returns a built-in Qt slot QDialog::reject that can be passed to qt_core::Signal::connect.

C++ documentation:

Hides the modal dialog and sets the result code to Rejected.

See also accept() and done().

pub fn slot_show_extension(&self) -> Receiver<(bool,)>[src]

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Returns a built-in Qt slot QDialog::showExtension that can be passed to qt_core::Signal::connect.

C++ documentation:

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also show(), setExtension(), and setOrientation().

pub unsafe fn accept(&mut self)[src]

Hides the modal dialog and sets the result code to Accepted.

Calls C++ function: virtual [slot] void QDialog::accept().

C++ documentation:

Hides the modal dialog and sets the result code to Accepted.

See also reject() and done().

pub unsafe fn done(&mut self, arg1: c_int)[src]

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

Calls C++ function: virtual [slot] void QDialog::done(int arg1).

C++ documentation:

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

As with QWidget::close(), done() deletes the dialog if the Qt::WA_DeleteOnClose flag is set. If the dialog is the application's main widget, the application terminates. If the dialog is the last window closed, the QApplication::lastWindowClosed() signal is emitted.

See also accept(), reject(), QApplication::activeWindow(), and QCoreApplication::quit().

pub unsafe fn exec(&mut self) -> c_int[src]

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

Calls C++ function: virtual [slot] int QDialog::exec().

C++ documentation:

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

If the dialog is application modal, users cannot interact with any other window in the same application until they close the dialog. If the dialog is window modal, only interaction with the parent window is blocked while the dialog is open. By default, the dialog is application modal.

See also open(), show(), result(), and setWindowModality().

pub unsafe fn extension(&self) -> MutPtr<QWidget>[src]

Returns the dialog's extension or 0 if no extension has been defined.

Calls C++ function: QWidget* QDialog::extension() const.

C++ documentation:

Returns the dialog's extension or 0 if no extension has been defined.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also setExtension(), showExtension(), and setOrientation().

pub unsafe fn is_size_grip_enabled(&self) -> bool[src]

This property holds whether the size grip is enabled

Calls C++ function: bool QDialog::isSizeGripEnabled() const.

C++ documentation:

This property holds whether the size grip is enabled

A QSizeGrip is placed in the bottom-right corner of the dialog when this property is enabled. By default, the size grip is disabled.

Access functions:

bool isSizeGripEnabled() const
void setSizeGripEnabled(bool)

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QDialog::metaObject() const.

pub unsafe fn minimum_size_hint(&self) -> CppBox<QSize>[src]

Reimplemented from QWidget::minimumSizeHint().

Calls C++ function: virtual QSize QDialog::minimumSizeHint() const.

C++ documentation:

Reimplemented from QWidget::minimumSizeHint().

pub unsafe fn open(&mut self)[src]

Shows the dialog as a window modal dialog, returning immediately.

Calls C++ function: virtual [slot] void QDialog::open().

C++ documentation:

Shows the dialog as a window modal dialog, returning immediately.

This function was introduced in Qt 4.5.

See also exec(), show(), result(), and setWindowModality().

pub unsafe fn orientation(&self) -> Orientation[src]

Returns the dialog's extension orientation.

Calls C++ function: Qt::Orientation QDialog::orientation() const.

C++ documentation:

Returns the dialog's extension orientation.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also setOrientation() and extension().

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int QDialog::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

Calls C++ function: virtual void* QDialog::qt_metacast(const char* arg1).

pub unsafe fn reject(&mut self)[src]

Hides the modal dialog and sets the result code to Rejected.

Calls C++ function: virtual [slot] void QDialog::reject().

C++ documentation:

Hides the modal dialog and sets the result code to Rejected.

See also accept() and done().

pub unsafe fn result(&self) -> c_int[src]

In general returns the modal dialog's result code, Accepted or Rejected.

Calls C++ function: int QDialog::result() const.

C++ documentation:

In general returns the modal dialog's result code, Accepted or Rejected.

Note: When called on a QMessageBox instance, the returned value is a value of the QMessageBox::StandardButton enum.

Do not call this function if the dialog was constructed with the Qt::WA_DeleteOnClose attribute.

See also setResult().

pub unsafe fn set_extension(
    &mut self,
    extension: impl CastInto<MutPtr<QWidget>>
)
[src]

Sets the widget, extension, to be the dialog's extension, deleting any previous extension. The dialog takes ownership of the extension. Note that if 0 is passed any existing extension will be deleted. This function must only be called while the dialog is hidden.

Calls C++ function: void QDialog::setExtension(QWidget* extension).

C++ documentation:

Sets the widget, extension, to be the dialog's extension, deleting any previous extension. The dialog takes ownership of the extension. Note that if 0 is passed any existing extension will be deleted. This function must only be called while the dialog is hidden.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also extension(), showExtension(), and setOrientation().

pub unsafe fn set_modal(&mut self, modal: bool)[src]

This property holds whether show() should pop up the dialog as modal or modeless

Calls C++ function: void QDialog::setModal(bool modal).

C++ documentation:

This property holds whether show() should pop up the dialog as modal or modeless

By default, this property is false and show() pops up the dialog as modeless. Setting this property to true is equivalent to setting QWidget::windowModality to Qt::ApplicationModal.

exec() ignores the value of this property and always pops up the dialog as modal.

Access functions:

bool isModal() const
void setModal(bool modal)

See also QWidget::windowModality, show(), and exec().

pub unsafe fn set_orientation(&mut self, orientation: Orientation)[src]

If orientation is Qt::Horizontal, the extension will be displayed to the right of the dialog's main area. If orientation is Qt::Vertical, the extension will be displayed below the dialog's main area.

Calls C++ function: void QDialog::setOrientation(Qt::Orientation orientation).

C++ documentation:

If orientation is Qt::Horizontal, the extension will be displayed to the right of the dialog's main area. If orientation is Qt::Vertical, the extension will be displayed below the dialog's main area.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also orientation() and setExtension().

pub unsafe fn set_result(&mut self, r: c_int)[src]

Sets the modal dialog's result code to i.

Calls C++ function: void QDialog::setResult(int r).

C++ documentation:

Sets the modal dialog's result code to i.

Note: We recommend that you use one of the values defined by QDialog::DialogCode.

See also result().

pub unsafe fn set_size_grip_enabled(&mut self, arg1: bool)[src]

This property holds whether the size grip is enabled

Calls C++ function: void QDialog::setSizeGripEnabled(bool arg1).

C++ documentation:

This property holds whether the size grip is enabled

A QSizeGrip is placed in the bottom-right corner of the dialog when this property is enabled. By default, the size grip is disabled.

Access functions:

bool isSizeGripEnabled() const
void setSizeGripEnabled(bool)

pub unsafe fn set_visible(&mut self, visible: bool)[src]

Reimplemented from QWidget::setVisible().

Calls C++ function: virtual void QDialog::setVisible(bool visible).

C++ documentation:

Reimplemented from QWidget::setVisible().

pub unsafe fn show_extension(&mut self, arg1: bool)[src]

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Calls C++ function: [slot] void QDialog::showExtension(bool arg1).

C++ documentation:

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also show(), setExtension(), and setOrientation().

pub unsafe fn size_hint(&self) -> CppBox<QSize>[src]

Reimplemented from QWidget::sizeHint().

Calls C++ function: virtual QSize QDialog::sizeHint() const.

C++ documentation:

Reimplemented from QWidget::sizeHint().

Trait Implementations

impl CppDeletable for QFontDialog[src]

unsafe fn delete(&mut self)[src]

Calls C++ function: virtual [destructor] void QFontDialog::~QFontDialog().

impl Deref for QFontDialog[src]

type Target = QDialog

The resulting type after dereferencing.

fn deref(&self) -> &QDialog[src]

Calls C++ function: QDialog* static_cast<QDialog*>(QFontDialog* ptr).

impl DerefMut for QFontDialog[src]

fn deref_mut(&mut self) -> &mut QDialog[src]

Calls C++ function: QDialog* static_cast<QDialog*>(QFontDialog* ptr).

impl DynamicCast<QFontDialog> for QDialog[src]

unsafe fn dynamic_cast(ptr: Ptr<QDialog>) -> Ptr<QFontDialog>[src]

Calls C++ function: QFontDialog* dynamic_cast<QFontDialog*>(QDialog* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QDialog>) -> MutPtr<QFontDialog>[src]

Calls C++ function: QFontDialog* dynamic_cast<QFontDialog*>(QDialog* ptr).

impl DynamicCast<QFontDialog> for QWidget[src]

unsafe fn dynamic_cast(ptr: Ptr<QWidget>) -> Ptr<QFontDialog>[src]

Calls C++ function: QFontDialog* dynamic_cast<QFontDialog*>(QWidget* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QWidget>) -> MutPtr<QFontDialog>[src]

Calls C++ function: QFontDialog* dynamic_cast<QFontDialog*>(QWidget* ptr).

impl DynamicCast<QFontDialog> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QFontDialog>[src]

Calls C++ function: QFontDialog* dynamic_cast<QFontDialog*>(QObject* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QFontDialog>[src]

Calls C++ function: QFontDialog* dynamic_cast<QFontDialog*>(QObject* ptr).

impl DynamicCast<QFontDialog> for QPaintDevice[src]

unsafe fn dynamic_cast(ptr: Ptr<QPaintDevice>) -> Ptr<QFontDialog>[src]

Calls C++ function: QFontDialog* dynamic_cast<QFontDialog*>(QPaintDevice* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QPaintDevice>) -> MutPtr<QFontDialog>[src]

Calls C++ function: QFontDialog* dynamic_cast<QFontDialog*>(QPaintDevice* ptr).

impl StaticDowncast<QFontDialog> for QDialog[src]

unsafe fn static_downcast(ptr: Ptr<QDialog>) -> Ptr<QFontDialog>[src]

Calls C++ function: QFontDialog* static_cast<QFontDialog*>(QDialog* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QDialog>) -> MutPtr<QFontDialog>[src]

Calls C++ function: QFontDialog* static_cast<QFontDialog*>(QDialog* ptr).

impl StaticDowncast<QFontDialog> for QWidget[src]

unsafe fn static_downcast(ptr: Ptr<QWidget>) -> Ptr<QFontDialog>[src]

Calls C++ function: QFontDialog* static_cast<QFontDialog*>(QWidget* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QWidget>) -> MutPtr<QFontDialog>[src]

Calls C++ function: QFontDialog* static_cast<QFontDialog*>(QWidget* ptr).

impl StaticDowncast<QFontDialog> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QFontDialog>[src]

Calls C++ function: QFontDialog* static_cast<QFontDialog*>(QObject* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QFontDialog>[src]

Calls C++ function: QFontDialog* static_cast<QFontDialog*>(QObject* ptr).

impl StaticDowncast<QFontDialog> for QPaintDevice[src]

unsafe fn static_downcast(ptr: Ptr<QPaintDevice>) -> Ptr<QFontDialog>[src]

Calls C++ function: QFontDialog* static_cast<QFontDialog*>(QPaintDevice* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QPaintDevice>) -> MutPtr<QFontDialog>[src]

Calls C++ function: QFontDialog* static_cast<QFontDialog*>(QPaintDevice* ptr).

impl StaticUpcast<QDialog> for QFontDialog[src]

unsafe fn static_upcast(ptr: Ptr<QFontDialog>) -> Ptr<QDialog>[src]

Calls C++ function: QDialog* static_cast<QDialog*>(QFontDialog* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QFontDialog>) -> MutPtr<QDialog>[src]

Calls C++ function: QDialog* static_cast<QDialog*>(QFontDialog* ptr).

impl StaticUpcast<QObject> for QFontDialog[src]

unsafe fn static_upcast(ptr: Ptr<QFontDialog>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QFontDialog* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QFontDialog>) -> MutPtr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QFontDialog* ptr).

impl StaticUpcast<QPaintDevice> for QFontDialog[src]

unsafe fn static_upcast(ptr: Ptr<QFontDialog>) -> Ptr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QFontDialog* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QFontDialog>) -> MutPtr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QFontDialog* ptr).

impl StaticUpcast<QWidget> for QFontDialog[src]

unsafe fn static_upcast(ptr: Ptr<QFontDialog>) -> Ptr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QFontDialog* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QFontDialog>) -> MutPtr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QFontDialog* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.