Loading...
Searching...
No Matches
OdsTableSettings Class Reference

`#include <odstablesettings.h>`

## Public Member Functions

| OdsTableSettings ()
| OdsTableSettings (const OdsTableSettings &other)
virtual | ~OdsTableSettings ()
OdsTableSettings & | operator= (OdsTableSettings const &other)
void | setVerticalSplit (unsigned int position)
void | setHorizontalSplit (unsigned int position)
const QString & | getSheetName () const

## Protected Member Functions

void | setSheetName (const QString &sheetname)
const QString | getValue (const QString &property) const

## Private Attributes

friend | SettingsXml
QString | _sheetname
std::map< QString, QString > | _map_properties

## Detailed Description

Definition at line 42 of file odstablesettings.h.

## Constructor & Destructor Documentation

## OdsTableSettings() [1/2]

OdsTableSettings::OdsTableSettings | ( |  | ) |

Definition at line 37 of file odstablesettings.cpp.

{
}

Referenced by OdsTableSettings(), and operator=().

## OdsTableSettings() [2/2]

OdsTableSettings::OdsTableSettings | ( | const OdsTableSettings & | other | ) |

Definition at line 40 of file odstablesettings.cpp.

{
_sheetname = other._sheetname;
_map_properties = other._map_properties;
}
OdsTableSettings::_sheetname
QString _sheetname
Definition odstablesettings.h:62
OdsTableSettings::_map_properties
std::map< QString, QString > _map_properties
Definition odstablesettings.h:63

References OdsTableSettings(), _map_properties, and _sheetname.

## ~OdsTableSettings()

OdsTableSettings::~OdsTableSettings | ( |  | ) |

virtual

Definition at line 45 of file odstablesettings.cpp.

{
}

## Member Function Documentation

## getSheetName()

const QString & OdsTableSettings::getSheetName | ( |  | ) | const

Definition at line 63 of file odstablesettings.cpp.

{
return _sheetname;
}

References _sheetname.

## getValue()

const QString OdsTableSettings::getValue | ( | const QString & | property | ) | const

protected

Definition at line 68 of file odstablesettings.cpp.

{
auto it = _map_properties.find(property);
if(it != _map_properties.end())
{
return it->second;
}
else
{
return "0";
}
}

References _map_properties.

Referenced by SettingsXml::setCurrentOdsTableSettings(), setVerticalSplit(), and SettingsXml::writeSheetSettings().

## operator=()

OdsTableSettings & OdsTableSettings::operator= | ( | OdsTableSettings const & | other | ) |

Definition at line 49 of file odstablesettings.cpp.

{
if(this == &other)
return *this;
_sheetname = other._sheetname;
_map_properties = other._map_properties;
return *this;
}

References OdsTableSettings(), _map_properties, and _sheetname.

## setHorizontalSplit()

void OdsTableSettings::setHorizontalSplit | ( | unsigned int | position | ) |

Definition at line 99 of file odstablesettings.cpp.

{
if(position == 0)
{
_map_properties[QString("HorizontalSplitMode")] = QString("0");
}
else
{
_map_properties[QString("HorizontalSplitMode")] = QString("2");
}
_map_properties[QString("HorizontalSplitPosition")] =
QString("%1").arg(position);
}

References _map_properties.

## setSheetName()

void OdsTableSettings::setSheetName | ( | const QString & | sheetname | ) |

protected

Definition at line 58 of file odstablesettings.cpp.

{
_sheetname = sheetname;
}

References _sheetname.

Referenced by SettingsXml::setCurrentOdsTableSettings().

## setVerticalSplit()

void OdsTableSettings::setVerticalSplit | ( | unsigned int | position | ) |

Definition at line 81 of file odstablesettings.cpp.

{
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << position;
if(position == 0)
{
_map_properties[QString("VerticalSplitMode")] = QString("0");
}
else
{
_map_properties[QString("VerticalSplitMode")] = QString("2");
}
_map_properties[QString("VerticalSplitPosition")] =
QString("%1").arg(position);
qDebug() << __FILE__ << " " << __FUNCTION__ << " "
<< getValue("VerticalSplitPosition");
}
OdsTableSettings::getValue
const QString getValue(const QString &property) const
Definition odstablesettings.cpp:68

References _map_properties, and getValue().

Referenced by QtableWriter::writeSheet().

## Member Data Documentation

## _map_properties

std::map<QString, QString> OdsTableSettings::_map_properties

private

Definition at line 63 of file odstablesettings.h.

Referenced by OdsTableSettings(), getValue(), operator=(), setHorizontalSplit(), and setVerticalSplit().

## _sheetname

QString OdsTableSettings::_sheetname

private

Definition at line 62 of file odstablesettings.h.

Referenced by OdsTableSettings(), getSheetName(), operator=(), and setSheetName().

## SettingsXml

friend OdsTableSettings::SettingsXml

private

Definition at line 44 of file odstablesettings.h.

The documentation for this class was generated from the following files:

- odsstream/writer/options/odstablesettings.h
- odsstream/writer/options/odstablesettings.cpp