on 73bdb21 help sign in
unity8/tests/mocks/Unity/Application/UbuntuKeyboardInfo.cpp
60 lines 1.5 kB history raw
1/*
2 * Copyright (C) 2014-2015 Canonical, Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License version 3, as published by
6 * the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * 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 */
17#include "UbuntuKeyboardInfo.h"
19UbuntuKeyboardInfo *UbuntuKeyboardInfo::m_instance = nullptr;
21UbuntuKeyboardInfo::UbuntuKeyboardInfo(QObject *parent)
22 : QObject(parent),
23 m_x(0),
24 m_y(0),
25 m_width(200),
26 m_height(200)
30void UbuntuKeyboardInfo::setX(qreal value)
32 if (value != m_x) {
33 m_x = value;
34 Q_EMIT xChanged(m_x);
35 }
38void UbuntuKeyboardInfo::setY(qreal value)
40 if (value != m_y) {
41 m_y = value;
42 Q_EMIT yChanged(m_y);
43 }
46void UbuntuKeyboardInfo::setWidth(qreal value)
48 if (value != m_width) {
49 m_width = value;
50 Q_EMIT widthChanged(m_width);
51 }
54void UbuntuKeyboardInfo::setHeight(qreal value)
56 if (value != m_height) {
57 m_height = value;
58 Q_EMIT heightChanged(m_height);
59 }