OpenXLSX 1.9.1
Loading...
Searching...
No Matches
OpenXLSX::XLChartsheet Class Referencefinal

Class representing an Excel chartsheet. More...

#include <XLChartsheet.hpp>

Inheritance diagram for OpenXLSX::XLChartsheet:
OpenXLSX::XLSheetBase< XLChartsheet > OpenXLSX::XLXmlFile

Public Member Functions

 XLChartsheet ()
 
 XLChartsheet (XLXmlData *xmlData)
 
 XLChartsheet (const XLChartsheet &other)=default
 
 XLChartsheet (XLChartsheet &&other) noexcept=default
 
 ~XLChartsheet ()
 
XLChartsheetoperator= (const XLChartsheet &other)=default
 
XLChartsheetoperator= (XLChartsheet &&other) noexcept=default
 
XLChart addChart (XLChartType type, std::string_view name)
 Add or replace the chart in this chartsheet.
 
XLDrawingdrawing ()
 Get the underlying drawing for this chartsheet.
 
XLRelationshipsrelationships ()
 
- Public Member Functions inherited from OpenXLSX::XLSheetBase< XLChartsheet >
 XLSheetBase ()
 Constructor.
 
 XLSheetBase (XLXmlData *xmlData)
 The constructor. There are no default constructor, so all parameters must be provided for constructing an XLAbstractSheet object. Since this is a pure abstract class, instantiation is only possible via one of the derived classes.
 
 XLSheetBase (const XLSheetBase &other)=default
 The copy constructor.
 
 XLSheetBase (XLSheetBase &&other) noexcept=default
 
 ~XLSheetBase ()=default
 The destructor.
 
XLSheetBaseoperator= (const XLSheetBase &)=default
 Assignment operator.
 
XLSheetBaseoperator= (XLSheetBase &&other) noexcept=default
 
XLSheetState visibility () const
 
void setVisibility (XLSheetState state)
 
XLColor color () const
 
void setColor (const XLColor &color)
 
uint16_t index () const
 look up sheet name via relationshipID, then attempt to match that to a sheet in XLWorkbook::sheet(uint16_t index), looping over index
 
void setIndex (uint16_t index)
 
std::string name () const
 Method to retrieve the name of the sheet.
 
void setName (const std::string &sheetName)
 Method for renaming the sheet.
 
bool isSelected () const
 
void setSelected (bool selected)
 
bool isActive () const
 
bool setActive ()
 
void clone (const std::string &newName)
 Method for cloning the sheet.
 
- Public Member Functions inherited from OpenXLSX::XLXmlFile
 XLXmlFile ()=default
 Default constructor.
 
std::string xmlData (XLXmlSavingDeclaration savingDeclaration=XLXmlSavingDeclaration{}) const
 Method for getting the XML data represented by the object.
 
 XLXmlFile (XLXmlData *xmlData)
 Constructor. Creates an object based on the xmlData input.
 
 XLXmlFile (const XLXmlFile &other)=default
 Copy constructor. Default implementation used.
 
 XLXmlFile (XLXmlFile &&other) noexcept=default
 Move constructor. Default implementation used.
 
 ~XLXmlFile ()=default
 Destructor. Default implementation used.
 
bool valid () const
 check whether class is linked to a valid XML file
 
XLXmlFileoperator= (const XLXmlFile &other)=default
 The copy assignment operator. The default implementation has been used.
 
XLXmlFileoperator= (XLXmlFile &&other) noexcept=default
 The move assignment operator. The default implementation has been used.
 
XLDocumentparentDoc ()
 This function provides access to the parent XLDocument object.
 
const XLDocumentparentDoc () const
 This function provides access to the parent XLDocument object.
 
XMLDocumentxmlDocument ()
 This function provides access to the underlying XMLDocument object.
 
const XMLDocumentxmlDocument () const
 This function provides access to the underlying XMLDocument object.
 
std::string getXmlPath () const
 Retrieve the path of the XML data in the .xlsx zip archive via m_xmlData->getXmlPath.
 

Friends

class XLSheetBase< XLChartsheet >
 

Additional Inherited Members

- Protected Member Functions inherited from OpenXLSX::XLXmlFile
void setXmlData (std::string_view xmlData)
 Provide the XML data represented by the object.
 
std::string relationshipID () const
 This function returns the relationship ID (the ID used in the XLRelationships objects) for the object.
 
- Protected Attributes inherited from OpenXLSX::XLXmlFile
XLXmlDatam_xmlData {nullptr}
 

Detailed Description

Class representing an Excel chartsheet.

Constructor & Destructor Documentation

◆ XLChartsheet() [1/4]

OpenXLSX::XLChartsheet::XLChartsheet ( )
inline

◆ XLChartsheet() [2/4]

XLChartsheet::XLChartsheet ( XLXmlData xmlData)
explicit

◆ XLChartsheet() [3/4]

OpenXLSX::XLChartsheet::XLChartsheet ( const XLChartsheet other)
default

◆ XLChartsheet() [4/4]

OpenXLSX::XLChartsheet::XLChartsheet ( XLChartsheet &&  other)
defaultnoexcept

◆ ~XLChartsheet()

XLChartsheet::~XLChartsheet ( )
default

Member Function Documentation

◆ addChart()

XLChart XLChartsheet::addChart ( XLChartType  type,
std::string_view  name 
)

Add or replace the chart in this chartsheet.

Parameters
typeThe type of chart to create
nameThe name of the chart object
Returns
The created XLChart object

◆ drawing()

XLDrawing & XLChartsheet::drawing ( )

Get the underlying drawing for this chartsheet.

◆ operator=() [1/2]

XLChartsheet & OpenXLSX::XLChartsheet::operator= ( const XLChartsheet other)
default

◆ operator=() [2/2]

XLChartsheet & OpenXLSX::XLChartsheet::operator= ( XLChartsheet &&  other)
defaultnoexcept

◆ relationships()

XLRelationships & XLChartsheet::relationships ( )

Friends And Related Symbol Documentation

◆ XLSheetBase< XLChartsheet >

friend class XLSheetBase< XLChartsheet >
friend

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