1 /***************************************************************************
2 * Copyright (C) 2004, 2007 by Kita Developers *
3 * ikemo@users.sourceforge.jp *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
13 #include <QtCore/QVector>
15 #include <dom/html_block.h>
16 #include <dom/html_document.h>
24 DomTree(const DomTree&);
25 DomTree& operator=(const DomTree&);
30 /* bottom number of shown.
31 * probably m_bottomNum == m_datInfo->getReadNum
35 /* return val of DatInfo::getHTML(). See datinfo.h */
36 QVector<int> m_resStatus;
37 QVector<bool> m_coloredNum; /* colored number */
40 DOM::HTMLDocument m_hdoc; /* root node of document*/
41 /* the vector of the element of response */
42 QVector<DOM::HTMLDivElement> m_titleElm;
43 /* the vector of the element of response */
44 QVector<DOM::HTMLDivElement> m_bodyElm;
45 DOM::Element m_header;
46 DOM::Element m_footer;
47 DOM::Element m_kokoyon;
50 DomTree(const DOM::HTMLDocument& hdoc, const KUrl& datUrl);
53 /* rendering functions */
55 bool createResElement(int num);
56 bool appendRes(int num);
57 void redraw(bool force);
58 void changeColorOfAllResponsedNumber();
62 int getBottomResNumber() const;
64 /* header Node, footer Node, kokomadeyonda Node, etc... */
66 void appendFooterAndHeader();
70 void appendAnchorNode(const DOM::Element& root, const QString& linkstr,
71 const QString& comment);
72 void updateHeader(DOM::Element& targetelm);
73 void updateFooter(DOM::Element& targetelm);
77 void changeColorOfNumber(int num);