34#include <NDEVR/RibbonArea.h>
36#include <NDEVR/UUID.h>
37#include <NDEVR/TranslatedString.h>
55 class NDEVR_WIDGETS_API
DockItem :
public QObject
virtual void initialize()
Initializes the dock item after construction, setting up internal state.
bool isMovable() const
Checks whether this dock item can be moved by the user.
void setShowTab(bool show_tab)
Sets whether the tab for this dock item is shown.
bool m_use_tab_title
Whether the tab title is used for display.
QPointer< ContainerWidgetBase > m_container
The container widget that owns this dock item.
SectionWidget * m_original_section
The section widget this item was originally docked in.
virtual void setUseTabTitle(bool use_tab_title)
Sets whether the tab title should be used for display.
bool m_show_tab
Whether the tab for this dock item is shown.
DockItem(ContainerWidgetBase *container=nullptr)
Constructs a DockItem with an optional container.
std::function< void(PopupInfo)> m_settings_callback
Callback invoked when the settings action is triggered.
bool isWindowable() const
Checks whether this dock item can be detached into a floating window.
void setDockArea(DropArea drop_area, SectionWidget *section)
Sets the drop area and target section for docking this item.
TranslatedString m_title
The translated display title.
void setHidable(bool hidable)
Sets whether this dock item can be hidden by the user.
SectionIconTab * titleWidget() const
Returns the icon/title tab widget associated with this dock item.
void setMoveable(bool movable)
Sets whether this dock item can be moved by the user.
SectionWidget * section() const
Returns the section widget that currently contains this dock item.
virtual void createSectionContent()
Creates the SectionContent used to represent this dock item in the docking system.
UUID m_uuid
The unique identifier for this dock item.
virtual void setContainer(ContainerWidgetBase *container)
Sets the container widget that owns this dock item.
DockItem(RibbonArea ribbon_area, ContainerWidgetBase *container=nullptr)
Constructs a DockItem with a preferred ribbon area and optional container.
String m_icon_id
The icon resource identifier string.
bool m_is_movable
Whether the user can move this dock item.
void setRibbonArea(RibbonArea ribbon_area)
Sets the preferred ribbon area for this dock item.
SectionContent * m_section_content
The section content representing this dock item.
void setSettingsCallback(const std::function< void(PopupInfo)> &callback)
Sets the callback invoked when the settings action is triggered.
void setClosable(bool closable)
Sets whether this dock item can be closed by the user.
virtual void setIcon(const QIcon &icon)
Sets the icon displayed on this dock item's tab.
virtual const TranslatedString & title() const
Returns the display title of this dock item.
void moveTabToEnd()
Moves this dock item's tab to the end of the tab bar.
bool isDockVisible() const
Checks whether this dock item is currently visible in its dock.
bool isHidable() const
Checks whether this dock item can be hidden by the user.
SectionIconTab * m_icon_title
The icon/title tab widget for this dock item.
bool useTabTitle() const
Checks whether the tab title is used for display.
bool m_is_hidable
Whether the user can hide this dock item.
bool showTab() const
Checks whether the tab for this dock item is shown.
void moveTabToStart()
Moves this dock item's tab to the start of the tab bar.
virtual void setTitle(const TranslatedString &title)
Sets the display title for this dock item.
void setWindowable(bool hidable)
Sets whether this dock item can be detached into a floating window.
QIcon m_icon
The QIcon displayed on this dock item's tab.
bool m_is_windowable
Whether the user can detach this item into a floating window.
RibbonArea m_preferred_ribbon_area
The preferred ribbon area for this dock item.
bool m_is_closable
Whether the user can close this dock item.
bool isDocked() const
Checks whether this dock item is currently docked in a section.
ContainerWidgetBase * container() const
Returns the container widget that owns this dock item.
virtual void swapWith(DockItem *other_widget)
Swaps this dock item's position and section with another dock item.
virtual void setDockSelected(bool selected)
Sets whether this dock item is visually selected.
virtual void setIconID(const StringView &icon)
Sets the icon by resource identifier string.
bool isDockSelected() const
Checks whether this dock item is currently selected.
std::function< void(PopupInfo)> settingsCallback()
Returns the callback invoked when the settings action is triggered.
FloatingWidget * floatingWidget() const
Returns the floating widget if this dock item is currently floating.
void setTabFlat(bool flat)
Sets whether the tab for this dock item should have a flat appearance.
bool m_is_selected
Whether this dock item is currently selected.
bool isClosable() const
Checks whether this dock item can be closed by the user.
The core container for objects using the NDEVR API Widget Docking system.
Provides a tab that contains an icon and some buttons used for either a tab if the section content is...
The core String View class for the NDEVR API.
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...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
The primary namespace for the NDEVR SDK.
DropArea
relates where a widget should be dropped relative to another.
RibbonArea
Requests a ribbon or tab area to be in a certain location and orientation relative to another widget.