34#include <NDEVR/RibbonArea.h>
35#include <NDEVR/SectionTab.h>
39class QPropertyAnimation;
40class QGraphicsOpacityEffect;
The root class that allows interface with the NDEVR API Widget Docking system.
A widget that shows a raster image or icon.
Displays translated text.
The core container for objects using the NDEVR API Widget Docking system.
void updateFullscreenButton()
Updates the visibility and state of the fullscreen button.
bool isDocked()
Returns whether this tab is currently in a docked state.
void updateClosedButton()
Updates the visibility and state of the close button.
virtual TranslatedString getTitle() const override
Returns the translated title text displayed on this tab.
QPropertyAnimation * m_color_animation
Animation for background color transitions.
void updateMovable()
Updates the movable state of the tab based on the current section configuration.
void setIcon(const QIcon &icon)
Sets the icon displayed on this tab.
void updateOpacity()
Updates the opacity effect based on the tab's active and hover state.
Button * m_settings_button
Button to access settings for the section content.
void onVisible(bool is_visible)
Slot called when the visibility of the associated content changes.
void setFullscreen(bool fullscreen) override
Sets whether this tab is displayed in fullscreen mode.
void updateShowTab()
Updates the visibility of the tab based on the current section configuration.
QGraphicsOpacityEffect * m_opacity_effect
Opacity effect for inactive tab dimming.
void updateBackgroundColor()
Updates the background color based on the current selection and hover state.
SectionIconTab(SectionContent *content, DockItem *widget)
Constructs a SectionIconTab for the given section content and dock item.
void mouseDoubleClickEvent(QMouseEvent *e) override
Handles double-click events on the tab, typically toggling fullscreen.
void setFloatingWidget(FloatingWidget *widget) override
Assigns the floating widget that this tab is part of.
void updateIconSizes()
Updates the icon and button sizes based on the current tab dimensions.
QCustomLabel * m_title_label
The label displaying the tab title text.
bool m_is_hovering
Whether the mouse cursor is hovering over this tab.
QPalette::ColorRole preferredColorRoll() const
Returns the preferred palette color role for this tab's background.
void setFlat(bool flat)
Sets whether the tab should render with a flat visual style.
void paintEvent(QPaintEvent *) override
Paints the tab including its background color and rounded corners.
QSize sizeHint() const override
Returns the recommended size for this tab widget.
bool event(QEvent *event) override
Handles generic events such as palette changes and hover tracking.
void setIconID(const String &icon)
Sets the icon by its resource identifier string.
QSize minimumSizeHint() const override
Returns the minimum recommended size for this tab widget.
QIcon getIcon() const override
Returns the icon displayed on this tab.
Button * m_close_button
Button to close the associated section content.
void setLocation(RibbonArea area, bool is_docked) override
Updates the tab layout and appearance based on its dock location.
void resizeEvent(QResizeEvent *event) override
Handles resize events to update icon sizes and layout.
DockItem * m_widget
The dock item that owns this tab.
bool m_is_selected
Whether this tab is currently selected.
void contextMenu(const QPoint &point)
Shows a context menu at the given position.
bool m_is_flat
Whether the tab uses a flat visual style.
ImageView * m_icon_label
The label displaying the tab icon.
void setTitle(const TranslatedString &title)
Sets the title text displayed on this tab.
QColor backgroundColor()
Returns the current background color of this tab.
void init()
Initializes the tab's UI elements including icon, title, and action buttons.
void setDocked(bool is_docked) override
Sets whether this tab is in a docked state.
bool m_is_docked
Whether this tab is currently docked.
void updateSettingsButton()
Updates the visibility and state of the settings button.
Button * m_fullscreen_button
Button to toggle fullscreen mode.
RibbonArea m_ribbon_area
The ribbon area where this tab is located.
void setBackgroundColor(QColor color)
Sets the background color of this tab.
void setSelected(bool is_selected) override
Sets the selected state of this tab.
void updateRoundedCorners()
Updates the rounded corner radii based on the tab's docking position.
SectionTab(SectionContent *content, QWidget *parent)
Constructs a SectionTab associated with the given section content and parent widget.
The core String class for the NDEVR API.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
The primary namespace for the NDEVR SDK.
RibbonArea
Requests a ribbon or tab area to be in a certain location and orientation relative to another widget.