OSDN Git Service

remove unused code.
[kita/kita.git] / kita / src / threadview.h
1 /***************************************************************************
2 *   Copyright (C) 2003 by Hideki Ikemoto                                  *
3 *   ikemo@users.sourceforge.jp                                            *
4 *                                                                         *
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 ***************************************************************************/
10
11 #ifndef _KITATHREADVIEW_H_
12 #define _KITATHREADVIEW_H_
13
14 #include <kparts/browserextension.h>
15 #include <dom/html_base.h>
16
17 #include <ktextbrowser.h>
18
19 class KURL;
20 class KitaHTMLPart;
21 class QToolButton;
22 class QSpacerItem;
23 class QComboBox;
24 class QVBoxLayout;
25 class QHBoxLayout;
26 class KitaThreadTabWidget;
27
28 #include <qvaluestack.h> // for gcc-2.9x
29 template <class T> class QValueStack;
30
31 namespace Kita
32 {
33     class KitaSubjectLabel;
34 }
35
36 /* mode , m_viewmode uses them. */
37 enum {
38     VIEWMODE_MAINVIEW,
39 };
40
41 namespace KIO
42 {
43     class Job;
44 }
45
46 /**
47  *
48  * @author Hideki Ikemoto <ikemo@users.sourceforge.jp>
49  **/
50
51 class KitaThreadView : public QWidget
52 {
53     Q_OBJECT
54
55     KitaThreadTabWidget* m_parent;
56
57 public:
58     KitaThreadView( KitaThreadTabWidget* parent, const char* name = 0 );
59     ~KitaThreadView();
60     const KURL threadURL() const;
61     const KURL datURL() const;
62     const QString selectedText() const;
63
64     void setup( const KURL& datURL, int mode );
65     void showStatusBar( QString info );
66     int getViewMode() { return m_viewmode; }
67
68 public slots:
69     virtual void setFocus();
70
71     void showThread( const KURL& datURL, int num );
72     void setFont( const QFont& font );
73     void slotReloadButton( int jumpNum = 0 );
74     void slotStopLoading();
75     void focusSearchCombo();
76     void slotDeleteButtonClicked();
77     void slotSearchNext();
78     void slotSearchPrev();
79     void slotGobackAnchor();
80     void slotGotoHeader();
81     void slotGotoFooter();
82
83 protected slots:
84     void slotDOMNodeActivated( const DOM::Node& node );
85     void slotPopupMenu( KXMLGUIClient*, const QPoint&, const KURL&, const QString&, mode_t );
86
87 private:
88     int m_serverTime;
89     KURL m_datURL;
90     KitaHTMLPart* m_threadPart;
91
92     bool m_revsearch;
93     int m_viewmode;
94     int m_rescode;
95
96     void insertSearchCombo();
97     void setSubjectLabel( const QString& boardName, const QString& threadName, const QString boardURL );
98     void updateButton();
99     QToolButton* writeButton;
100     QComboBox* SearchCombo;
101     QToolButton* HighLightButton;
102     QToolButton* BookmarkButton;
103     QToolButton* ReloadButton;
104     QComboBox* gotoCombo;
105     QToolButton* deleteButton;
106     QToolButton* closeButton;
107     QFrame* threadFrame;
108     QVBoxLayout* KitaThreadViewBaseLayout;
109     QHBoxLayout* layout2;
110     QSpacerItem* spacer2;
111
112 private slots:
113     void slotSearchButton();
114     void slotBookmarkButtonClicked( bool on );
115     void slotWriteButtonClicked( QString resstr = QString::null );
116     void slotComboActivated( int index );
117     void slotUpdateInfo();
118     void slotSearchPrivate( bool rev );
119     void slotCloseButton();
120
121 signals:
122     void popupMenu( KXMLGUIClient*, const QPoint&, const KURL&, const QString&, mode_t );
123     void showThreadCompleted(); /* to KitaThreadPart */
124 };
125
126 #endif