/*************************************************************************** * * * begin : 15 Jan 2004 * * copyright : (C) 2003 by Samokhvalov Anton :) * * * ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef __html__view__h__xkhZOXCUozxic7t #define __html__view__h__xkhZOXCUozxic7t #include class MainView; class QListViewItem; class History; class Server; class KPopupMenu; class KActionCollection; class TopicTree; class TopicLeaf; #define ToPart(__a__) ((HtmlView*)(((KHTMLView*)(__a__))->part())) class HtmlView: public KHTMLPart { friend class TabbedHtml; Q_OBJECT public: HtmlView( const QString& f_name, KActionCollection* ac, QWidget* parent, MainView* parent1, const char* name = 0 ); virtual ~HtmlView(); History* getHistory() { return d_history; } void setFileName( const QString& fname ); void updateState(); protected: virtual void urlSelected( const QString &url, int button, int state, const QString &_target, KParts::URLArgs args = KParts::URLArgs() ); private: void setUrl( const KURL& url ); public slots: void slotSetUrl( QListViewItem* item ); void slotSetUrl( const KURL& url ); void up(); void back(); void forward(); private slots: void slotOnURL( const QString& url ); void slotPopupMenu( const QString& url, const QPoint& point ); void slotCopy(); void slotCopyURL(); void slotSelectAll(); void slotSelectionChanged(); signals: void setCaption( HtmlView* view, const QString& caption ); private: History* d_history; QString d_fname; MainView* d_parent; KPopupMenu* d_popup; KActionCollection* d_ac; KAction* d_copy; KAction* d_copy_url; KAction* d_select_all; QString d_current_url; TopicTree* d_topic_tree; TopicLeaf* d_last_node; }; #endif