filters

table.h

00001 
00002 /*
00003 ** Header file for inclusion with kword_xml2latex.c
00004 **
00005 ** Copyright (C) 2000 Robert JACOLIN
00006 **
00007 ** This library is free software; you can redistribute it and/or
00008 ** modify it under the terms of the GNU Library General Public
00009 ** License as published by the Free Software Foundation; either
00010 ** version 2 of the License, or (at your option) any later version.
00011 **
00012 ** This library is distributed in the hope that it will be useful,
00013 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 ** Library General Public License for more details.
00016 **
00017 ** To receive a copy of the GNU Library General Public License, write to the
00018 ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 **
00021 */
00022 
00023 #ifndef __KWORD_TABLE_H__
00024 #define __KWORD_TABLE_H__
00025 
00026 #include <qstring.h>
00027 #include <qptrlist.h>
00028 #include "element.h"        /* Child class */
00029 #include "layout.h"     /* Cell flow   */
00030 
00031 /***********************************************************************/
00032 /* Class: Table                                                        */
00033 /***********************************************************************/
00034 
00040 class Table: public QPtrList<Element>, public Element
00041 {
00042     /* MARKUP DATA */
00043     //QString _name;
00044     //QString _grpMgr;
00045 
00046     /* USEFULL DATA */
00047     int     _maxRow, _maxCol;   /* Size of the table (nb of cell) */
00048 
00049     public:
00058         Table();
00064         Table(QString grpMng);
00065 
00066         /* 
00067          * Destructor
00068          *
00069          * The destructor must remove the list of frames.
00070          */
00071 
00072         virtual ~Table();
00073 
00078         //QString getName  () const { return _name;   }
00079         //QString getGrpMgr() const { return _grpMgr; }
00080         int     getMaxRow() const { return _maxRow; }
00081         int     getMaxCol() const { return _maxCol; }
00082 
00083         EEnv    getCellFlow (int);
00084         double  getCellSize (int);
00085 
00089         void setMaxRow(int r) { _maxRow = r; }
00090         void setMaxCol(int c) { _maxCol = c; }
00091 
00095         Element* searchCell(int, int);
00096         void     append    (Element*);
00097         void     generate  (QTextStream&);
00098 
00099     private:
00100         void generateCell(QTextStream&, int, int);
00101         void generateTableHeader(QTextStream&);
00102         void generateTopLineBorder(QTextStream&, int);
00103         void generateBottomLineBorder(QTextStream&, int);
00104 };
00105 
00106 #endif /* __KWORD_TABLE_H__ */
00107 
KDE Home | KDE Accessibility Home | Description of Access Keys