NDEVR
API Documentation
SectionContent

The core container for objects using the NDEVR API Widget Docking system. More...

Inheritance diagram for SectionContent:
[legend]
Collaboration diagram for SectionContent:
[legend]

Public Member Functions

 SectionContent (ContainerWidgetBase *container, SectionTab *title, const std::function< void(SectionContent *)> &function, RibbonArea preferred_ribbon_area)
 Constructs a SectionContent with a deferred creation callback instead of an immediate widget.
 SectionContent (ContainerWidgetBase *container, SectionTab *title, QWidget *content, RibbonArea preferred_ribbon_area)
 Constructs a SectionContent with the given container, title tab, content widget, and ribbon area.
bool allowAutoHideTitle () const
 Returns whether the title bar can be automatically hidden when not needed.
bool allowHide () const
 Returns whether this section content is allowed to be hidden by the user.
void autoHideTitleChangedSignal (bool allow_hide)
 Emitted when the auto-hide title setting changes.
ContainerWidgetBase * containerWidget () const
 Returns the container widget that owns this section content.
QWidget * contentWidget () const
 Returns the widget displaying the actual content.
FloatingWidgetfloatingWidget () const
 Returns the floating widget currently hosting this content, if any.
bool hasSpecialCallback () const
 Checks whether a special callback has been set for this content.
void onCheckedClick () override
 Called when the associated button dialog is checked or clicked.
RibbonArea preferredRibbonArea () const
 Returns the preferred ribbon area for docking this content.
void retranslate ()
 Retranslates all user-facing strings for this section content.
void runSpecialCallback ()
 Executes the special callback function, passing this content as the argument.
SectionTabsectionTab () const
 Returns the section tab associated with this content.
SectionWidgetsectionWidget () const
 Returns the section widget currently hosting this content, if any.
void setAllowAutoHideTitle (bool allow_hide)
 Sets whether the title bar can be automatically hidden when not needed.
void setAllowHide (bool allow_hide)
 Sets whether this section content is allowed to be hidden by the user.
void setContainer (ContainerWidgetBase *container)
 Sets the parent container widget for this content.
void setContentWidget (QWidget *widget)
 Sets the widget displaying the actual content.
void setFloatingWidget (FloatingWidget *widget)
 Sets the floating widget that currently hosts this content.
void setPreferredRibbonArea (RibbonArea area)
 Sets the preferred ribbon area for docking this content.
void setSectionWidget (SectionWidget *widget)
 Sets the section widget that currently hosts this content.
void setSpecialCallback (const std::function< void(SectionContent *)> &callback)
 Sets a special callback function to be invoked for deferred content creation.
void setTitle (const TranslatedString &title)
 Sets the display title of this section content.
const std::function< void(SectionContent *)> & specialCallback ()
 Returns the special callback function, if one has been set.
const TranslatedStringtitle () const
 Returns the display title of this section content.
UUID uid () const
 Returns the unique identifier for this section content.
Public Member Functions inherited from ButtonDialog
virtual ~ButtonDialog ()
 Virtual destructor.
virtual void addButton (Button *button)
 Adds a button that controls the visibility of the dialog.
PopupInfo buttonDialogBestPopupInfo () const
 Returns the best PopupInfo configuration based on the last pressed button's position.
virtual void removeButton (Button *button)
 Removes a previously associated button.
virtual void setButtonsChecked (bool check)
 Sets the checked state of all associated buttons.

Additional Inherited Members

Protected Attributes inherited from ButtonDialog
Buffer< QPointer< Button > > m_buttons
 All buttons associated with this dialog.
QPointer< Buttonm_last_pressed
 The most recently pressed button, used for popup positioning.
bool m_should_be_checked = false
 Whether the associated buttons should be in the checked state.

Detailed Description

The core container for objects using the NDEVR API Widget Docking system.


Contains information used to correctly display the content.

Definition at line 52 of file SectionContent.h.

Constructor & Destructor Documentation

◆ SectionContent() [1/2]

SectionContent::SectionContent ( ContainerWidgetBase * container,
SectionTab * title,
QWidget * content,
RibbonArea preferred_ribbon_area )

Constructs a SectionContent with the given container, title tab, content widget, and ribbon area.

Parameters
[in]containerThe parent container widget that owns this content.
[in]titleThe tab widget used for the title of this section.
[in]contentThe widget displaying the actual content.
[in]preferred_ribbon_areaThe preferred docking area for this content.

References title().

◆ SectionContent() [2/2]

SectionContent::SectionContent ( ContainerWidgetBase * container,
SectionTab * title,
const std::function< void(SectionContent *)> & function,
RibbonArea preferred_ribbon_area )

Constructs a SectionContent with a deferred creation callback instead of an immediate widget.

Parameters
[in]containerThe parent container widget that owns this content.
[in]titleThe tab widget used for the title of this section.
[in]functionA callback invoked to lazily create the content widget.
[in]preferred_ribbon_areaThe preferred docking area for this content.

References title().

Member Function Documentation

