20#ifndef kwtabletemplate_h
21#define kwtabletemplate_h
23#include "KWTableStyle.h"
36class KWTableTemplateCollection
39 KWTableTemplateCollection();
40 ~KWTableTemplateCollection();
41 const TQPtrList<KWTableTemplate> & tableTemplateList()
const {
return m_templateList; }
44 KWTableTemplate* findTableTemplate(
const TQString & name );
48 KWTableTemplate* tableTemplateAt(
int i ) {
return m_templateList.at(i); }
50 KWTableTemplate* addTableTemplate( KWTableTemplate *tt );
52 void removeTableTemplate ( KWTableTemplate *tt );
55 TQPtrList<KWTableTemplate> m_templateList;
56 TQPtrList<KWTableTemplate> m_deletedTemplates;
57 KWTableTemplate *m_lastTemplate;
67 KWTableTemplate(
const TQString & name, KWTableStyle * _firstRow=0L, KWTableStyle * _firstCol=0L,
68 KWTableStyle *_lastRow=0L, KWTableStyle *_lastCol=0L, KWTableStyle *_bodyCell=0L,
69 KWTableStyle *_topLeftCorner=0L, KWTableStyle *_topRightCorner=0L,
70 KWTableStyle *_bottomLeftCorner=0L, KWTableStyle *_bottomRightCorner=0L );
72 KWTableTemplate(
const KWTableTemplate & rhs ) { *
this = rhs; }
74 KWTableTemplate( TQDomElement & parentElem, KWDocument *_doc,
int docVersion=2 );
78 void operator=(
const KWTableTemplate & );
81 TQString name()
const {
return m_name; }
82 void setName(
const TQString & name ) { m_name = name; }
84 TQString displayName()
const;
87 KWTableStyle firstRow()
const {
return *m_firstRow; }
88 KWTableStyle* pFirstRow()
const {
return m_firstRow; }
89 void setFirstRow( KWTableStyle *_tableStyle ) { m_firstRow = _tableStyle; }
91 KWTableStyle lastRow()
const {
return *m_lastRow; }
92 KWTableStyle* pLastRow()
const {
return m_lastRow; }
93 void setLastRow( KWTableStyle *_tableStyle ) { m_lastRow = _tableStyle; }
95 KWTableStyle firstCol()
const {
return *m_firstCol; }
96 KWTableStyle* pFirstCol()
const {
return m_firstCol; }
97 void setFirstCol( KWTableStyle *_tableStyle ) { m_firstCol = _tableStyle; }
99 KWTableStyle lastCol()
const {
return *m_lastCol; }
100 KWTableStyle* pLastCol()
const {
return m_lastCol; }
101 void setLastCol( KWTableStyle *_tableStyle ) { m_lastCol = _tableStyle; }
103 KWTableStyle bodyCell()
const {
return *m_bodyCell; }
104 KWTableStyle* pBodyCell()
const {
return m_bodyCell; }
105 void setBodyCell( KWTableStyle *_tableStyle ) { m_bodyCell = _tableStyle; }
107 KWTableStyle topLeftCorner()
const {
return *m_topLeftCorner; }
108 KWTableStyle* pTopLeftCorner()
const {
return m_topLeftCorner; }
109 void setTopLeftCorner( KWTableStyle *_tableStyle ) { m_topLeftCorner = _tableStyle; }
111 KWTableStyle topRightCorner()
const {
return *m_topRightCorner; }
112 KWTableStyle* pTopRightCorner()
const {
return m_topRightCorner; }
113 void setTopRightCorner( KWTableStyle *_tableStyle ) { m_topRightCorner = _tableStyle; }
115 KWTableStyle bottomRightCorner()
const {
return *m_bottomRightCorner; }
116 KWTableStyle* pBottomRightCorner()
const {
return m_bottomRightCorner; }
117 void setBottomRightCorner( KWTableStyle *_tableStyle ) { m_bottomRightCorner = _tableStyle; }
119 KWTableStyle bottomLeftCorner()
const {
return *m_bottomLeftCorner; }
120 KWTableStyle* pBottomLeftCorner()
const {
return m_bottomLeftCorner; }
121 void setBottomLeftCorner( KWTableStyle *_tableStyle ) { m_bottomLeftCorner = _tableStyle; }
124 void save( TQDomElement parentElem, KoTextZoomHandler* zh );
125 void saveTableTemplate( TQDomElement & parentElem );
128 static KWTableTemplate *loadTemplate( TQDomElement & parentElem, KWDocument *_doc,
int docVersion=2 );
132 KWTableStyle *m_firstRow;
133 KWTableStyle *m_lastRow;
134 KWTableStyle *m_firstCol;
135 KWTableStyle *m_lastCol;
136 KWTableStyle *m_bodyCell;
138 KWTableStyle *m_topLeftCorner;
139 KWTableStyle *m_topRightCorner;
140 KWTableStyle *m_bottomRightCorner;
141 KWTableStyle *m_bottomLeftCorner;