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

« back to all changes in this revision

Viewing changes to src/mimstandaloneserverlogic.cpp

  • 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
 
 
15
 
#include "mimstandaloneserverlogic.h"
16
 
 
17
 
#include "mimpluginsproxywidget.h"
18
 
 
19
 
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
20
 
#include "quickviewsurfacegroup.h"
21
 
#include <QGuiApplication>
22
 
#endif
23
 
#include "windowedsurfacegroup.h"
24
 
 
25
 
#include <QDebug>
26
 
#include <QWidget>
27
 
 
28
 
MImStandaloneServerLogic::MImStandaloneServerLogic() :
29
 
    MImAbstractServerLogic(0),
30
 
    mProxyWidget(new MImPluginsProxyWidget()),
31
 
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
32
 
    mSurfaceGroupFactory(QGuiApplication::platformName() == "wayland"
33
 
                         ? static_cast<Maliit::Server::AbstractSurfaceGroupFactory *>(new Maliit::Server::WindowedSurfaceGroupFactory)
34
 
                         : static_cast<Maliit::Server::AbstractSurfaceGroupFactory *>(new Maliit::Server::QuickViewSurfaceGroupFactory))
35
 
#else
36
 
    mSurfaceGroupFactory(new Maliit::Server::WindowedSurfaceGroupFactory)
37
 
#endif
38
 
{
39
 
}
40
 
 
41
 
MImStandaloneServerLogic::~MImStandaloneServerLogic()
42
 
{
43
 
}
44
 
 
45
 
 
46
 
void MImStandaloneServerLogic::inputPassthrough(const QRegion &region)
47
 
{
48
 
    if (region.isEmpty())
49
 
        mProxyWidget->hide();
50
 
    else
51
 
        mProxyWidget->show();
52
 
}
53
 
 
54
 
QSharedPointer<Maliit::Server::AbstractSurfaceGroupFactory> MImStandaloneServerLogic::surfaceGroupFactory() const
55
 
{
56
 
    return mSurfaceGroupFactory;
57
 
}
58
 
 
59
 
void MImStandaloneServerLogic::pluginLoaded()
60
 
{
61
 
}
62
 
 
63
 
void MImStandaloneServerLogic::appOrientationAboutToChange(int toAngle)
64
 
{
65
 
    Q_UNUSED(toAngle);
66
 
}
67
 
 
68
 
void MImStandaloneServerLogic::appOrientationChangeFinished(int toAngle)
69
 
{
70
 
    Q_UNUSED(toAngle);
71
 
}
72
 
 
73
 
void MImStandaloneServerLogic::applicationFocusChanged(WId newRemoteWinId)
74
 
{
75
 
    Q_UNUSED(newRemoteWinId);
76
 
}