From dc2ea1ae80c6a9370b64328a452f4a562b5659e0 Mon Sep 17 00:00:00 2001 From: xavier Date: Sun, 11 Mar 2012 16:06:37 +0000 Subject: [PATCH] Added TitleBlockCell::loadContentFromCell() git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1559 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/titleblockcell.cpp | 16 ++++++++++++++++ sources/titleblockcell.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/sources/titleblockcell.cpp b/sources/titleblockcell.cpp index 126897994..3f19b63ff 100644 --- a/sources/titleblockcell.cpp +++ b/sources/titleblockcell.cpp @@ -143,6 +143,22 @@ bool TitleBlockCell::spans() const { return(row_span || col_span); } +/** + Copy the content of another cell. + @param other_cell Another cell +*/ +void TitleBlockCell::loadContentFromCell(const TitleBlockCell &other_cell) { + value_name = other_cell.value_name; + cell_type = other_cell.cell_type; + logo_reference = other_cell.logo_reference; + value = other_cell.value; + label = other_cell.label; + display_label = other_cell.display_label; + font_size = other_cell.font_size; + alignment = other_cell.alignment; + hadjust = other_cell.hadjust; +} + /** @param cell_element XML element from which cell content will be read */ diff --git a/sources/titleblockcell.h b/sources/titleblockcell.h index d35de21dc..21f45eb0e 100644 --- a/sources/titleblockcell.h +++ b/sources/titleblockcell.h @@ -46,9 +46,11 @@ class TitleBlockCell { QVariant attribute(const QString &); static QString attributeName(const QString &); bool spans() const; + void loadContentFromCell(const TitleBlockCell &); void loadContentFromXml(const QDomElement &); void saveContentToXml(QDomElement &); + // attributes public: TemplateCellType cell_type; ///< Cell type: empty, text, logo?