Loading...
Searching...
No Matches
settingsxml.h
Go to the documentation of this file.
/**
* \file odsstream/writer/structure/settings.h
* \date 20/04/2018
* \author Olivier Langella
* \brief XML file to store ODS document settings
*/
/*******************************************************************************
* Copyright (c) 2013 Olivier Langella <Olivier.Langella@u-psud.fr>.
*
* This file is part of the libodsstream library.
*
* libodsstream is a library to read and write ODS documents as streams
* Copyright (C) 2013 Olivier Langella <Olivier.Langella@u-psud.fr>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
*by the Free Software Foundation, either version 3 of the License, or (at your
*option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
* Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and
*implementation
******************************************************************************/
#pragma once
#include <quazip.h>
#include <QXmlStreamWriter>
#include "../options/odstablesettings.h"
class OdsDocWriter;
class ContentXml;
class SettingsXml
{
friend OdsDocWriter;
friend ContentXml;
protected:
SettingsXml();
virtual ~SettingsXml();
void addSheetName(const QString &name);
const QString getDefaultSheetName() const;
void setCurrentOdsTableSettings(const OdsTableSettings &settings);
void write(QuaZip *p_quazip);
private:
void writeConfigurationSettings(QXmlStreamWriter *p_writer);
void writeSheetSettings(QXmlStreamWriter *p_writer,
const QString &sheet_name);
void writeConfigItem(QXmlStreamWriter *p_writer,
const QString &name,
const QString &type,
const QString &value);
private:
OdsTableSettings _default_table_settings;
std::vector<QString> _sheet_list;
std::vector<OdsTableSettings> _table_settings_list;
};
ContentXml
Definition contentxml.h:35
OdsDocWriter
Definition odsdocwriter.h:32
OdsTableSettings
Definition odstablesettings.h:43
SettingsXml::setCurrentOdsTableSettings
void setCurrentOdsTableSettings(const OdsTableSettings &settings)
Definition settingsxml.cpp:49
SettingsXml::OdsDocWriter
friend OdsDocWriter
Definition settingsxml.h:46
SettingsXml::getDefaultSheetName
const QString getDefaultSheetName() const
Definition settingsxml.cpp:77
SettingsXml::writeConfigItem
void writeConfigItem(QXmlStreamWriter *p_writer, const QString &name, const QString &type, const QString &value)
Definition settingsxml.cpp:355
SettingsXml::writeSheetSettings
void writeSheetSettings(QXmlStreamWriter *p_writer, const QString &sheet_name)
Definition settingsxml.cpp:275
SettingsXml::_table_settings_list
std::vector< OdsTableSettings > _table_settings_list
Definition settingsxml.h:74
SettingsXml::_sheet_list
std::vector< QString > _sheet_list
Definition settingsxml.h:72
SettingsXml::~SettingsXml
virtual ~SettingsXml()
Definition settingsxml.cpp:45
SettingsXml::addSheetName
void addSheetName(const QString &name)
Definition settingsxml.cpp:83
SettingsXml::writeConfigurationSettings
void writeConfigurationSettings(QXmlStreamWriter *p_writer)
Definition settingsxml.cpp:372
SettingsXml::write
void write(QuaZip *p_quazip)
Definition settingsxml.cpp:109
SettingsXml::ContentXml
friend ContentXml
Definition settingsxml.h:47
SettingsXml::_default_table_settings
OdsTableSettings _default_table_settings
Definition settingsxml.h:70
SettingsXml::SettingsXml
SettingsXml()
Definition settingsxml.cpp:42
odstablesettings.h
store table settings