~zsombi/ubuntu-ui-toolkit/dynamic-tabs-reloaded

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/plugin/ucinversemouse.h

  • Committer: Zsombor Egri
  • Date: 2014-02-25 11:01:06 UTC
  • mfrom: (892.2.55 ubuntu-ui-toolkit)
  • Revision ID: zsombor.egri@canonical.com-20140225110106-ue6plm9wihzrn5uf
trunk merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2014 Canonical Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU Lesser General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU Lesser General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 */
 
17
 
 
18
#ifndef UCINVERSEMOUSE_H
 
19
#define UCINVERSEMOUSE_H
 
20
 
 
21
#include "ucmouse.h"
 
22
#include <QtQml>
 
23
 
 
24
class UCInverseMouse : public UCMouse {
 
25
    Q_OBJECT
 
26
public:
 
27
    explicit UCInverseMouse(QObject *parent = 0);
 
28
 
 
29
    static UCInverseMouse *qmlAttachedProperties(QObject *owner);
 
30
 
 
31
    virtual void setEnabled(bool enabled);
 
32
    virtual void setPriority(Priority priority);
 
33
    bool excludeInputArea() const;
 
34
    void setExcludeInputArea(bool value);
 
35
 
 
36
protected:
 
37
    QMouseEvent mapMouseToOwner(QObject *target, QMouseEvent* event);
 
38
    QHoverEvent mapHoverToOwner(QObject *target, QHoverEvent *event);
 
39
    virtual bool eventFilter(QObject *, QEvent *);
 
40
    virtual bool mouseEvents(QObject *target, QMouseEvent *event);
 
41
    virtual bool hoverEvents(QObject *target, QHoverEvent *event);
 
42
    virtual bool hasAttachedFilter(QQuickItem *item);
 
43
    bool pointInOSK(const QPointF &point);
 
44
    bool contains(QMouseEvent *mouse);
 
45
};
 
46
QML_DECLARE_TYPE(UCInverseMouse)
 
47
QML_DECLARE_TYPEINFO(UCInverseMouse, QML_HAS_ATTACHED_PROPERTIES)
 
48
 
 
49
#endif // UCINVERSEMOUSE_H