|
OpenXLSX 1.10.0
|
#include <XLSlicer.hpp>
Public Member Functions | |
| XLSlicer ()=default | |
| XLSlicer (XLXmlData *slicerXml) | |
| Minimal constructor: wraps only the slicer XML (legacy compat). | |
| XLSlicer (XLXmlData *slicerXml, XMLNode slicerNode, XLXmlData *cacheXml, XMLNode anchorNode, XLWorksheet *worksheet) | |
| Full three-source constructor used by XLSlicerCollection. | |
| XLSlicer (const XLSlicer &)=default | |
| XLSlicer (XLSlicer &&) noexcept=default | |
| XLSlicer & | operator= (const XLSlicer &)=default |
| XLSlicer & | operator= (XLSlicer &&)=default |
| ~XLSlicer ()=default | |
| bool | valid () const |
| operator bool () const | |
| std::string | name () const |
| std::string | caption () const |
| std::string | cache () const |
| Cache name (e.g. "Slicer_Region") | |
| XLSlicerStyle | style () const |
| std::string | styleRaw () const |
| Raw style string. | |
| bool | showCaption () const |
| int | columnCount () const |
| Button columns (0 = unset → 1) | |
| bool | lockedPosition () const |
| int | rowHeight () const |
| EMU per item row (0 = unset) | |
| void | setName (std::string_view name) |
| XLSlicer & | setCaption (std::string_view caption) |
| XLSlicer & | setStyle (XLSlicerStyle style) |
| XLSlicer & | setStyleRaw (std::string_view rawStyleName) |
| Arbitrary style string. | |
| XLSlicer & | setShowCaption (bool show) |
| XLSlicer & | setColumnCount (int cols) |
| Multi-column slicer layout. | |
| XLSlicer & | setLockedPosition (bool locked) |
| XLSlicer & | setRowHeight (int emuHeight) |
| Raw EMU, 251883 ≈ 20 px. | |
| std::vector< std::string > | items () const |
| All available items in the slicer (read from pivot/table data). | |
| std::vector< std::string > | selectedItems () const |
| Items that are currently SELECTED (shown, not filtered out). | |
| bool | isSortDescending () const |
| True if items are sorted descending (Z→A). | |
| XLSlicer & | showOnly (const std::vector< std::string > &itemsToShow) |
| Keep ONLY the listed items visible; hide all others. | |
| XLSlicer & | showAll () |
| Clear all filters — show every item. | |
| XLSlicer & | hideItems (const std::vector< std::string > &itemsToHide) |
| Hide the listed items (keep everything else visible). | |
| XLSlicer & | setSortDescending (bool desc) |
| Set sort direction. | |
| std::string | cellRef () const |
| Top-left anchor cell reference, e.g. "E2". Empty if anchor unknown. | |
| uint32_t | width () const |
| Width in pixels (converted from EMU, 0 if anchor unknown). | |
| uint32_t | height () const |
| Height in pixels (converted from EMU, 0 if anchor unknown). | |
| XLSlicer & | moveTo (std::string_view cellRef) |
| Move the slicer anchor to a new cell (updates drawing XML). | |
| XLSlicer & | resize (uint32_t widthPx, uint32_t heightPx) |
| Resize the slicer (updates drawing XML, pixels). | |
| XLXmlData * | slicerXml () const |
| XLXmlData * | cacheXml () const |
|
default |
|
explicit |
Minimal constructor: wraps only the slicer XML (legacy compat).
| XLSlicer::XLSlicer | ( | XLXmlData * | slicerXml, |
| XMLNode | slicerNode, | ||
| XLXmlData * | cacheXml, | ||
| XMLNode | anchorNode, | ||
| XLWorksheet * | worksheet | ||
| ) |
Full three-source constructor used by XLSlicerCollection.
|
default |
|
defaultnoexcept |
|
default |
| std::string XLSlicer::cache | ( | ) | const |
Cache name (e.g. "Slicer_Region")
|
inline |
| std::string XLSlicer::caption | ( | ) | const |
| std::string XLSlicer::cellRef | ( | ) | const |
Top-left anchor cell reference, e.g. "E2". Empty if anchor unknown.
| int XLSlicer::columnCount | ( | ) | const |
Button columns (0 = unset → 1)
| uint32_t XLSlicer::height | ( | ) | const |
Height in pixels (converted from EMU, 0 if anchor unknown).
| XLSlicer & XLSlicer::hideItems | ( | const std::vector< std::string > & | itemsToHide | ) |
Hide the listed items (keep everything else visible).
| bool XLSlicer::isSortDescending | ( | ) | const |
True if items are sorted descending (Z→A).
| std::vector< std::string > XLSlicer::items | ( | ) | const |
All available items in the slicer (read from pivot/table data).
| bool XLSlicer::lockedPosition | ( | ) | const |
| XLSlicer & XLSlicer::moveTo | ( | std::string_view | cellRef | ) |
Move the slicer anchor to a new cell (updates drawing XML).
| std::string XLSlicer::name | ( | ) | const |
|
inlineexplicit |
| XLSlicer & XLSlicer::resize | ( | uint32_t | widthPx, |
| uint32_t | heightPx | ||
| ) |
Resize the slicer (updates drawing XML, pixels).
| int XLSlicer::rowHeight | ( | ) | const |
EMU per item row (0 = unset)
| std::vector< std::string > XLSlicer::selectedItems | ( | ) | const |
Items that are currently SELECTED (shown, not filtered out).
| XLSlicer & XLSlicer::setCaption | ( | std::string_view | caption | ) |
| XLSlicer & XLSlicer::setColumnCount | ( | int | cols | ) |
Multi-column slicer layout.
| XLSlicer & XLSlicer::setLockedPosition | ( | bool | locked | ) |
| void XLSlicer::setName | ( | std::string_view | name | ) |
| XLSlicer & XLSlicer::setRowHeight | ( | int | emuHeight | ) |
Raw EMU, 251883 ≈ 20 px.
| XLSlicer & XLSlicer::setShowCaption | ( | bool | show | ) |
| XLSlicer & XLSlicer::setSortDescending | ( | bool | desc | ) |
Set sort direction.
| XLSlicer & XLSlicer::setStyle | ( | XLSlicerStyle | style | ) |
| XLSlicer & XLSlicer::setStyleRaw | ( | std::string_view | rawStyleName | ) |
Arbitrary style string.
| XLSlicer & XLSlicer::showAll | ( | ) |
Clear all filters — show every item.
| bool XLSlicer::showCaption | ( | ) | const |
| XLSlicer & XLSlicer::showOnly | ( | const std::vector< std::string > & | itemsToShow | ) |
Keep ONLY the listed items visible; hide all others.
|
inline |
| XLSlicerStyle XLSlicer::style | ( | ) | const |
| std::string XLSlicer::styleRaw | ( | ) | const |
Raw style string.
|
inline |
| uint32_t XLSlicer::width | ( | ) | const |
Width in pixels (converted from EMU, 0 if anchor unknown).