/****************************************************************************
** Copyright (c) 2013-2014 Debao Zhang <[email protected]>
** All right reserved.
**
** Permission is hereby granted, free of charge, to any person obtaining
** a copy of this software and associated documentation files (the
** "Software"), to deal in the Software without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Software, and to
** permit persons to whom the Software is furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be
** included in all copies or substantial portions of the Software.
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
** NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
** LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
** OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
** WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**
****************************************************************************/
#ifndef QXLSX_FORMAT_H
#define QXLSX_FORMAT_H
#include "xlsxglobal.h"
#include <QFont>
#include <QColor>
#include <QByteArray>
#include <QList>
#include <QExplicitlySharedDataPointer>
#include <QVariant>
class FormatTest;
QT_BEGIN_NAMESPACE_XLSX
class Styles;
class Worksheet;
class WorksheetPrivate;
class RichStringPrivate;
class SharedStrings;
class FormatPrivate;
class Q_XLSX_EXPORT Format
{
public:
enum FontScript { FontScriptNormal, FontScriptSuper, FontScriptSub };
enum FontUnderline {
FontUnderlineNone,
FontUnderlineSingle,
FontUnderlineDouble,
FontUnderlineSingleAccounting,
FontUnderlineDoubleAccounting
};
enum HorizontalAlignment {
AlignHGeneral,
AlignLeft,
AlignHCenter,
AlignRight,
AlignHFill,
AlignHJustify,
AlignHMerge,
AlignHDistributed
};
enum VerticalAlignment {
AlignTop,
AlignVCenter,
AlignBottom,
AlignVJustify,
AlignVDistributed
};
enum BorderStyle {
BorderNone,
BorderThin,
BorderMedium,
BorderDashed,
BorderDotted,
BorderThick,
BorderDouble,
BorderHair,
BorderMediumDashed,
BorderDashDot,
BorderMediumDashDot,
BorderDashDotDot,
BorderMediumDashDotDot,
BorderSlantDashDot
};
enum DiagonalBorderType {
DiagonalBorderNone,
DiagonalBorderDown,
DiagonalBorderUp,
DiagnoalBorderBoth
};
enum FillPattern {
PatternNone,
PatternSolid,
PatternMediumGray,
PatternDarkGray,
PatternLightGray,
PatternDarkHorizontal,
PatternDarkVertical,
PatternDarkDown,
PatternDarkUp,
PatternDarkGrid,
PatternDarkTrellis,
PatternLightHorizontal,
PatternLightVertical,
PatternLightDown,
PatternLightUp,
PatternLightTrellis,
PatternGray125,
PatternGray0625,
PatternLightGrid
};
Format();
Format(const Format &other);
Format &operator=(const Format &rhs);
~Format();
int numberFormatIndex() const;
void setNumberFormatIndex(int format);
QString numberFormat() const;
void setNumberFormat(const QString &format);
void setNumberFormat(int id, const QString &format);
bool isDateTimeFormat() const;
int fontSize() const;
void setFontSize(int size);
bool fontItalic() const;
void setFontItalic(bool italic);
bool fontStrikeOut() const;
void setFontStrikeOut(bool);
QColor fontColor() const;
void setFontColor(const QColor &);
bool fontBold() const;
void setFontBold(bool bold);
FontScript fontScript() const;
void setFontScript(FontScript);
FontUnderline fontUnderline() const;
void setFontUnderline(FontUnderline);
bool fontOutline() const;
void setFontOutline(bool outline);
QString fontName() const;
void setFontName(const QString &);
QFont font() const;
void setFont(const QFont &font);
HorizontalAlignment horizontalAlignment() const;
void setHorizontalAlignment(HorizontalAlignment align);
VerticalAlignment verticalAlignment() const;
void setVerticalAlignment(VerticalAlignment align);
bool textWrap() const;
void setTextWarp(bool textWrap);
int rotation() const;
void setRotation(int rotation);
int indent() const;
void setIndent(int indent);
bool shrinkToFit() const;
void setShrinkToFit(bool shink);
void setBorderStyle(BorderStyle style);
void setBorderColor(const QColor &color);
BorderStyle leftBorderStyle() const;
void setLeftBorderStyle(BorderStyle style);
QColor leftBorderColor() const;
void setLeftBorderColor(const QColor &color);
BorderStyle rightBorderStyle() const;
void setRightBorderStyle(BorderStyle style);
QColor rightBorderColor() const;
void setRightBorderColor(const QColor &color);
BorderStyle topBorderStyle() const;
void setTopBorderStyle(BorderStyle style);
QColor topBorderColor() const;
void setTopBorderColor(const QColor &color);
BorderStyle bottomBorderStyle() const;
void setBottomBorderStyle(BorderStyle style);
QColor bottomBorderColor() const;
void setBottomBorderColor(const QColor &color);
BorderStyle diagonalBorderStyle() const;
void setDiagonalBorderStyle(BorderStyle style);
DiagonalBorderType diagonalBorderType() const;
void setDiagonalBorderType(DiagonalBorderType style);
QColor diagonalBorderColor() const;
void setDiagonalBorderColor(const QColor &color);
FillPattern fillPattern() const;
void setFillPattern(FillPattern pattern);
QColor patternForegroundColor() const;
void setPatternForegroundColor(const QColor &color);
QColor patternBackgroundColor() const;
void setPatternBackgroundColor(const QColor &color);
bool locked() const;
void setLocked(bool locked);
bool hidden() const;
void setHidden(bool hidden);
void mergeFormat(const Format &modifier);
bool isValid() const;
bool isEmpty() const;
bool operator==(const Format &format) const;
bool operator!=(const Format &format) const;
QVariant property(int propertyId, const QVariant &defaultValue = QVariant()) const;
void setProperty(int propertyId, const QVariant &value, const QVariant &clearValue = QVariant(),
bool detach = true);
void clearProperty(int propertyId);
bool hasProperty(int propertyId) const;
bool boolProperty(int propertyId, bool defaultValue = false) const;
int intProperty(int propertyId, int defaultValue = 0) const;
double doubleProperty(int propertyId, double defaultValue = 0.0) const;
QString stringProperty(int propertyId, const QString &defaultValue = QString()) const;
QColor colorProperty(int propertyId, const QColor &defaultValue = QColor()) const;
bool hasNumFmtData() const;
bool hasFontData() const;
bool hasFillData() const;
bool hasBorderData() const;
bool hasAlignmentData() const;
bool hasProtectionData() const;
bool fontIndexValid() const;
int fontIndex() const;
QByteArray fontKey() const;
bool borderIndexValid() const;
QByteArray borderKey() const;
int borderIndex() const;
bool fillIndexValid() const;
QByteArray fillKey() const;
int
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
QXlsx.7z (82个子文件)
5.15.0
msvc2019
bin
Qt5Xlsxd.dll 936KB
Qt5Xlsx.dll 375KB
include
QtXlsx
xlsxconditionalformatting_p.h 4KB
qtxlsxversion.h 206B
xlsxabstractooxmlfile.h 2KB
xlsxmediafile_p.h 3KB
xlsxconditionalformatting.h 5KB
xlsxworksheet_p.h 8KB
xlsxdocpropsapp_p.h 2KB
xlsxdocpropscore_p.h 2KB
xlsxzipwriter_p.h 2KB
xlsxdocument.h 5KB
xlsxnumformatparser_p.h 2KB
headers.pri 4KB
xlsxstyles_p.h 5KB
xlsxrichstring.h 4KB
xlsxtheme_p.h 2KB
xlsxcellreference.h 3KB
QtXlsxDepends 196B
xlsxabstractsheet_p.h 2KB
xlsxchartsheet.h 2KB
xlsxsimpleooxmlfile_p.h 2KB
xlsxcellformula_p.h 2KB
xlsxchart.h 3KB
xlsxutility_p.h 3KB
xlsxzipreader_p.h 2KB
xlsxrichstring_p.h 2KB
xlsxworksheet.h 8KB
xlsxdrawinganchor_p.h 5KB
xlsxworkbook.h 4KB
xlsxworkbook_p.h 3KB
xlsxsharedstrings_p.h 3KB
QtXlsx 621B
QtXlsxVersion 28B
xlsxformat.h 9KB
xlsxglobal.h 2KB
xlsxabstractsheet.h 3KB
xlsxcell_p.h 2KB
xlsxcellrange.h 3KB
xlsxcellformula.h 3KB
xlsxabstractooxmlfile_p.h 2KB
xlsxcell.h 2KB
xlsxcolor_p.h 3KB
xlsxrelationships_p.h 3KB
xlsxdrawing_p.h 2KB
xlsxchart_p.h 4KB
0.3.0
QtXlsx
private
xlsxconditionalformatting_p.h 57B
xlsxformat_p.h 42B
xlsxmediafile_p.h 45B
xlsxworksheet_p.h 45B
xlsxdocpropsapp_p.h 47B
xlsxdocpropscore_p.h 48B
xlsxzipwriter_p.h 45B
xlsxnumformatparser_p.h 51B
xlsxstyles_p.h 42B
xlsxtheme_p.h 41B
xlsxabstractsheet_p.h 49B
xlsxsimpleooxmlfile_p.h 51B
xlsxcellformula_p.h 47B
xlsxutility_p.h 43B
xlsxzipreader_p.h 45B
xlsxrichstring_p.h 46B
xlsxdrawinganchor_p.h 49B
xlsxworkbook_p.h 44B
xlsxsharedstrings_p.h 49B
xlsxcell_p.h 40B
xlsxabstractooxmlfile_p.h 53B
xlsxcolor_p.h 41B
xlsxrelationships_p.h 49B
xlsxdrawing_p.h 43B
xlsxchart_p.h 41B
xlsxcontenttypes_p.h 48B
xlsxchartsheet_p.h 46B
xlsxdatavalidation_p.h 50B
xlsxdocument_p.h 44B
xlsxdatavalidation.h 4KB
xlsxcontenttypes_p.h 3KB
xlsxchartsheet_p.h 2KB
xlsxdatavalidation_p.h 3KB
xlsxdocument_p.h 2KB
lib
Qt5Xlsx.lib 195KB
Qt5Xlsxd.lib 267KB
共 82 条
- 1
资源评论
yukikaze1020
- 粉丝: 2
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Picasso_v3.1 2.ipa
- chromedriver-mac-arm64.zip
- 蓝zapro.apk
- chromedriver-linux64.zip
- UCAS研一深度学习实验-MNIST手写数字识别python源码+详细注释(高分项目)
- 基于Python和PyTorch框架完成的一个手写数字识别实验源码(带MINIST手写数字数据集)+详细注释(高分项目)
- 基于Matlab在MNIST数据集上利用CNN完成手写体数字识别任务,并实现单层CNN反向传播算法+源代码+文档说明(高分项目)
- NVIDIA驱动、CUDA和Pytorch及其依赖
- 基于SVM多特征融合的微表情识别python源码+项目说明+详细注释(高分课程设计)
- html动态爱心代码一(附源码)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功