~timo-jyrinki/ubuntu/trusty/maliit-framework/fix_qt52

« back to all changes in this revision

Viewing changes to src/mpassthruwindow.h

  • Committer: Package Import Robot
  • Author(s): Ricardo Salveti de Araujo, Sergio Schvezov, Ricardo Salveti de Araujo
  • Date: 2013-07-23 19:47:04 UTC
  • mfrom: (1.1.2) (1.2.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130723194704-1lsy1kmlda069cea
Tags: 0.99.0+git20130615+97e8335-0ubuntu1
[ Sergio Schvezov ]
* New build from HEAD 97e8335.
* Packaging import from lp:phablet-extras/maliit-framework.

[ Ricardo Salveti de Araujo ]
* debian/control: adding vcs and fixing dependencies
* General package cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* * This file is part of Maliit framework *
2
 
 *
3
 
 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4
 
 * All rights reserved.
5
 
 *
6
 
 * Contact: maliit-discuss@lists.maliit.org
7
 
 *
8
 
 * This library is free software; you can redistribute it and/or
9
 
 * modify it under the terms of the GNU Lesser General Public
10
 
 * License version 2.1 as published by the Free Software Foundation
11
 
 * and appearing in the file LICENSE.LGPL included in the packaging
12
 
 * of this file.
13
 
 */
14
 
#ifndef MPASSTHRUWINDOW_H
15
 
#define MPASSTHRUWINDOW_H
16
 
 
17
 
#include <QWidget>
18
 
#include <QRegion>
19
 
#include <QCloseEvent>
20
 
 
21
 
class MImRemoteWindow;
22
 
struct MImServerXOptions;
23
 
class MImXServerLogic;
24
 
 
25
 
/*!
26
 
 * \brief MPassThruWindow uses XFixes to redirect mouse events to VKB
27
 
 */
28
 
class MPassThruWindow: public QWidget
29
 
{
30
 
    Q_OBJECT
31
 
 
32
 
public:
33
 
    /*!
34
 
     * \brief Constructor
35
 
     * \param p QWidget* parent widget
36
 
     */
37
 
 
38
 
    explicit MPassThruWindow(MImXServerLogic *serverLogic,
39
 
                             const MImServerXOptions &options);
40
 
 
41
 
    //! Destructor
42
 
    ~MPassThruWindow();
43
 
 
44
 
    virtual bool event(QEvent *e);
45
 
    void closeEvent(QCloseEvent *ev);
46
 
 
47
 
    //! Return region occupied by current plugin
48
 
    const QRegion &region();
49
 
 
50
 
public Q_SLOTS:
51
 
    //! Set window ID for given region
52
 
    void inputPassthrough(const QRegion &region = QRegion());
53
 
 
54
 
    //! Set the new remote window (application window)
55
 
    void setRemoteWindow(MImRemoteWindow *remoteWindow = 0);
56
 
 
57
 
    //! Schedules repainting for widget's background from remote window
58
 
    void updateFromRemoteWindow(const QRegion &region);
59
 
 
60
 
private:
61
 
    Q_DISABLE_COPY(MPassThruWindow)
62
 
 
63
 
    void updateInputRegion();
64
 
    void updateWindowType();
65
 
 
66
 
    MImRemoteWindow *remoteWindow;
67
 
    QRegion mRegion;
68
 
    MImXServerLogic *mServerLogic;
69
 
    const MImServerXOptions &xOptions;
70
 
 
71
 
    friend class Ut_PassthroughServer;
72
 
};
73
 
 
74
 
#endif