1 /***************************************************************************
2 * Copyright (C) 2004 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 ***************************************************************************/
14 #include <qvaluevector.h>
15 #include <khtml_part.h>
16 #include <dom/html_block.h>
25 Kita::DatInfo* m_datInfo;
30 When readNum = m_datInfo->getReadNum(), the responses are
32 No.1 <-- shown --> m_templateNum <-- not shown -->
33 m_topNum <-- shown ---> m_bottomNum <-- not shown --> readNum.
35 If m_topNum <= i <= m_bottomNum, then m_resshown[i] = TRUE.
37 If m_bottomNum < i <= readNum, where m_bottomNum < readNum,
38 then m_resshown[i] = FALSE.
44 QValueVector < bool > m_resshown; /* the res is shown */
45 QValueVector < int > m_resStatus; /* return val of DatInfo::getHTML(). See datinfo.h */
46 QValueVector < bool > m_coloredNum; /* colored number */
49 DOM::HTMLDocument m_hdoc; /* root node of document*/
50 QValueVector < DOM::HTMLDivElement > m_titleElm; /* the vector of the element of response */
51 QValueVector < DOM::HTMLDivElement > m_bodyElm; /* the vector of the element of response */
52 DOM::Element m_header;
53 DOM::Element m_footer;
54 DOM::Element m_kokoyon;
55 DOM::Element m_tugi100;
56 DOM::Element m_mae100;
58 /*-------------------------------------------------------------*/
62 KitaDomTree( const DOM::HTMLDocument& hdoc, const KURL& datURL );
65 /* rendering functions */
67 bool createResElement( int num );
68 bool appendRes( int num );
69 void redraw( bool force );
70 void changeColorOfAllResponsedNumber();
74 const bool isResShown( int num ) const;
75 const int getTopResNumber() const;
76 const int getBottomResNumber() const;
77 const int getTemplateNumber() const;
78 const bool isMae100Shown() const;
80 /* header Node, footer Node, kokomadeyonda Node, etc... */
82 void appendTemplate( int tmnNum );
83 void appendFooterAndHeader();
93 void createCommentNode( const QString& comment, const QString& idstr, int beforeBR, int afterBR, bool binsert );
94 void createBeltNode( const QString& idstr );
99 void appendANode( DOM::Element rootnode, const QString& linkstr, const QString& comment );
100 void updateFooterOrHeader( DOM::Element& targetelm, QString strType );
101 void createFooterOrHeader( QString strType );
102 void createKokoyon();
103 void createTugi100();
105 void changeColorOfNumber( int num );