Vidalia 0.3.1
TorMapWidgetInputHandler.h
Go to the documentation of this file.
1/*
2** This file is part of Vidalia, and is subject to the license terms in the
3** LICENSE file, found in the top level directory of this distribution. If you
4** did not receive the LICENSE file with this file, you may obtain it from the
5** Vidalia source package distributed by the Vidalia Project at
6** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
7** including this file, may be copied, modified, propagated, or distributed
8** except according to the terms described in the LICENSE file.
9*/
10
11#ifndef _TORMAPWIDGETINPUTHANDLER_H
12#define _TORMAPWIDGETINPUTHANDLER_H
13
14#include "MarbleWidgetInputHandler.h"
15
16#include <QEvent>
17#include <QObject>
18#include <QPoint>
19
20
21class TorMapWidgetInputHandler : public Marble::MarbleWidgetInputHandler
22{
23 Q_OBJECT
24
25public:
26 /** Default constructor.
27 */
29
30signals:
31 /** Emitted when the user clicks on a map feature located at <b>point</b>.
32 * <b>button</b> indicates which mouse button was clicked.
33 */
34 void featureClicked(const QPoint &point, Qt::MouseButton button);
35
36protected:
37 /** Filter and handles event <b>e</b> that was sent to widget <b>obj</b>.
38 * <b>obj</b> is always a MarbleWidget object.
39 */
40 virtual bool eventFilter(QObject *obj, QEvent *e);
41
42private:
43 /** Returns true if the map has one or more features located at the screen
44 * position <b>point</b>.
45 */
46 bool pointHasFeatures(const QPoint &point) const;
47
52};
53
54#endif
55
bool pointHasFeatures(const QPoint &point) const
virtual bool eventFilter(QObject *obj, QEvent *e)
void featureClicked(const QPoint &point, Qt::MouseButton button)