Open 3D Engine AzQtComponents API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <Card.h>
Inherits QFrame.
Classes | |
struct | Config |
Style configuration for the Card class. More... | |
Signals | |
void | selectedChanged (bool selected) |
Triggered when the selected state for the Card changes. | |
void | expandStateChanged (bool expanded) |
Triggered when the Card is expanded/collapsed. | |
void | secondaryContentExpandStateChanged (bool expanded) |
Triggered when the Card's secondary content is expanded/collapsed. | |
void | contextMenuRequested (const QPoint &position) |
Triggered when the menu button on the card is clicked and the context menu is shown. | |
Public Member Functions | |
Card (QWidget *parent=nullptr) | |
void | setContentWidget (QWidget *contentWidget) |
Sets the Primary Content Widget for this Card. | |
QWidget * | contentWidget () const |
Returns a pointer to the Primary Content Widget for this Card. | |
void | setTitle (const QString &title) |
void | setTitleToolTip (const QString &toolTip) |
QString | title () const |
Returns the Card's Title. | |
CardHeader * | header () const |
Returns a pointer to thisCard's CardHeader. | |
CardNotification * | addNotification (const QString &message) |
Appends a notification to the Card with the message provided. | |
void | clearNotifications () |
Clears all notifications on this Card. | |
int | getNotificationCount () const |
Returns the number of notifications currently attached to this Card. | |
void | setExpanded (bool expand) |
Set the Card's expanded state. | |
bool | isExpanded () const |
Returns the Card's expanded state. | |
void | setSelected (bool selected) |
bool | isSelected () const |
Returns the Card's selected state. | |
void | setDragging (bool dragging) |
bool | isDragging () const |
Returns true if the Card is marked as "being dragged". | |
void | setDropTarget (bool dropTarget) |
bool | isDropTarget () const |
Returns true if the Card is marked as "drop target". | |
void | setSecondaryContentExpanded (bool expand) |
Set the expanded state for the Secondary Widget. | |
bool | isSecondaryContentExpanded () const |
Returns the expanded state for the Secondary Widget. | |
void | setSecondaryTitle (const QString &secondaryTitle) |
Sets the Title for the secondary section of the Card. | |
QString | secondaryTitle () const |
Gets the Title of the secondary section of the Card. | |
void | setSecondaryContentWidget (QWidget *secondaryContentWidget) |
Sets the Title for the secondary section of the Card. | |
QWidget * | secondaryContentWidget () const |
Returns a pointer to the secondary widget of this Card. | |
void | hideFrame () |
Sets the hideFrame property on the Card, removing the border around it. | |
void | mockDisabledState (bool disable) |
Static Public Member Functions | |
static void | applyContainerStyle (Card *card) |
static void | applySectionStyle (Card *card) |
static Config | loadConfig (QSettings &settings) |
static Config | defaultConfig () |
Gets the default Card style configuration. | |
Protected Member Functions | |
Card (CardHeader *customHeader, QWidget *parent=nullptr) | |
Properties | |
bool | selected |
Card selected state. Selected cards get a blue border. | |
bool | expanded |
Card expanded state. Collapsing a Card disables the widgets it contains. | |
Friends | |
class | Style |
A container for other widgets that provides a title bar and can be expanded/collapsed or dragged around. To make use of a Card, set its title and a content widget. The content widget will be automatically shown and hidden as the Card is expanded and collapsed. Beyond that, a Card can also include a secondary expandable widget, for features such as Advanced Settings, and multiple "Notifications" which are labels appended to the bottom that can optionally include "feature" widgets, for example as a button to allow the user to respond to the Notification. Style information is stored in Card.qss, for Card, CardHeader and CardNotification objects. Config information is stored in CardConfig.ini
|
static |
void AzQtComponents::Card::mockDisabledState | ( | bool | disable | ) |
Shows the Card as disabled. Expand/collapse, help and context menu buttons will remain functional.
void AzQtComponents::Card::setDragging | ( | bool | dragging | ) |
Marks the Card as "being dragged". Note: there is no behavior associated to this function, it's just a flag.
void AzQtComponents::Card::setDropTarget | ( | bool | dropTarget | ) |
Marks the Card as "drop target". Note: there is no behavior associated to this function, it's just a flag.
void AzQtComponents::Card::setSelected | ( | bool | selected | ) |
Sets the Card's selected state. Will trigger the selectedChanged() signal.
void AzQtComponents::Card::setTitle | ( | const QString & | title | ) |
Sets the Card's Title. Equivalent to calling setTitle on the CardHeader.
void AzQtComponents::Card::setTitleToolTip | ( | const QString & | toolTip | ) |
Sets the tool tip for the card header and card header title. Equivalent to calling setTitle on the CardHeader.