filters
element.cc00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <stdlib.h>
00023 #include <kdebug.h>
00024 #include "element.h"
00025
00026
00027
00028
00029 Element::Element()
00030 {
00031 _type = ST_NONE;
00032 _hinfo = SI_NONE;
00033 _section = SS_NONE;
00034 _name = "";
00035 _removable = false;
00036 _visible = true;
00037 _row = 0;
00038 _col = 0;
00039 _rows = 0;
00040 _cols = 0;
00041 setGrpMgr("");
00042 }
00043
00044
00045
00046
00047 Element::~Element()
00048 {
00049 kdDebug(30522) << "Element Destructor" << endl;
00050 }
00051
00052
00053
00054
00055 void Element::analyse(const QDomNode balise_initiale)
00056 {
00057
00058
00059
00060 kdDebug(30522) << "FRAMESET PARAMETERS ANALYSE (Element)" << endl;
00061 analyseParam(balise_initiale);
00062 }
00063
00064
00065
00066
00067 void Element::analyseParam(const QDomNode balise)
00068 {
00069
00070
00071
00072 _name = getAttr(balise, "name");
00073 _type = (SType) getAttr(balise, "frameType").toInt();
00074 switch(getAttr(balise, "frameInfo").toInt())
00075 {
00076 case 0: _section = SS_BODY;
00077 break;
00078 case 1: _section = SS_HEADERS;
00079 _hinfo = SI_FIRST;
00080 break;
00081 case 2: _section = SS_HEADERS;
00082 _hinfo = SI_ODD;
00083 break;
00084 case 3: _section = SS_HEADERS;
00085 _hinfo = SI_EVEN;
00086 break;
00087 case 4: _section = SS_FOOTERS;
00088 _hinfo = SI_FIRST;
00089 break;
00090 case 5: _section = SS_FOOTERS;
00091 _hinfo = SI_ODD;
00092 break;
00093 case 6: _section = SS_FOOTERS;
00094 _hinfo = SI_EVEN;
00095 break;
00096 case 7: _section = SS_FOOTNOTES;
00097 break;
00098 default:
00099 _section = SS_NONE;
00100 kdDebug(30522) << "error : frameinfo unknown!" << endl;
00101 }
00102 setRemovable(getAttr(balise, "removable").toInt());
00103 setVisible(getAttr(balise, "visible").toInt());
00104 if(getAttr(balise, "grpMgr")!= 0)
00105 {
00106 _section = SS_TABLE;
00107 setGrpMgr(getAttr(balise, "grpMgr"));
00108 }
00109 setRow(getAttr(balise, "row").toInt());
00110 setCol(getAttr(balise, "col").toInt());
00111 setRows(getAttr(balise, "rows").toInt());
00112 setCols(getAttr(balise, "cols").toInt());
00113
00114 kdDebug(30522) << "FIN PARAM" << endl;
00115 }
|