![]() |
NDEVR
API Documentation
|
Provides a tab that is used for either a tab if the section content is attached to a Container, or as the drag bar if the content is floating. More...
Public Member Functions | |
| SectionTab (SectionContent *content, QWidget *parent) | |
| Constructs a SectionTab associated with the given section content and parent widget. | |
| void | activeTabChanged () |
| Emitted when the active tab changes. | |
| void | clickedSignal (SectionContent *content) |
| Emitted when the tab is clicked. | |
| void | closableUpdated (bool is_closeable) |
| Emitted when the closable state of this tab changes. | |
| void | closedSignal (SectionContent *content) |
| Emitted when the tab's close action is triggered. | |
| bool | event (QEvent *event) override |
| Processes generic events such as style changes. | |
| void | fullscreenSignal (bool fullscreen) |
| Emitted when the fullscreen state is toggled. | |
| void | fullscreenUpdated (bool is_fullscreen) |
| Emitted when the fullscreen state of this tab changes. | |
| virtual QIcon | getIcon () const |
| Returns the icon displayed on this tab. | |
| virtual TranslatedString | getTitle () const |
| Returns the translated title text displayed on this tab. | |
| bool | isActiveTab () const |
| Returns whether this tab is currently the active (selected) tab. | |
| virtual bool | isMovable () const |
| Returns whether this tab can be moved (dragged) by the user. | |
| virtual bool | isShown () const |
| Returns whether this tab is currently shown. | |
| void | isShownUpdated (bool is_shown) |
| Emitted when the shown state of this tab changes. | |
| void | moveableUpdated (bool is_moveable) |
| Emitted when the moveable state of this tab changes. | |
| void | setActiveTab (bool active) |
| Sets whether this tab is the active (selected) tab. | |
| virtual void | setDocked (bool is_docked)=0 |
| Sets whether this tab is in a docked state. | |
| virtual void | setFloatingWidget (FloatingWidget *widget) |
| Assigns the floating widget that contains this tab when undocked. | |
| virtual void | setFullscreen (bool fullscreen) |
| Sets whether the associated content is displayed in fullscreen mode. | |
| void | setIsShown (bool shown) |
| Sets whether this tab should be shown or hidden. | |
| virtual void | setLocation (RibbonArea area, bool is_docked)=0 |
| Sets the layout location and docked state of this tab. | |
| void | setRoundedCorners (int radius_tl, int radius_tr, int radius_bl, int radius_br) |
| Sets the rounded corner radii for each corner of the tab. | |
| void | setSectionContent (SectionContent *content) |
| Sets the section content associated with this tab. | |
| virtual void | setSelected (bool is_selected)=0 |
| Sets the selected visual state of this tab. | |
| void | updateClosableSignal () |
| Emitted to request an update of the closable state. | |
| void | updateMoveableSignal () |
| Emitted to request an update of the moveable state. | |
| void | updateRoundedCorners () |
| Updates the rounded corner radii based on the current docking position. | |
Protected Member Functions | |
| virtual void | leaveEvent (QEvent *event) override |
| Handles the leave event when the mouse exits the tab. | |
| virtual void | mouseMoveEvent (QMouseEvent *ev) override |
| Handles mouse move events during tab dragging. | |
| virtual void | mousePressEvent (QMouseEvent *event) override |
| Handles mouse press events to initiate tab dragging. | |
| virtual void | mouseReleaseEvent (QMouseEvent *ev) override |
| Handles mouse release events to complete tab dragging or selection. | |
| void | receiveCloseButtonClicked () |
| Processes a close button click by emitting the closedSignal. | |
| void | receiveFullScreenButtonClicked () |
| Processes a fullscreen button click by emitting the fullscreenSignal. | |
Protected Attributes | |
| bool | m_active_tab |
| Whether this is the currently active tab. | |
| SectionContent * | m_content |
| The section content this tab represents. | |
| QPointF | m_drag_start_pos |
| The global position where a drag operation started. | |
| FloatingWidget * | m_floating_widget |
| The floating widget hosting this tab, if any. | |
| bool | m_is_fullscreen |
| Whether the associated content is in fullscreen mode. | |
| QPointF | m_local_drag_pos |
| The local position within the tab where the drag started. | |
| bool | m_tab_moving |
| Whether the tab is currently being dragged. | |
Provides a tab that is used for either a tab if the section content is attached to a Container, or as the drag bar if the content is floating.
Definition at line 47 of file SectionTab.h.
| SectionTab::SectionTab | ( | SectionContent * | content, |
| QWidget * | parent ) |
Constructs a SectionTab associated with the given section content and parent widget.
| [in] | content | The section content this tab represents. |
| [in] | parent | The parent widget. |
References SectionTab().
Referenced by SectionTab().
| void SectionTab::clickedSignal | ( | SectionContent * | content | ) |
Emitted when the tab is clicked.
| [in] | content | The section content associated with this tab. |
| void SectionTab::closableUpdated | ( | bool | is_closeable | ) |
Emitted when the closable state of this tab changes.
| [in] | is_closeable | True if the tab is now closable. |
| void SectionTab::closedSignal | ( | SectionContent * | content | ) |
Emitted when the tab's close action is triggered.
| [in] | content | The section content being closed. |
|
override |
Processes generic events such as style changes.
| [in] | event | The event to process. |
References event().
Referenced by event(), leaveEvent(), and mousePressEvent().
| void SectionTab::fullscreenSignal | ( | bool | fullscreen | ) |
Emitted when the fullscreen state is toggled.
| [in] | fullscreen | The new fullscreen state. |
| void SectionTab::fullscreenUpdated | ( | bool | is_fullscreen | ) |
Emitted when the fullscreen state of this tab changes.
| [in] | is_fullscreen | True if now in fullscreen mode. |
|
inlinevirtual |
Returns the icon displayed on this tab.
Reimplemented in SectionIconTab.
Definition at line 198 of file SectionTab.h.
|
virtual |
Returns the translated title text displayed on this tab.
Reimplemented in SectionIconTab.
| bool SectionTab::isActiveTab | ( | ) | const |
Returns whether this tab is currently the active (selected) tab.
|
virtual |
Returns whether this tab can be moved (dragged) by the user.
|
virtual |
Returns whether this tab is currently shown.
| void SectionTab::isShownUpdated | ( | bool | is_shown | ) |
Emitted when the shown state of this tab changes.
| [in] | is_shown | True if the tab is now shown. |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
Handles mouse move events during tab dragging.
| [in] | ev | The mouse move event. |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
Handles mouse release events to complete tab dragging or selection.
| [in] | ev | The mouse release event. |
| void SectionTab::moveableUpdated | ( | bool | is_moveable | ) |
Emitted when the moveable state of this tab changes.
| [in] | is_moveable | True if the tab is now moveable. |
| void SectionTab::setActiveTab | ( | bool | active | ) |
Sets whether this tab is the active (selected) tab.
| [in] | active | True to make this the active tab. |
|
pure virtual |
Sets whether this tab is in a docked state.
Pure virtual.
| [in] | is_docked | True if docked. |
Implemented in SectionIconTab.
|
virtual |
Assigns the floating widget that contains this tab when undocked.
| [in] | widget | The floating widget, or nullptr if not floating. |
Reimplemented in SectionIconTab.
|
virtual |
Sets whether the associated content is displayed in fullscreen mode.
| [in] | fullscreen | True if fullscreen. |
Reimplemented in SectionIconTab.
| void SectionTab::setIsShown | ( | bool | shown | ) |
Sets whether this tab should be shown or hidden.
| [in] | shown | True to show the tab. |
|
pure virtual |
Sets the layout location and docked state of this tab.
Pure virtual.
| [in] | area | The ribbon area where the tab is positioned. |
| [in] | is_docked | True if the tab is docked. |
Implemented in SectionIconTab.
| void SectionTab::setRoundedCorners | ( | int | radius_tl, |
| int | radius_tr, | ||
| int | radius_bl, | ||
| int | radius_br ) |
Sets the rounded corner radii for each corner of the tab.
| [in] | radius_tl | Top-left corner radius. |
| [in] | radius_tr | Top-right corner radius. |
| [in] | radius_bl | Bottom-left corner radius. |
| [in] | radius_br | Bottom-right corner radius. |
| void SectionTab::setSectionContent | ( | SectionContent * | content | ) |
Sets the section content associated with this tab.
| [in] | content | The section content to associate. |
|
pure virtual |
Sets the selected visual state of this tab.
Pure virtual.
| [in] | is_selected | True if selected. |
Implemented in SectionIconTab.