20#ifndef kwtabletemplateselector_h
21#define kwtabletemplateselector_h
24#include <tqgroupbox.h>
28#include <tqpushbutton.h>
41class KWTableTemplateCollection;
43class KoTextZoomHandler;
53class KWTableTemplatePreview :
public TQGroupBox
59 KWTableTemplatePreview(
const TQString& title,
KWTableStyle *_emptyStyle, TQWidget* parent,
const char* name=0L );
60 ~KWTableTemplatePreview();
61 void setTableTemplate(KWTableTemplate *_tableTemplate);
62 KWTableTemplate *getTableTemplate()
const ;
63 void disableRepaint(
bool _b) { m_disableRepaint =_b;}
65 void cbFirstRowChanged(
bool );
66 void cbFirstColChanged(
bool );
67 void cbLastRowChanged(
bool );
68 void cbLastColChanged(
bool );
69 void cbBodyChanged(
bool );
72 int bottomBorder(
const int rows,
const int cols,
const int rowpos,
const int colpos);
73 int rightBorder(
const int rows,
const int cols,
const int rowpos,
const int colpos);
74 void drawCell( TQPainter *p,
const KWTableStyle *ts,
const TQRect globalRect,
75 const int rows,
int cols,
int rowpos,
int colpos,
const TQString & txt);
76 void drawPreviewTable(TQPainter *p,
int rows,
int cols, TQRect globalRect);
77 void drawContents( TQPainter *p );
78 void setSpecialCells(KWTableTemplate *);
82 KoTextZoomHandler *m_zoomHandler;
83 KWTableTemplate *tableTemplate;
84 KWTableTemplate *origTableTemplate;
86 bool m_disableRepaint;
88 TQString m_contents[2][5];
97class KWTableTemplateSelector :
public TQWidget
103 enum FormatType { FirstRow = 1 , FirstColumn = 2, LastRow = 4, LastCol =8, Body =16 };
104 KWTableTemplateSelector( KWDocument *_doc, TQWidget * _parent,
const TQString & _tableTemplate,
int _type = 31 ,
const char * _name = 0 );
106 KWTableTemplate *getTableTemplate()
const ;
107 int getFormatType()
const ;
111 KWTableTemplatePreview *preview;
113 TQListBox *lbTemplates;
114 TQPushButton *pbCustomize;
116 TQButtonGroup *bgCustomize;
117 TQCheckBox *cbFirstRow, *cbFirstCol, *cbLastRow, *cbLastCol, *cbBody;
119 int selectedTableTemplate;
120 void initFormat(
int format);
123 void changeTableTemplate();
This class implements tables by acting as the manager for the frame(set)s which make up the table cel...
Table style (can created/modified/deleted by the user) A table style is simply a paragraph style and ...
This is our KoTextDocument reimplementation, to create KWTextParag instead of KoTextParags,...