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 <BreadCrumbs.h>
Inherits QFrame.
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. | |
void | pushFullPath (const QString &newFullPath, const QString &newPath) |
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. | |
void | startEditing () |
Signals | |
void | pathChanged (const QString &fullPath) |
void | pathEdited (const QString &requestedPath) |
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. | |
QString | fullPath () const |
Returns the full path if the current path is not the full 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 | isEditable () const |
void | setEditable (bool editable) |
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 () |
QSize | sizeHint () const override |
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 |
void | changeEvent (QEvent *event) override |
bool | eventFilter (QObject *obj, QEvent *ev) override |
Properties | |
bool | editable |
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.
|
signal |
Triggered after user changes the path in editable BreadCrumbs.
|
slot |
Pushes a new full path to be displayed in the editable breadcrumbs, and a new path to be shown in the breadcrumbs navigation bar.
|
override |
Size hint reports the space that would be taken if the whole path would be shown.
|
slot |
Initiate editing of the path in BreadCrumbs.
This could be called when e.g. user presses some combination like Ctrl+L in an appropriate context. It will work only for editable instances (