[][src]Struct qt_widgets::QCommandLinkButton

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

The QCommandLinkButton widget provides a Vista style command link button.

C++ class: QCommandLinkButton.

C++ documentation:

The QCommandLinkButton widget provides a Vista style command link button.

The command link is a new control that was introduced by Windows Vista. It's intended use is similar to that of a radio button in that it is used to choose between a set of mutually exclusive options. Command link buttons should not be used by themselves but rather as an alternative to radio buttons in Wizards and dialogs and makes pressing the "next" button redundant. The appearance is generally similar to that of a flat pushbutton, but it allows for a descriptive text in addition to the normal button text. By default it will also carry an arrow icon, indicating that pressing the control will open another window or page.

Methods

impl QCommandLinkButton[src]

pub unsafe fn description(&self) -> CppBox<QString>[src]

This property holds a descriptive label to complement the button text

Calls C++ function: QString QCommandLinkButton::description() const.

C++ documentation:

This property holds a descriptive label to complement the button text

Setting this property will set a descriptive text on the button, complementing the text label. This will usually be displayed in a smaller font than the primary text.

Access functions:

QString description() const
void setDescription(const QString &description)

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

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

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

Constructs a command link with no text and a parent.

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

C++ documentation:

Constructs a command link with no text and a parent.

pub unsafe fn from_q_string_q_widget(
    text: impl CastInto<Ref<QString>>,
    parent: impl CastInto<MutPtr<QWidget>>
) -> CppBox<QCommandLinkButton>
[src]

Constructs a command link with the parent parent and the text text.

Calls C++ function: [constructor] void QCommandLinkButton::QCommandLinkButton(const QString& text, QWidget* parent = …).

C++ documentation:

Constructs a command link with the parent parent and the text text.

pub unsafe fn from_2_q_string_q_widget(
    text: impl CastInto<Ref<QString>>,
    description: impl CastInto<Ref<QString>>,
    parent: impl CastInto<MutPtr<QWidget>>
) -> CppBox<QCommandLinkButton>
[src]

Constructs a command link with a text, a description, and a parent.

Calls C++ function: [constructor] void QCommandLinkButton::QCommandLinkButton(const QString& text, const QString& description, QWidget* parent = …).

C++ documentation:

Constructs a command link with a text, a description, and a parent.

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

The QCommandLinkButton widget provides a Vista style command link button.

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

C++ documentation:

The QCommandLinkButton widget provides a Vista style command link button.

The command link is a new control that was introduced by Windows Vista. It's intended use is similar to that of a radio button in that it is used to choose between a set of mutually exclusive options. Command link buttons should not be used by themselves but rather as an alternative to radio buttons in Wizards and dialogs and makes pressing the "next" button redundant. The appearance is generally similar to that of a flat pushbutton, but it allows for a descriptive text in addition to the normal button text. By default it will also carry an arrow icon, indicating that pressing the control will open another window or page.

pub unsafe fn from_q_string(
    text: impl CastInto<Ref<QString>>
) -> CppBox<QCommandLinkButton>
[src]

Constructs a command link with the parent parent and the text text.

Calls C++ function: [constructor] void QCommandLinkButton::QCommandLinkButton(const QString& text).

C++ documentation:

Constructs a command link with the parent parent and the text text.

pub unsafe fn from_2_q_string(
    text: impl CastInto<Ref<QString>>,
    description: impl CastInto<Ref<QString>>
) -> CppBox<QCommandLinkButton>
[src]

Constructs a command link with a text, a description, and a parent.

Calls C++ function: [constructor] void QCommandLinkButton::QCommandLinkButton(const QString& text, const QString& description).

C++ documentation:

Constructs a command link with a text, a description, and a parent.

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 QCommandLinkButton::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* QCommandLinkButton::qt_metacast(const char* arg1).

pub unsafe fn set_description(
    &mut self,
    description: impl CastInto<Ref<QString>>
)
[src]

