Open 3D Engine GraphCanvas Gem 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.
|
The GraphCanvasLabel gives a QGraphicsWidget that is able to display text, and be placed into a layout. More...
#include <GraphCanvasLabel.h>
Inherits QGraphicsWidget.
Public Types | |
enum class | WrapMode { MaximumWidth , BoundingWidth , ResizeToContent } |
enum class | RoundedCornersMode { AllCorners , LeftCorners , RightCorners } |
Public Member Functions | |
AZ_CLASS_ALLOCATOR (GraphCanvasLabel, AZ::SystemAllocator) | |
GraphCanvasLabel (QGraphicsItem *parent=nullptr) | |
void | SetFontColor (const QColor &color) |
void | ClearFontColor () |
void | SetBorderColorOverride (const QBrush &borderOverride) |
const QBrush & | GetBorderColorOverride () const |
void | ClearBorderColorOverride () |
void | SetLabel (const AZStd::string &value) |
AZStd::string | GetLabel () const |
void | SetSceneStyle (const AZ::EntityId &sceneId, const char *style) |
void | SetStyle (const AZ::EntityId &entityId, const char *styleElement) |
void | RefreshDisplay () |
void | SetWrapMode (WrapMode wrapMode) |
void | SetRoundedCornersMode (RoundedCornersMode roundedCornerMode) |
Sets which corners to apply the radius to. | |
QRectF | GetDisplayedSize () const |
void | SetElide (bool elide) |
void | SetWrap (bool wrap) |
void | SetAllowNewlines (bool allow) |
Sets whether or not the text label will allow newlines in the text. | |
void | SetDefaultAlignment (Qt::Alignment defaultAlignment) |
Styling::StyleHelper & | GetStyleHelper () |
const Styling::StyleHelper & | GetStyleHelper () const |
void | UpdateDisplayText () |
The GraphCanvasLabel gives a QGraphicsWidget that is able to display text, and be placed into a layout.
void GraphCanvas::GraphCanvasLabel::SetElide | ( | bool | elide | ) |
Sets whether the text should elide if it grows beyond max-width (Note: currently incompatible with word wrap)
void GraphCanvas::GraphCanvasLabel::SetWrap | ( | bool | wrap | ) |
Sets whether the next should wrap if it grows beyond max-width (Note: currently incompatible with text elide)