Sheet Class
| Header: | #include <Sheet> |
| Inherits: | ExcelObject |
Public Functions
- 31 public functions inherited from QObject
Public Slots
| void | addDataValidation(const QString &type, const QString &op, int rowFirst, int rowLast, int colFirst, int colLast, const QString &value1, const QString &value2 = QString(), bool allowBlank = true, bool hideDropDown = false, bool showInputMessage = false, bool showErrorMessage = true) |
| void | addDataValidationDouble(const QString &type, const QString &op, int rowFirst, int rowLast, int colFirst, int colLast, double value1, double value2, bool allowBlank = true, bool hideDropDown = false, bool showInputMessage = false, bool showErrorMessage = true) |
| void | addHyperlink(const QString &hyperlink, int rowFirst, int rowLast, int colFirst, int colLast) |
| Range * | addRange(int rowFirst, int rowLast, int colFirst, int colLast) |
| QVariantMap | addrToRowCol(const QString &addr) |
| bool | clear(int rowFirst = 0, int rowLast = 1048575, int colFirst = 0, int colLast = 16383) |
| void | clearPrintArea() |
| bool | copyCell(int srcRow, int srcCol, int dstRow, int dstCol) |
| Range * | copyRange(const Range *srcRange, int dstRow, int dstCol) |
| bool | delHyperlink(int index) |
| bool | delMerge(int row, int col) |
| QString | footer() |
| double | footerMargin() const |
| Format * | getCellFormat(int row, int col) |
| QString | getCellFormula(int row, int col) |
| QString | getCellType(int row, int col) const |
| QVariant | getCellValue(int row, int col, const QString &valueType = QString( "" )) |
| double | getColWidth(int col) const |
| int | getFirstCol() const |
| int | getFirstRow() const |
| QString | getHidden() const |
| int | getHyperlinkCount() const |
| QVariantMap | getHyperlinkInfo(int index) |
| int | getLastCol() const |
| int | getLastRow() const |
| QVariantMap | getMerge(int row, int col) const |
| int | getMergeCount() const |
| int | getPictureCount() const |
| QVariantMap | getPictureInfo(int index) const |
| double | getRowHeight(int row) const |
| QString | getSheetName() |
| QVariantMap | getTopLeftView() const |
| bool | groupCols(int colFirst, int rowLast, bool collapsed = true) |
| bool | groupRows(int rowFirst, int rowLast, bool collapsed = true) |
| QString | header() |
| double | headerMargin() const |
| bool | insertCols(int colFirst, int colLast) |
| bool | insertRows(int rowFirst, int rowLast) |
| bool | isColHidden(int col) const |
| bool | isFormula(int row, int col) const |
| bool | isGroupSummaryBelow() const |
| bool | isGroupSummaryRight() const |
| bool | isNull() const |
| bool | isRightToLeft() const |
| bool | isRowHidden(int row) const |
| bool | isShowGridlines() const |
| QVariantMap | printArea() |
| bool | removeCols(int colFirst, int colLast) |
| void | removeDataValidations() |
| bool | removeRows(int rowFirst, int rowLast) |
| QString | rowColToAddr(int rowFirst, int colFirst, int rowLast = -1, int colLast = -1, bool rowRelative = true, bool colRelative = true) |
| void | setAutoFitArea(int rowFirst = 0, int colFirst = 0, int rowLast = -1, int colLast = -1) |
| void | setCellFormat(int row, int col, const Format *format) |
| bool | setCellFormula(int row, int col, const QString &expr, const Format *format = nullptr) |
| void | setCellValue(int row, int col, const QVariant &value, const QString &valueType = QString( "" ), const Format *format = nullptr) |
| bool | setColHidden(int col, bool hidden = true) |
| bool | setCols(int colFirst, int colLast, double width, const Format *format = nullptr, bool hidden = false) |
| void | setFooter(const QString &iFooter, double iMargin = 0.5) |
| void | setGroupSummaryBelow(bool below = true) |
| void | setGroupSummaryRight(bool right = true) |
| void | setHeader(const QString &iHeader, double iMargin = 0.5) |
| void | setHidden(const QString &hidden) |
| bool | setMerge(int rowFirst, int rowLast, int colFirst, int colLast) |
| void | setPicture2(int row, int col, int picId, int width = -1, int height = -1, int offsetX = 0, int offsetY = 0) |
| void | setPicture(int row, int col, int picId, double scale = 1.0, int offsetX = 0, int offsetY = 0) |
| void | setPrintArea(int rowFirst, int rowLast, int colFirst, int colLast) |
| void | setRightToLeft(bool rightToLeft = true) |
| bool | setRowHidden(int row, bool hidden = true) |
| bool | setRows(int rowFirst, int rowLast, double height, const Format *format = nullptr, bool hidden = false) |
| void | setSheetName(const QString &sheetName) |
| void | setTabColor(const QString &color) |
| void | setTopLeftView(int row, int col) |
| void | showGridlines(bool show = true) |
- 1 public slot inherited from QObject
Protected Functions
| Sheet(Book *book, QObject *parent) |
- 2 protected functions inherited from ExcelObject
- 9 protected functions inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 2 signals inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
Member Function Documentation
Sheet::Sheet(QObject *parent = nullptr)
Default constructs an instance of Sheet.
[protected] Sheet::Sheet(Book *book, QObject *parent)
Default constructs an instance of Sheet.
Sheet::~Sheet()
Destroys the instance of Sheet.
[slot] void Sheet::addDataValidation(const QString &type, const QString &op, int rowFirst, int rowLast, int colFirst, int colLast, const QString &value1, const QString &value2 = QString(), bool allowBlank = true, bool hideDropDown = false, bool showInputMessage = false, bool showErrorMessage = true)
[slot] void Sheet::addDataValidationDouble(const QString &type, const QString &op, int rowFirst, int rowLast, int colFirst, int colLast, double value1, double value2, bool allowBlank = true, bool hideDropDown = false, bool showInputMessage = false, bool showErrorMessage = true)
[slot] void Sheet::addHyperlink(const QString &hyperlink, int rowFirst, int rowLast, int colFirst, int colLast)
[slot] Range *Sheet::addRange(int rowFirst, int rowLast, int colFirst, int colLast)
[slot] QVariantMap Sheet::addrToRowCol(const QString &addr)
[slot] bool Sheet::clear(int rowFirst = 0, int rowLast = 1048575, int colFirst = 0, int colLast = 16383)
[slot] void Sheet::clearPrintArea()
[slot] bool Sheet::copyCell(int srcRow, int srcCol, int dstRow, int dstCol)
[slot] Range *Sheet::copyRange(const Range *srcRange, int dstRow, int dstCol)
[slot] bool Sheet::delHyperlink(int index)
[slot] bool Sheet::delMerge(int row, int col)
[slot] QString Sheet::footer()
获取页脚
See also setFooter().
[slot] double Sheet::footerMargin() const
获取页脚边距
[slot] Format *Sheet::getCellFormat(int row, int col)
[slot] QString Sheet::getCellFormula(int row, int col)
[slot] QString Sheet::getCellType(int row, int col) const
[slot] QVariant Sheet::getCellValue(int row, int col, const QString &valueType = QString( "" ))
[slot] double Sheet::getColWidth(int col) const
[slot] int Sheet::getFirstCol() const
[slot] int Sheet::getFirstRow() const
[slot] QString Sheet::getHidden() const
[slot] int Sheet::getHyperlinkCount() const
Sheet::getHyperlinkCount Returns
[slot] QVariantMap Sheet::getHyperlinkInfo(int index)
[slot] int Sheet::getLastCol() const
[slot] int Sheet::getLastRow() const
[slot] QVariantMap Sheet::getMerge(int row, int col) const
[slot] int Sheet::getMergeCount() const
[slot] int Sheet::getPictureCount() const
[slot] QVariantMap Sheet::getPictureInfo(int index) const
[slot] double Sheet::getRowHeight(int row) const
[slot] QString Sheet::getSheetName()
[slot] QVariantMap Sheet::getTopLeftView() const
[slot] bool Sheet::groupCols(int colFirst, int rowLast, bool collapsed = true)
[slot] bool Sheet::groupRows(int rowFirst, int rowLast, bool collapsed = true)
[slot] QString Sheet::header()
获取页眉
See also setHeader().
[slot] double Sheet::headerMargin() const
获取页眉边距
[slot] bool Sheet::insertCols(int colFirst, int colLast)
[slot] bool Sheet::insertRows(int rowFirst, int rowLast)
[slot] bool Sheet::isColHidden(int col) const
[slot] bool Sheet::isFormula(int row, int col) const
[slot] bool Sheet::isGroupSummaryBelow() const
[slot] bool Sheet::isGroupSummaryRight() const
[slot] bool Sheet::isNull() const
Sheet::isNull Returns
[slot] bool Sheet::isRightToLeft() const
[slot] bool Sheet::isRowHidden(int row) const
[slot] bool Sheet::isShowGridlines() const
[slot] QVariantMap Sheet::printArea()
See also setPrintArea().
[slot] bool Sheet::removeCols(int colFirst, int colLast)
[slot] void Sheet::removeDataValidations()
[slot] bool Sheet::removeRows(int rowFirst, int rowLast)
[slot] QString Sheet::rowColToAddr(int rowFirst, int colFirst, int rowLast = -1, int colLast = -1, bool rowRelative = true, bool colRelative = true)
[slot] void Sheet::setAutoFitArea(int rowFirst = 0, int colFirst = 0, int rowLast = -1, int colLast = -1)
[slot] void Sheet::setCellFormat(int row, int col, const Format *format)
[slot] bool Sheet::setCellFormula(int row, int col, const QString &expr, const Format *format = nullptr)
[slot] void Sheet::setCellValue(int row, int col, const QVariant &value, const QString &valueType = QString( "" ), const Format *format = nullptr)
[slot] bool Sheet::setColHidden(int col, bool hidden = true)
See also isColHidden().
[slot] bool Sheet::setCols(int colFirst, int colLast, double width, const Format *format = nullptr, bool hidden = false)
[slot] void Sheet::setFooter(const QString &iFooter, double iMargin = 0.5)
设置页脚 iFooter 页脚内容,可通过&设置占位符,具体见https://www.libxl.com/spreadsheet.html#setHeader iMargin 边距,默认0.5
See also footer().
[slot] void Sheet::setGroupSummaryBelow(bool below = true)
See also isGroupSummaryBelow().
[slot] void Sheet::setGroupSummaryRight(bool right = true)
See also isGroupSummaryRight().
[slot] void Sheet::setHeader(const QString &iHeader, double iMargin = 0.5)
设置页眉 iHeader 页眉内容,可通过&设置占位符,具体见https://www.libxl.com/spreadsheet.html#setHeader iMargin 边距,默认0.5
See also header().
[slot] void Sheet::setHidden(const QString &hidden)
[slot] bool Sheet::setMerge(int rowFirst, int rowLast, int colFirst, int colLast)
[slot] void Sheet::setPicture2(int row, int col, int picId, int width = -1, int height = -1, int offsetX = 0, int offsetY = 0)
[slot] void Sheet::setPicture(int row, int col, int picId, double scale = 1.0, int offsetX = 0, int offsetY = 0)
[slot] void Sheet::setPrintArea(int rowFirst, int rowLast, int colFirst, int colLast)
See also printArea().
[slot] void Sheet::setRightToLeft(bool rightToLeft = true)
See also isRightToLeft().
[slot] bool Sheet::setRowHidden(int row, bool hidden = true)
See also isRowHidden().