This property holds a descriptive label to complement the button text

Calls C++ function: void QCommandLinkButton::setDescription(const QString& description).

C++ documentation:

This property holds a descriptive label to complement the button text

Setting this property will set a descriptive text on the button, complementing the text label. This will usually be displayed in a smaller font than the primary text.

Access functions:

QString description() const
void setDescription(const QString &description)

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

Returns a reference to the staticMetaObject field.

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 QCommandLinkButton::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 QCommandLinkButton::trUtf8(const char* s, const char* c, int n).

Methods from Deref<Target = QPushButton>

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

Shows (pops up) the associated popup menu. If there is no such menu, this function does nothing. This function does not return until the popup menu has been closed by the user.

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

C++ documentation:

Shows (pops up) the associated popup menu. If there is no such menu, this function does nothing. This function does not return until the popup menu has been closed by the user.

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

This property holds whether the push button is an auto default button

Calls C++ function: bool QPushButton::autoDefault() const.

C++ documentation:

This property holds whether the push button is an auto default button

If this property is set to true then the push button is an auto default button.

In some GUI styles a default button is drawn with an extra frame around it, up to 3 pixels or more. Qt automatically keeps this space free around auto-default buttons, i.e., auto-default buttons may have a slightly larger size hint.

This property's default is true for buttons that have a QDialog parent; otherwise it defaults to false.

See the default property for details of how default and auto-default interact.

Access functions:

bool autoDefault() const
void setAutoDefault(bool)

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

This property holds whether the push button is the default button

Calls C++ function: bool QPushButton::isDefault() const.

C++ documentation:

This property holds whether the push button is the default button

Default and autodefault buttons decide what happens when the user presses enter in a dialog.

