libodsstream
Library for mass spectrometry
Loading...
Searching...
No Matches
settingsxml.h
Go to the documentation of this file.
1/**
2 * \file odsstream/writer/structure/settings.h
3 * \date 20/04/2018
4 * \author Olivier Langella
5 * \brief XML file to store ODS document settings
6 */
7
8/*******************************************************************************
9 * Copyright (c) 2013 Olivier Langella <Olivier.Langella@u-psud.fr>.
10 *
11 * This file is part of the libodsstream library.
12 *
13 * libodsstream is a library to read and write ODS documents as streams
14 * Copyright (C) 2013 Olivier Langella <Olivier.Langella@u-psud.fr>
15 *
16 * This program is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU Lesser General Public License as published
18 *by the Free Software Foundation, either version 3 of the License, or (at your
19 *option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU Lesser General Public License for more details.
25 *
26 * You should have received a copy of the GNU Lesser General Public License
27 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 *
29 * Contributors:
30 * Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and
31 *implementation
32 ******************************************************************************/
33
34
35#pragma once
36
37#include <quazip.h>
38#include <QXmlStreamWriter>
39#include "../options/odstablesettings.h"
40
41class OdsDocWriter;
42class ContentXml;
43
45{
47 friend ContentXml;
48
49 protected:
51 virtual ~SettingsXml();
52
53 void addSheetName(const QString &name);
54 const QString getDefaultSheetName() const;
55
56 void setCurrentOdsTableSettings(const OdsTableSettings &settings);
57
58 void write(QuaZip *p_quazip);
59
60 private:
61 void writeConfigurationSettings(QXmlStreamWriter *p_writer);
62 void writeSheetSettings(QXmlStreamWriter *p_writer,
63 const QString &sheet_name);
64 void writeConfigItem(QXmlStreamWriter *p_writer,
65 const QString &name,
66 const QString &type,
67 const QString &value);
68
69 private:
71
72 std::vector<QString> _sheet_list;
73
74 std::vector<OdsTableSettings> _table_settings_list;
75};
void setCurrentOdsTableSettings(const OdsTableSettings &settings)
friend OdsDocWriter
Definition settingsxml.h:46
const QString getDefaultSheetName() const
void writeConfigItem(QXmlStreamWriter *p_writer, const QString &name, const QString &type, const QString &value)
void writeSheetSettings(QXmlStreamWriter *p_writer, const QString &sheet_name)
std::vector< OdsTableSettings > _table_settings_list
Definition settingsxml.h:74
std::vector< QString > _sheet_list
Definition settingsxml.h:72
virtual ~SettingsXml()
void addSheetName(const QString &name)
void writeConfigurationSettings(QXmlStreamWriter *p_writer)
void write(QuaZip *p_quazip)
friend ContentXml
Definition settingsxml.h:47
OdsTableSettings _default_table_settings
Definition settingsxml.h:70