OpenXLSX 1.10.0
Loading...
Searching...
No Matches
OpenXLSX::XLSlicerBuilder Class Reference

#include <XLSlicerCollection.hpp>

Public Member Functions

 XLSlicerBuilder (XLWorksheet *worksheet, std::string cellRef, const XLTable *table, const XLPivotTable *pivot, std::string columnName)
 
 ~XLSlicerBuilder ()
 
 XLSlicerBuilder (const XLSlicerBuilder &)=delete
 
XLSlicerBuilderoperator= (const XLSlicerBuilder &)=delete
 
 XLSlicerBuilder (XLSlicerBuilder &&) noexcept
 
XLSlicerBuilderoperator= (XLSlicerBuilder &&)=delete
 
XLSlicerBuildername (std::string_view n)
 Override the slicer's internal unique name (defaults to columnName).
 
XLSlicerBuildercaption (std::string_view c)
 Set the visible header caption (defaults to columnName).
 
XLSlicerBuilderstyle (XLSlicerStyle s)
 Set style via strongly-typed enum.
 
XLSlicerBuilderstyleRaw (std::string_view rawName)
 Set style via raw Excel style string.
 
XLSlicerBuildersize (uint32_t widthPx, uint32_t heightPx)
 Set size in pixels.
 
XLSlicerBuildershowOnly (const std::vector< std::string > &items)
 Pre-select only these items (hide all others).
 
XLSlicerBuildercolumnCount (int cols)
 Set number of button columns in the slicer panel.
 
XLSlicerBuildersortDescending (bool desc=true)
 Sort items descending (Z→A). Default: ascending.
 
XLSlicerBuilderlockedPosition (bool locked=true)
 Lock the slicer position so it can't be moved interactively.
 
XLSlicerBuilderoffset (int32_t dx, int32_t dy)
 Pixel offset from anchor cell (fine-grained positioning).
 
XLSlicer build ()
 
 operator XLSlicer ()
 Implicit conversion — allows: XLSlicer s = wks.slicers().add(...).caption("x");.
 

Constructor & Destructor Documentation

◆ XLSlicerBuilder() [1/3]

XLSlicerBuilder::XLSlicerBuilder ( XLWorksheet worksheet,
std::string  cellRef,
const XLTable table,
const XLPivotTable pivot,
std::string  columnName 
)

◆ ~XLSlicerBuilder()

XLSlicerBuilder::~XLSlicerBuilder ( )

◆ XLSlicerBuilder() [2/3]

OpenXLSX::XLSlicerBuilder::XLSlicerBuilder ( const XLSlicerBuilder )
delete

◆ XLSlicerBuilder() [3/3]

XLSlicerBuilder::XLSlicerBuilder ( XLSlicerBuilder &&  other)
noexcept

Member Function Documentation

◆ build()

XLSlicer XLSlicerBuilder::build ( )

Explicitly commit and return the resulting XLSlicer handle. After this call, destruction is a no-op.

◆ caption()

XLSlicerBuilder & XLSlicerBuilder::caption ( std::string_view  c)

Set the visible header caption (defaults to columnName).

◆ columnCount()

XLSlicerBuilder & XLSlicerBuilder::columnCount ( int  cols)

Set number of button columns in the slicer panel.

◆ lockedPosition()

XLSlicerBuilder & XLSlicerBuilder::lockedPosition ( bool  locked = true)

Lock the slicer position so it can't be moved interactively.

◆ name()

XLSlicerBuilder & XLSlicerBuilder::name ( std::string_view  n)

Override the slicer's internal unique name (defaults to columnName).

◆ offset()

XLSlicerBuilder & XLSlicerBuilder::offset ( int32_t  dx,
int32_t  dy 
)

Pixel offset from anchor cell (fine-grained positioning).

◆ operator XLSlicer()

XLSlicerBuilder::operator XLSlicer ( )

Implicit conversion — allows: XLSlicer s = wks.slicers().add(...).caption("x");.

◆ operator=() [1/2]

XLSlicerBuilder & OpenXLSX::XLSlicerBuilder::operator= ( const XLSlicerBuilder )
delete

◆ operator=() [2/2]

XLSlicerBuilder & OpenXLSX::XLSlicerBuilder::operator= ( XLSlicerBuilder &&  )
delete

◆ showOnly()

XLSlicerBuilder & XLSlicerBuilder::showOnly ( const std::vector< std::string > &  items)

Pre-select only these items (hide all others).

◆ size()

XLSlicerBuilder & XLSlicerBuilder::size ( uint32_t  widthPx,
uint32_t  heightPx 
)

Set size in pixels.

◆ sortDescending()

XLSlicerBuilder & XLSlicerBuilder::sortDescending ( bool  desc = true)

Sort items descending (Z→A). Default: ascending.

◆ style()

XLSlicerBuilder & XLSlicerBuilder::style ( XLSlicerStyle  s)

Set style via strongly-typed enum.

◆ styleRaw()

XLSlicerBuilder & XLSlicerBuilder::styleRaw ( std::string_view  rawName)

Set style via raw Excel style string.


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