1
/** ===========================================================
4
* This file is a part of digiKam project
5
* <a href="http://www.digikam.org">http://www.digikam.org</a>
8
* @brief Widget for displaying HTML in the backends
10
* @author Copyright (C) 2009-2010 by Michael G. Hansen
11
* <a href="mailto:mike at mghansen dot de">mike at mghansen dot de</a>
12
* @author Copyright (C) 2010 by Gilles Caulier
13
* <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
15
* This program is free software; you can redistribute it
16
* and/or modify it under the terms of the GNU General
17
* Public License as published by the Free Software Foundation;
18
* either version 2, or (at your option) any later version.
20
* This program is distributed in the hope that it will be useful,
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
* GNU General Public License for more details.
25
* ============================================================ */
32
#include <khtml_part.h>
36
#include "kgeomap_primitives.h"
37
#include "libkgeomap_export.h"
42
class KGeoMapSharedData;
44
class KGEOMAP_EXPORT HTMLWidget : public KHTMLPart
50
HTMLWidget(QWidget* const parent = 0);
53
void loadInitialHTML(const QString& initialHTML);
54
QVariant runScript(const QString& scriptCode);
55
bool runScript2Coordinates(const QString& scriptCode, GeoCoordinates* const coordinates);
56
void mouseModeChanged(const MouseModes mouseMode);
57
void setSelectionRectangle(const GeoCoordinates::Pair& searchCoordinates);
58
void removeSelectionRectangle();
59
void centerOn(const qreal west, const qreal north, const qreal east, const qreal south, const bool useSaneZoomLevel = true);
60
void setSharedKGeoMapObject(KGeoMapSharedData* const sharedData);
64
bool eventFilter(QObject* object, QEvent* event);
65
void khtmlMousePressEvent(khtml::MousePressEvent* e);
66
void khtmlMouseReleaseEvent(khtml::MouseReleaseEvent* e);
67
void khtmlMouseMoveEvent(khtml::MouseMoveEvent *e);
71
void slotHTMLCompleted();
72
void slotScanForJSMessages();
76
void signalHTMLEvents(const QStringList& events);
77
void signalJavaScriptReady();
78
void selectionHasBeenMade(const KGeoMap::GeoCoordinates::Pair& coordinatesRect);
82
class HTMLWidgetPrivate;
83
HTMLWidgetPrivate* const d;
87
} /* namespace KGeoMap */
89
#endif /* HTML_WIDGET_H */