key.cpp
1/*
2** A program to convert the XML rendered by KWord into LATEX.
3**
4** Copyright (C) 2002 Robert JACOLIN
5**
6** This library is free software; you can redistribute it and/or
7** modify it under the terms of the GNU Library General Public
8** License as published by the Free Software Foundation; either
9** version 2 of the License, or (at your option) any later version.
10**
11** This library is distributed in the hope that it will be useful,
12** but WITHOUT ANY WARRANTY; without even the implied warranty of
13** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14** Library General Public License for more details.
15**
16** To receive a copy of the GNU Library General Public License, write to the
17** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19**
20*/
21
22#include <kdebug.h> /* for kdDebug() stream */
23#include "key.h"
24
25/*******************************************/
26/* Constructor */
27/*******************************************/
28Key::Key(eKeyType type): _type(type)
29{
30 _name = "";
31 _filename = "";
32}
33
34/*******************************************/
35/* Destructor */
36/*******************************************/
37Key::~Key()
38{
39 kdDebug(30522) << "Destruction of a key." << endl;
40}
41
42/*******************************************/
43/* Analyse */
44/*******************************************/
45void Key::analyse(const TQDomNode balise)
46{
47 /* MARKUP TYPE : PARAGRAPH */
48
49 kdDebug(30522) << "**** KEY ****" << endl;
50 kdDebug(30522) << getAttr(balise, "name") << endl;
51 setName(getAttr(balise, "name"));
52 setFilename(getAttr(balise, "filename"));
53 setHour(getAttr(balise, "hour").toInt());
54 setMSec(getAttr(balise, "msec").toInt());
55 setDay(getAttr(balise, "day").toInt());
56 setMinute(getAttr(balise, "minute").toInt());
57 setSecond(getAttr(balise, "second").toInt());
58 setMonth(getAttr(balise, "month").toInt());
59 setYear(getAttr(balise, "year").toInt());
60 kdDebug(30522) << "**** END KEY ****" << endl;
61}
62
63/*******************************************/
64/* Generate */
65/*******************************************/
66/* Generate each text zone with the parag. */
67/* markup. */
68/*******************************************/
69void Key::generate(TQTextStream &out)
70{
71
72 kdDebug(30522) << " GENERATION KEY" << endl;
73
74 kdDebug(30522) << "PARA KEY" << endl;
75}
void setName(TQString name)
Modifiers.
Definition key.h:94
void generate(TQTextStream &)
Write the paragraph in a file.
Definition key.cpp:69
void analyse(const TQDomNode)
Helpfull functions.
Definition key.cpp:45
Key(eKeyType)
Constructors.
Definition key.cpp:28