From b13db18ba830cfe9334d234e2cf6f0e4f142f5c3 Mon Sep 17 00:00:00 2001 From: j2doll Date: Fri, 29 Sep 2017 16:36:36 +0900 Subject: [PATCH] test v2 --- QtXlsx/header/xlsxcell.h | 17 ++++++++++- QtXlsx/header/xlsxcell_p.h | 60 ++++++++++++++++---------------------- 2 files changed, 41 insertions(+), 36 deletions(-) diff --git a/QtXlsx/header/xlsxcell.h b/QtXlsx/header/xlsxcell.h index f79f3a2..20fb3ce 100644 --- a/QtXlsx/header/xlsxcell.h +++ b/QtXlsx/header/xlsxcell.h @@ -1,4 +1,4 @@ -//-------------------------------------------------------------------- +//-------------------------------------------------------------------- // // MIT License // Copyright (c) 2017, j2doll @@ -42,6 +42,7 @@ class Q_XLSX_EXPORT Cell { Q_DECLARE_PRIVATE(Cell) public: + enum CellType { BooleanType, //t="b" NumberType, //t="n" (default) @@ -50,6 +51,20 @@ public: StringType, //t="str" InlineStringType //t="inlineStr" }; + /* cell type of MIcrosoft Excel + 01) General − This is the default cell format of Cell. + 02) Number − This displays cell as number with separator. + 03) Currency − This displays cell as currency i.e. with currency sign. + 04) Accounting − Similar to Currency, used for accounting purpose. + 05) Date − Various date formats are available under this like 17-09-2013, 17th-Sep-2013, etc. + 06) Time − Various Time formats are available under this, like 1.30PM, 13.30, etc. + 07) Percentage − This displays cell as percentage with decimal places like 50.00%. + 08) Fraction − This displays cell as fraction like 1/4, 1/2 etc. + 09) Scientific − This displays cell as exponential like 5.6E+01. + 10) Text − This displays cell as normal text. + 11) Special − Special formats of cell like Zip code, Phone Number. + 12) Custom − You can use custom format by using this. + */ CellType cellType() const; QVariant value() const; diff --git a/QtXlsx/header/xlsxcell_p.h b/QtXlsx/header/xlsxcell_p.h index b537ff2..4b435c5 100644 --- a/QtXlsx/header/xlsxcell_p.h +++ b/QtXlsx/header/xlsxcell_p.h @@ -1,41 +1,31 @@ -/**************************************************************************** -** Copyright (c) 2013-2014 Debao Zhang -** 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. -** -****************************************************************************/ +//-------------------------------------------------------------------- +// +// MIT License +// Copyright (c) 2017, j2doll +// +// 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 XLSXCELL_P_H #define XLSXCELL_P_H -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt Xlsx API. It exists for the convenience -// of the Qt Xlsx. This header file may change from -// version to version without notice, or even be removed. -// -// We mean it. -// - #include "xlsxglobal.h" #include "xlsxcell.h" #include "xlsxcellrange.h"