![]() |
NDEVR
API Documentation
|
A splitter lets the user control the size of 2 child widgets by dragging the boundary between them. More...
Public Member Functions | |
| QCustomSplitter (Qt::Orientation orientation, QWidget *parent=nullptr) | |
| Constructs a splitter with the specified orientation. | |
| QCustomSplitter (QWidget *parent=nullptr) | |
| Constructs a splitter with default orientation. | |
| int | availableSize () const |
| Returns the available space for child widgets, excluding splitter handle widths. | |
| void | childEvent (QChildEvent *c) override |
| Handles child widget add and remove events, temporarily hiding and re-showing the splitter on removal to avoid layout artifacts. | |
| bool | event (QEvent *e) override |
| Handles events, optionally blocking them during visibility toggling to prevent recursive layout issues. | |
| bool | eventFilter (QObject *object, QEvent *event) override |
| Filters events for child widgets, refreshing sizes on layout requests. | |
| QSize | minimumSizeHint () const override |
| Returns a minimal size hint to allow the splitter to be as small as possible. | |
| void | refreshSizes () |
| Recalculates and applies proportional sizes for all child widgets based on their size hints and the available space. | |
| void | refreshSizes (int offset) |
| Recalculates and applies proportional sizes for all child widgets with an additional offset applied to each widget size. | |
| void | setAnimating (bool animating) |
| Sets whether the splitter is currently in an animation state. | |
| sint04 | sizeIfAdded (sint04 preferred_size, sint04 min_size, sint04 current_size) const |
| Calculates the size a widget would be given if added to the splitter, accounting for proportional scaling of all children. | |
| fltp08 | sizeMultiple () |
| Calculates the ratio of the total preferred size of all child widgets to the available splitter space. | |
Public Attributes | |
| bool | m_block_events = false |
| Whether to block events during visibility toggling. | |
| bool | m_is_animating = false |
| Whether the splitter is currently in an animation state. | |
A splitter lets the user control the size of 2 child widgets by dragging the boundary between them.
Definition at line 44 of file QCustomSplitter.h.
|
inlineexplicit |
Constructs a splitter with default orientation.
| [in] | parent | The parent widget, or nullptr for no parent. |
Definition at line 52 of file QCustomSplitter.h.
References m_is_animating.
|
inlineexplicit |
Constructs a splitter with the specified orientation.
| [in] | orientation | The orientation of the splitter (horizontal or vertical). |
| [in] | parent | The parent widget, or nullptr for no parent. |
Definition at line 61 of file QCustomSplitter.h.
References m_is_animating.
|
inline |
Returns the available space for child widgets, excluding splitter handle widths.
Definition at line 102 of file QCustomSplitter.h.
Referenced by refreshSizes(), sizeIfAdded(), and sizeMultiple().
|
inlineoverride |
Handles child widget add and remove events, temporarily hiding and re-showing the splitter on removal to avoid layout artifacts.
| [in] | c | The child event to process. |
Definition at line 255 of file QCustomSplitter.h.
References m_block_events.
|
inlineoverride |
Handles events, optionally blocking them during visibility toggling to prevent recursive layout issues.
| [in] | e | The event to handle. |
Definition at line 243 of file QCustomSplitter.h.
References m_block_events.
Referenced by eventFilter().
|
inlineoverride |
Filters events for child widgets, refreshing sizes on layout requests.
| [in] | object | The object that generated the event. |
| [in] | event | The event to filter. |
Definition at line 157 of file QCustomSplitter.h.
References event(), and refreshSizes().
|
inlineoverride |
Returns a minimal size hint to allow the splitter to be as small as possible.
Definition at line 147 of file QCustomSplitter.h.
|
inline |
Recalculates and applies proportional sizes for all child widgets with an additional offset applied to each widget size.
| [in] | offset | The pixel offset to add to each child widget size. |
Definition at line 210 of file QCustomSplitter.h.
References availableSize(), cast(), and getMax().
|
inline |
Sets whether the splitter is currently in an animation state.
When animation ends, sizes are refreshed automatically.
| [in] | animating | True if the splitter is animating, false otherwise. |
Definition at line 73 of file QCustomSplitter.h.
References m_is_animating, and refreshSizes().
|
inline |
Calculates the size a widget would be given if added to the splitter, accounting for proportional scaling of all children.
| [in] | preferred_size | The preferred size of the widget to add. |
| [in] | min_size | The minimum acceptable size of the widget. |
| [in] | current_size | The current size of the widget being replaced or resized. |
Definition at line 116 of file QCustomSplitter.h.
References availableSize(), cast(), and getMax().
|
inline |
Calculates the ratio of the total preferred size of all child widgets to the available splitter space.
Definition at line 86 of file QCustomSplitter.h.
References availableSize(), and cast().