◆ allowAutoHideTitle()

bool SectionContent::allowAutoHideTitle ( ) const
inline

Returns whether the title bar can be automatically hidden when not needed.

Returns
True if auto-hiding the title bar is allowed.

Definition at line 190 of file SectionContent.h.

◆ allowHide()

bool SectionContent::allowHide ( ) const
inline

Returns whether this section content is allowed to be hidden by the user.

Returns
True if hiding is allowed.

Definition at line 180 of file SectionContent.h.

◆ autoHideTitleChangedSignal()

void SectionContent::autoHideTitleChangedSignal ( bool allow_hide)

Emitted when the auto-hide title setting changes.

Parameters
[in]allow_hideThe new auto-hide title state.

Referenced by setAllowAutoHideTitle().

◆ containerWidget()

ContainerWidgetBase * SectionContent::containerWidget ( ) const

Returns the container widget that owns this section content.

Returns
A pointer to the container widget.

◆ contentWidget()

QWidget * SectionContent::contentWidget ( ) const

Returns the widget displaying the actual content.

Returns
A pointer to the content widget.

◆ floatingWidget()

FloatingWidget * SectionContent::floatingWidget ( ) const
inline

Returns the floating widget currently hosting this content, if any.

Returns
A pointer to the floating widget, or nullptr if not floating.

Definition at line 116 of file SectionContent.h.

◆ hasSpecialCallback()

bool SectionContent::hasSpecialCallback ( ) const
inline

Checks whether a special callback has been set for this content.

Returns
True if a special callback exists.

Definition at line 161 of file SectionContent.h.

◆ preferredRibbonArea()

RibbonArea SectionContent::preferredRibbonArea ( ) const
inline

Returns the preferred ribbon area for docking this content.

Returns
The preferred RibbonArea.

Definition at line 146 of file SectionContent.h.

◆ sectionTab()

SectionTab * SectionContent::sectionTab ( ) const

Returns the section tab associated with this content.

Returns
A pointer to the section tab widget.

◆ sectionWidget()

SectionWidget * SectionContent::sectionWidget ( ) const
inline

Returns the section widget currently hosting this content, if any.

Returns
A pointer to the section widget, or nullptr if not docked in one.

Definition at line 111 of file SectionContent.h.

◆ setAllowAutoHideTitle()

void SectionContent::setAllowAutoHideTitle ( bool allow_hide)
inline

Sets whether the title bar can be automatically hidden when not needed.

Parameters
[in]allow_hideTrue to allow auto-hiding the title bar.

Definition at line 185 of file SectionContent.h.

References autoHideTitleChangedSignal().

◆ setAllowHide()

void SectionContent::setAllowHide ( bool allow_hide)
inline

Sets whether this section content is allowed to be hidden by the user.

Parameters
[in]allow_hideTrue to allow hiding, false to prevent it.

Definition at line 175 of file SectionContent.h.

◆ setContainer()

void SectionContent::setContainer ( ContainerWidgetBase * container)

Sets the parent container widget for this content.

Parameters
[in]containerThe container widget to assign.

◆ setContentWidget()

void SectionContent::setContentWidget ( QWidget * widget)

Sets the widget displaying the actual content.

Parameters
[in]widgetThe content widget to assign.

◆ setFloatingWidget()

void SectionContent::setFloatingWidget ( FloatingWidget * widget)

Sets the floating widget that currently hosts this content.

Parameters
[in]widgetThe floating widget to assign.

◆ setPreferredRibbonArea()

void SectionContent::setPreferredRibbonArea ( RibbonArea area)

Sets the preferred ribbon area for docking this content.

Parameters
[in]areaThe preferred ribbon area to set.

◆ setSectionWidget()

void SectionContent::setSectionWidget ( SectionWidget * widget)

Sets the section widget that currently hosts this content.

Parameters
[in]widgetThe section widget to assign.

◆ setSpecialCallback()

void SectionContent::setSpecialCallback ( const std::function< void(SectionContent *)> & callback)
inline

Sets a special callback function to be invoked for deferred content creation.

Parameters
[in]callbackThe callback function to assign.

Definition at line 166 of file SectionContent.h.

◆ setTitle()

void SectionContent::setTitle ( const TranslatedString & title)
inline

Sets the display title of this section content.

Parameters
[in]titleThe translated title string to set.

Definition at line 106 of file SectionContent.h.

References title().

◆ specialCallback()

const std::function< void(SectionContent *)> & SectionContent::specialCallback ( )
inline

Returns the special callback function, if one has been set.

Returns
A reference to the special callback function.

Definition at line 156 of file SectionContent.h.

◆ title()

const TranslatedString & SectionContent::title ( ) const
inline

Returns the display title of this section content.

Returns
A reference to the translated title string.

Definition at line 101 of file SectionContent.h.

Referenced by SectionContent(), SectionContent(), and setTitle().

◆ uid()

UUID SectionContent::uid ( ) const

Returns the unique identifier for this section content.

Returns
The UUID of this section content.

The documentation for this class was generated from the following file: