1 /***************************************************************************
2 * Copyright (C) 2003 by Hideki Ikemoto *
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 ***************************************************************************/
11 #ifndef _KITATHREADVIEW_H_
12 #define _KITATHREADVIEW_H_
14 #include <kparts/browserextension.h>
15 #include <dom/html_base.h>
17 #include <ktextbrowser.h>
26 class KitaThreadTabWidget;
28 #include <qvaluestack.h> // for gcc-2.9x
29 template <class T> class QValueStack;
33 class KitaSubjectLabel;
36 /* mode , m_viewmode uses them. */
48 * @author Hideki Ikemoto <ikemo@users.sourceforge.jp>
51 class KitaThreadView : public QWidget
55 KitaThreadTabWidget* m_parent;
58 KitaThreadView( KitaThreadTabWidget* parent, const char* name = 0 );
60 const KURL threadURL() const;
61 const KURL datURL() const;
62 const QString selectedText() const;
64 void setup( const KURL& datURL, int mode );
65 void showStatusBar( QString info );
66 int getViewMode() { return m_viewmode; }
69 virtual void setFocus();
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();
84 void slotDOMNodeActivated( const DOM::Node& node );
85 void slotPopupMenu( KXMLGUIClient*, const QPoint&, const KURL&, const QString&, mode_t );
90 KitaHTMLPart* m_threadPart;
96 void insertSearchCombo();
97 void setSubjectLabel( const QString& boardName, const QString& threadName, const QString boardURL );
99 QToolButton* writeButton;
100 QComboBox* SearchCombo;
101 QToolButton* HighLightButton;
102 QToolButton* BookmarkButton;
103 QToolButton* ReloadButton;
104 QComboBox* gotoCombo;
105 QToolButton* deleteButton;
106 QToolButton* closeButton;
108 QVBoxLayout* KitaThreadViewBaseLayout;
109 QHBoxLayout* layout2;
110 QSpacerItem* spacer2;
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();
122 void popupMenu( KXMLGUIClient*, const QPoint&, const KURL&, const QString&, mode_t );
123 void showThreadCompleted(); /* to KitaThreadPart */