A button with this property set to true (i.e., the dialog's default button,) will automatically be pressed when the user presses enter, with one exception: if an autoDefault button currently has focus, the autoDefault button is pressed. When the dialog has autoDefault buttons but no default button, pressing enter will press either the autoDefault button that currently has focus, or if no button has focus, the next autoDefault button in the focus chain.

In a dialog, only one push button at a time can be the default button. This button is then displayed with an additional frame (depending on the GUI style).

The default button behavior is provided only in dialogs. Buttons can always be clicked from the keyboard by pressing Spacebar when the button has focus.

If the default property is set to false on the current default button while the dialog is visible, a new default will automatically be assigned the next time a push button in the dialog receives focus.

This property's default is false.

Access functions:

bool isDefault() const
void setDefault(bool)

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

This property holds whether the button border is raised

Calls C++ function: bool QPushButton::isFlat() const.

C++ documentation:

This property holds whether the button border is raised

This property's default is false. If this property is set, most styles will not paint the button background unless the button is being pressed. setAutoFillBackground() can be used to ensure that the background is filled using the QPalette::Button brush.

Access functions:

bool isFlat() const
void setFlat(bool)

pub unsafe fn menu(&self) -> MutPtr<QMenu>[src]

Returns the button's associated popup menu or 0 if no popup menu has been set.

Calls C++ function: QMenu* QPushButton::menu() const.

C++ documentation:

Returns the button's associated popup menu or 0 if no popup menu has been set.

See also setMenu().

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

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

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

Reimplemented from QWidget::minimumSizeHint().

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

C++ documentation:

Reimplemented from QWidget::minimumSizeHint().

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 QPushButton::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* QPushButton::qt_metacast(const char* arg1).

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

This property holds whether the push button is an auto default button

Calls C++ function: void QPushButton::setAutoDefault(bool arg1).

C++ documentation:

This property holds whether the push button is an auto default button

If this property is set to true then the push button is an auto default button.

In some GUI styles a default button is drawn with an extra frame around it, up to 3 pixels or more. Qt automatically keeps this space free around auto-default buttons, i.e., auto-default buttons may have a slightly larger size hint.

This property's default is true for buttons that have a QDialog parent; otherwise it defaults to false.

See the default property for details of how default and auto-default interact.

Access functions:

bool autoDefault() const
void setAutoDefault(bool)

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

This property holds whether the push button is the default button

Calls C++ function: void QPushButton::setDefault(bool arg1).

C++ documentation:

This property holds whether the push button is the default button

Default and autodefault buttons decide what happens when the user presses enter in a dialog.

A button with this property set to true (i.e., the dialog's default button,) will automatically be pressed when the user presses enter, with one exception: if an autoDefault button currently has focus, the autoDefault button is pressed. When the dialog has autoDefault buttons but no default button, pressing enter will press either the autoDefault button that currently has focus, or if no button has focus, the next autoDefault button in the focus chain.

In a dialog, only one push button at a time can be the default button. This button is then displayed with an additional frame (depending on the GUI style).

The default button behavior is provided only in dialogs. Buttons can always be clicked from the keyboard by pressing Spacebar when the button has focus.

If the default property is set to false on the current default button while the dialog is visible, a new default will automatically be assigned the next time a push button in the dialog receives focus.

This property's default is false.

Access functions:

bool isDefault() const
void setDefault(bool)

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

This property holds whether the button border is raised

Calls C++ function: void QPushButton::setFlat(bool arg1).

C++ documentation:

This property holds whether the button border is raised

This property's default is false. If this property is set, most styles will not paint the button background unless the button is being pressed. setAutoFillBackground() can be used to ensure that the background is filled using the QPalette::Button brush.

Access functions:

bool isFlat() const
void setFlat(bool)

pub unsafe fn set_menu(&mut self, menu: impl CastInto<MutPtr<QMenu>>)[src]

Associates the popup menu menu with this push button. This turns the button into a menu button, which in some styles will produce a small triangle to the right of the button's text.

Calls C++ function: void QPushButton::setMenu(QMenu* menu).

C++ documentation:

Associates the popup menu menu with this push button. This turns the button into a menu button, which in some styles will produce a small triangle to the right of the button's text.

Ownership of the menu is not transferred to the push button.

Screenshot of a Fusion style push button with popup menu.

A push button with popup menus shown in the Fusion widget style.

See also menu().

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

Shows (pops up) the associated popup menu. If there is no such menu, this function does nothing. This function does not return until the popup menu has been closed by the user.

Calls C++ function: [slot] void QPushButton::showMenu().

C++ documentation:

Shows (pops up) the associated popup menu. If there is no such menu, this function does nothing. This function does not return until the popup menu has been closed by the user.

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

Reimplemented from QWidget::sizeHint().

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

C++ documentation:

Reimplemented from QWidget::sizeHint().

Trait Implementations

impl CppDeletable for QCommandLinkButton[src]

unsafe fn delete(&mut self)[src]

Destructor.

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

C++ documentation:

Destructor.

impl Deref for QCommandLinkButton[src]

type Target = QPushButton

The resulting type after dereferencing.

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

Calls C++ function: QPushButton* static_cast<QPushButton*>(QCommandLinkButton* ptr).

impl DerefMut for QCommandLinkButton[src]

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

Calls C++ function: QPushButton* static_cast<QPushButton*>(QCommandLinkButton* ptr).

impl DynamicCast<QCommandLinkButton> for QPushButton[src]

unsafe fn dynamic_cast(ptr: Ptr<QPushButton>) -> Ptr<QCommandLinkButton>[src]

Calls C++ function: QCommandLinkButton* dynamic_cast<QCommandLinkButton*>(QPushButton* ptr).

unsafe fn dynamic_cast_mut(
    ptr: MutPtr<QPushButton>
) -> MutPtr<QCommandLinkButton>
[src]

Calls C++ function: QCommandLinkButton* dynamic_cast<QCommandLinkButton*>(QPushButton* ptr).

impl DynamicCast<QCommandLinkButton> for QAbstractButton[src]

unsafe fn dynamic_cast(ptr: Ptr<QAbstractButton>) -> Ptr<QCommandLinkButton>[src]

Calls C++ function: QCommandLinkButton* dynamic_cast<QCommandLinkButton*>(QAbstractButton* ptr).

unsafe fn dynamic_cast_mut(
    ptr: MutPtr<QAbstractButton>
) -> MutPtr<QCommandLinkButton>
[src]

Calls C++ function: QCommandLinkButton* dynamic_cast<QCommandLinkButton*>(QAbstractButton* ptr).

impl DynamicCast<QCommandLinkButton> for QWidget[src]

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

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

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

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

impl DynamicCast<QCommandLinkButton> for QObject[src]

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

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

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

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

impl DynamicCast<QCommandLinkButton> for QPaintDevice[src]

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

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

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

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

impl StaticDowncast<QCommandLinkButton> for QPushButton[src]

unsafe fn static_downcast(ptr: Ptr<QPushButton>) -> Ptr<QCommandLinkButton>[src]

Calls C++ function: QCommandLinkButton* static_cast<QCommandLinkButton*>(QPushButton* ptr).

unsafe fn static_downcast_mut(
    ptr: MutPtr<QPushButton>
) -> MutPtr<QCommandLinkButton>
[src]

Calls C++ function: QCommandLinkButton* static_cast<QCommandLinkButton*>(QPushButton* ptr).

impl StaticDowncast<QCommandLinkButton> for QAbstractButton[src]

unsafe fn static_downcast(ptr: Ptr<QAbstractButton>) -> Ptr<QCommandLinkButton>[src]

Calls C++ function: QCommandLinkButton* static_cast<QCommandLinkButton*>(QAbstractButton* ptr).

unsafe fn static_downcast_mut(
    ptr: MutPtr<QAbstractButton>
) -> MutPtr<QCommandLinkButton>
[src]

Calls C++ function: QCommandLinkButton* static_cast<QCommandLinkButton*>(QAbstractButton* ptr).

impl StaticDowncast<QCommandLinkButton> for QWidget[src]

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

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

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

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

impl StaticDowncast<QCommandLinkButton> for QObject[src]

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

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

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

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

impl StaticDowncast<QCommandLinkButton> for QPaintDevice[src]

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

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

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

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

impl StaticUpcast<QAbstractButton> for QCommandLinkButton[src]

unsafe fn static_upcast(ptr: Ptr<QCommandLinkButton>) -> Ptr<QAbstractButton>[src]

Calls C++ function: QAbstractButton* static_cast<QAbstractButton*>(QCommandLinkButton* ptr).

unsafe fn static_upcast_mut(
    ptr: MutPtr<QCommandLinkButton>
) -> MutPtr<QAbstractButton>
[src]

Calls C++ function: QAbstractButton* static_cast<QAbstractButton*>(QCommandLinkButton* ptr).

impl StaticUpcast<QObject> for QCommandLinkButton[src]

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

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

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

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

impl StaticUpcast<QPaintDevice> for QCommandLinkButton[src]

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

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

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

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

impl StaticUpcast<QPushButton> for QCommandLinkButton[src]

unsafe fn static_upcast(ptr: Ptr<QCommandLinkButton>) -> Ptr<QPushButton>[src]

Calls C++ function: QPushButton* static_cast<QPushButton*>(QCommandLinkButton* ptr).

unsafe fn static_upcast_mut(
    ptr: MutPtr<QCommandLinkButton>
) -> MutPtr<QPushButton>
[src]

Calls C++ function: QPushButton* static_cast<QPushButton*>(QCommandLinkButton* ptr).

impl StaticUpcast<QWidget> for QCommandLinkButton[src]

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

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

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

Calls C++ function: QWidget* static_cast<QWidget*>(QCommandLinkButton* 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.