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 <khtml_part.h>
20 /* This part is not initialized. This part works as just KHTMLPart */
21 PREVIEWPART_MODE_KHTML,
24 PREVIEWPART_MODE_MAINPART,
27 PREVIEWPART_MODE_POPUP
30 /* ID of user defined event */
31 #define EVENT_GotoAnchor ( QEvent::User + 100 )
47 /*-------------------------------------------------------------*/
49 class KitaPreviewPart : public KHTMLPart
53 Kita::ResPopup* m_popup;
55 /* basic information */
59 bool m_isPushedRightButton;
68 KitaPreviewPart( QWidget* parent, const char* name = 0 );
70 bool setup( const KURL& url );
73 void setInnerHTML( const QString& innerHTML );
78 void slotSetFaceOfHTMLPart();
79 void slotSetStyleSheetOfHTMLPart();
82 void slotDeletePopup();
89 void connectSignals();
90 void createHTMLDocument();
93 void clickAnchor( const KURL& urlin );
96 void showPopup( const KURL& url, const QString& innerHTML );
97 void showPopupCore( const KURL& url, const QString& innerHTML, QPoint point );
98 bool startMultiPopup();
99 bool isMultiPopupMode();
105 virtual void customEvent( QCustomEvent * e );
108 virtual void khtmlMousePressEvent( khtml::MousePressEvent* e );
115 void slotVSliderReleased();
116 void slotHSliderReleased();
117 void slotHideChildPopup();
118 void slotKitaIsActive();
119 void slotOnURL( const QString& url );
124 void openURLRequestExt( const KURL& url, const KParts::URLArgs& args = KParts::URLArgs(),
125 QString mimetype = QString::null,
127 const KURL& usrUrl1 = KURL() );
128 void mousePressed(); /* to KitaThreadView */
131 void hideChildPopup();