00001
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
00024 #include <kdebug.h>
00025
00026 #include "fileheader.h"
00027 #include "variableformat.h"
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078 void VariableFormat::analyseFormat(const QDomNode balise)
00079 {
00080
00081
00082
00083 analyseParam(balise);
00084 kdDebug(30522) << "ANALYSE A FORMAT" << endl;
00085
00086
00087 if(isChild(balise, "FONT"))
00088 analyseFont(getChild(balise, "FONT"));
00089 if(isChild(balise, "ITALIC"))
00090 analyseItalic(getChild(balise, "ITALIC"));
00091 if(isChild(balise, "UNDERLINE"))
00092 analyseUnderlined(getChild(balise, "UNDERLINE"));
00093 if(isChild(balise, "WEIGHT"))
00094 analyseWeight(getChild(balise, "WEIGHT"));
00095 if(isChild(balise, "VERTALIGN"))
00096 analyseAlign(getChild(balise, "VERTALIGN"));
00097 if(isChild(balise, "STRIKEOUT"))
00098 analyseStrikeout(getChild(balise, "STRIKEOUT"));
00099 if(isChild(balise, "COLOR"))
00100 analyseColor(getChild(balise, "COLOR"));
00101 if(isChild(balise, "SIZE"))
00102 analyseSize(getChild(balise, "SIZE"));
00103 if(isChild(balise, "DATE"))
00104 analyseDate(getChild(balise, "DATE"));
00105 if(isChild(balise, "FOOTNOTE"))
00106 analyseFootnote(getChild(balise, "FOOTNOTE"));
00107 if(isChild(balise, "NOTE"))
00108 analyseNote(getChild(balise, "NOTE"));
00109 if(isChild(balise, "TYPE"))
00110 analyseType(getChild(balise, "TYPE"));
00111 kdDebug(30522) << "END OF A FORMAT" << endl;
00112 }
00113
00114
00115
00116
00117
00118
00119 void VariableFormat::analyseDate(const QDomNode balise)
00120 {
00121 setDay(getAttr(balise, "day").toInt());
00122 setMonth(getAttr(balise, "month").toInt());
00123 setYear(getAttr(balise, "year").toInt());
00124 setFix(getAttr(balise, "fix").toInt());
00125 }
00126
00127
00128
00129
00130
00131
00132 void VariableFormat::analyseTime(const QDomNode balise)
00133 {
00134 setHour(getAttr(balise, "day").toInt());
00135 setMinute(getAttr(balise, "month").toInt());
00136 setSeconde(getAttr(balise, "year").toInt());
00137 setFix(getAttr(balise, "fix").toInt());
00138 }
00139
00140 void VariableFormat::analyseFootnote(const QDomNode balise)
00141 {
00142 setNumberingtype(getAttr(balise, "numberingtype"));
00143 setNotetype(getAttr(balise, "notetype"));
00144 setFrameset(getAttr(balise, "frameset"));
00145 setValue(getAttr(balise, "value"));
00146 }
00147
00148 void VariableFormat::analyseNote(const QDomNode balise)
00149 {
00150 setNote(getAttr(balise, "note"));
00151 }
00152
00153
00154
00155
00156
00157
00158 void VariableFormat::analyseType(const QDomNode balise)
00159 {
00160 setKey(getAttr(balise, "key"));
00161 setType(getAttr(balise, "type").toInt());
00162 setText(getAttr(balise, "text"));
00163 }
00164