andre@1: /**************************************************************************** andre@1: ** Copyright (c) 2013-2014 Debao Zhang andre@1: ** All right reserved. andre@1: ** andre@1: ** Permission is hereby granted, free of charge, to any person obtaining andre@1: ** a copy of this software and associated documentation files (the andre@1: ** "Software"), to deal in the Software without restriction, including andre@1: ** without limitation the rights to use, copy, modify, merge, publish, andre@1: ** distribute, sublicense, and/or sell copies of the Software, and to andre@1: ** permit persons to whom the Software is furnished to do so, subject to andre@1: ** the following conditions: andre@1: ** andre@1: ** The above copyright notice and this permission notice shall be andre@1: ** included in all copies or substantial portions of the Software. andre@1: ** andre@1: ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, andre@1: ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF andre@1: ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND andre@1: ** NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE andre@1: ** LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION andre@1: ** OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION andre@1: ** WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. andre@1: ** andre@1: ****************************************************************************/ andre@1: #ifndef QXLSX_XLSXCELL_H andre@1: #define QXLSX_XLSXCELL_H andre@1: andre@1: #include "xlsxglobal.h" andre@1: #include "xlsxformat.h" andre@1: #include andre@1: andre@1: QT_BEGIN_NAMESPACE_XLSX andre@1: andre@1: class Worksheet; andre@1: class Format; andre@1: class CellFormula; andre@1: class CellPrivate; andre@1: class WorksheetPrivate; andre@1: andre@1: class Q_XLSX_EXPORT Cell andre@1: { andre@1: Q_DECLARE_PRIVATE(Cell) andre@1: public: andre@1: enum CellType { andre@1: BooleanType, //t="b" andre@1: NumberType, //t="n" (default) andre@1: ErrorType, //t="e" andre@1: SharedStringType, //t="s" andre@1: StringType, //t="str" andre@1: InlineStringType //t="inlineStr" andre@1: }; andre@1: andre@1: CellType cellType() const; andre@1: QVariant value() const; andre@1: Format format() const; andre@1: andre@1: bool hasFormula() const; andre@1: CellFormula formula() const; andre@1: andre@1: bool isDateTime() const; andre@1: QDateTime dateTime() const; andre@1: andre@1: bool isRichString() const; andre@1: andre@1: ~Cell(); andre@1: private: andre@1: friend class Worksheet; andre@1: friend class WorksheetPrivate; andre@1: andre@1: Cell(const QVariant &data=QVariant(), CellType type=NumberType, const Format &format=Format(), Worksheet *parent=0); andre@1: Cell(const Cell * const cell); andre@1: CellPrivate * const d_ptr; andre@1: }; andre@1: andre@1: QT_END_NAMESPACE_XLSX andre@1: andre@1: #endif // QXLSX_XLSXCELL_H