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 ***************************************************************************/
13 #include <khtml_part.h>
17 HTMLView::HTMLView(KHTMLPart* part, QWidget *parent) : KHTMLView(part, parent)
23 void HTMLView::leaveEvent(QEvent*)
29 void HTMLView::keyPressEvent(QKeyEvent* e)
31 if (e->key() == Qt::Key_Space || e->key() == Qt::Key_PageDown
32 || e->key() == Qt::Key_Down || e->key() == Qt::Key_End) {
33 if (emitPushDown()) return ;
36 KHTMLView::keyPressEvent(e);
40 void HTMLView::wheelEvent(QWheelEvent * e)
42 if (e->delta() < 0) { /* scroll down */
43 if (emitPushDown()) return ;
46 KHTMLView::wheelEvent(e);
50 bool HTMLView::emitPushDown()
54 if (y >= contentsHeight() - visibleHeight()) {
55 emit pushDown(); /* to HTMLPart in order to call slotClickTugi100 */