![]() |
Open 3D Engine AzQtComponents API Reference
2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <BreadCrumbs.h>
Inherits QWidget.
Classes | |
struct | Config |
Style configuration for the Breadcrumbs class. More... | |
Public Slots | |
void | pushPath (const QString &fullPath) |
Pushes a path to be shown in the Breadcrumbs widget. | |
bool | back () |
Restores the previous breadcrumb path from the navigation stack if it exists. | |
bool | forward () |
Restores the next breadcrumb path from the navigation stack if it exists. | |
Signals | |
void | pathChanged (const QString &fullPath) |
void | linkClicked (const QString &linkPath, int linkIndex) |
void | backAvailabilityChanged (bool enabled) |
void | forwardAvailabilityChanged (bool enabled) |
Public Member Functions | |
BreadCrumbs (QWidget *parent=nullptr) | |
bool | isBackAvailable () const |
Returns true if it is possible to move back in the navigation stack, false otherwise. | |
bool | isForwardAvailable () const |
Returns true if it is possible to move forward in the navigation stack, false otherwise. | |
bool | isUpAvailable () const |
Returns true if the current breadcrumb path has a parent that can be added to the navigation stack, false otherwise. | |
QString | currentPath () const |
Returns a string with the current breadcrumb path. | |
void | setCurrentPath (const QString &newPath) |
Sets the current breadcrumb path without updating the navigation stack. | |
void | setDefaultIcon (const QString &iconPath) |
Sets a default icon for path elements. | |
void | setIconAt (int index, const QString &iconPath) |
Sets an icon for the path element at index. | |
QIcon | iconAt (int index) |
Gets the icon for the path element at index. | |
bool | getPushPathOnLinkActivation () const |
Returns true if activating a link should automatically push a new path to the navigation stack. | |
void | setPushPathOnLinkActivation (bool pushPath) |
Sets whether activating a link should automatically push a new path to the navigation stack. | |
QToolButton * | createButton (NavigationButton type) |
QWidget * | createBackForwardToolBar () |
QWidget * | createSeparator () |
Static Public Member Functions | |
static Config | loadConfig (QSettings &settings) |
static Config | defaultConfig () |
Gets the default Breadcrumbs style configuration. | |
Protected Member Functions | |
void | resizeEvent (QResizeEvent *event) override |
Friends | |
class | Style |
Specialized widget to create html-style clickable links for each part of a path. Provides state management and signals for handling common path navigation functionality (back, forward and up). Can be styled by modifying BreadCrumbs.qss and BreadCrumbsConfig.ini. Note that Qt doesn't handle HTML embedded in QLabel widgets gracefully - stylesheets are not shared between those and Qt objects. As a result, the color of the HTML styled links in the BreadCrumbs is specified in BreadCrumbsConfig.ini.
|
signal |
Triggered after a change to the navigation stack, if back is available. Used to update back buttons.
enabled | The new back availability state after the change. |
QWidget* AzQtComponents::BreadCrumbs::createBackForwardToolBar | ( | ) |
Creates a widget containing the back and forward buttons.
QToolButton* AzQtComponents::BreadCrumbs::createButton | ( | NavigationButton | type | ) |
Creates a button of the type specified.
type | The type of button to create. |
QWidget* AzQtComponents::BreadCrumbs::createSeparator | ( | ) |
Creates a separator styled to match the Breadcrumbs widget.
|
signal |
Triggered after a change to the navigation stack, if forward is available. Used to update forward buttons.
enabled | The new forward availability state after the change. |
|
signal |
Triggered when a link is clicked.
linkPath | The path of the clicked link. |
linkIndex | The index of the link. |
|
static |
Sets the Breadcrumbs style configuration.
settings | The settings object to load the configuration from. |
|
signal |
Triggered when the currently displayed path changes via any of the slots.