libodsstream
Library for mass spectrometry
Loading...
Searching...
No Matches
odscell.h
Go to the documentation of this file.
1/*
2 libodsstream is a library to read and write ODS documents as streams
3 Copyright (C) 2013 Olivier Langella <Olivier.Langella@moulon.inra.fr>
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18*/
19
20#pragma once
21
22#include <QString>
23#include <QDateTime>
24//#include <QDebug>
26class TsvReader;
27
29{
31 friend TsvReader;
32
33 public:
34 OdsCell();
35 virtual ~OdsCell();
36
37 const QString &toString() const;
38 const QString &getOfficeValueType() const;
39 const QDateTime &getDateTimeValue() const;
40 const QString &getStringValue() const;
41 bool getBooleanValue() const;
42 double getDoubleValue() const;
43 bool isBoolean() const;
44 bool isDate() const;
45 bool isDouble() const;
46 bool isString() const;
47 bool isEmpty() const;
48
49 protected:
50 void setOfficeValueType(const QString &type);
51 void setDateValue(const QDateTime &date);
52 void setValueString(const QString &value);
53 void setValueDouble(double value_num);
54 void setValueBoolean(bool value_bool);
55 void setValueOfUndefinedType(const QString &value);
56
59 QDateTime _date_value;
63};
void setOfficeValueType(const QString &type)
Definition odscell.cpp:33
void setValueOfUndefinedType(const QString &value)
Definition odscell.cpp:190
QDateTime _date_value
Definition odscell.h:59
friend TsvReader
Definition odscell.h:31
bool getBooleanValue() const
Definition odscell.cpp:136
bool _is_empty
Definition odscell.h:62
const QDateTime & getDateTimeValue() const
Definition odscell.cpp:97
void setValueString(const QString &value)
Definition odscell.cpp:65
bool _bool_value
Definition odscell.h:61
const QString & toString() const
Definition odscell.cpp:83
friend QXmlStreamReaderContentXml
Definition odscell.h:30
double getDoubleValue() const
Definition odscell.cpp:123
bool isBoolean() const
Definition odscell.cpp:181
bool isDate() const
Definition odscell.cpp:154
bool isString() const
Definition odscell.cpp:168
bool isEmpty() const
Definition odscell.cpp:149
virtual ~OdsCell()
Definition odscell.cpp:28
bool isDouble() const
Definition odscell.cpp:161
QString _office_value_type
Definition odscell.h:58
const QString & getStringValue() const
Definition odscell.cpp:110
void setValueBoolean(bool value_bool)
Definition odscell.cpp:76
void setValueDouble(double value_num)
Definition odscell.cpp:70
OdsCell()
Definition odscell.cpp:24
void setDateValue(const QDateTime &date)
Definition odscell.cpp:56
double _double_value
Definition odscell.h:60
const QString & getOfficeValueType() const
Definition odscell.cpp:91
QString _string_value
Definition odscell.h:57