on e804c19 help sign in
unity8/tests/mocks/Unity/Application/UbuntuKeyboardInfo.cpp
58 lines 1.4 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(QObject *parent)
20 : QObject(parent),
21 m_x(0),
22 m_y(0),
23 m_width(200),
24 m_height(200)
28void UbuntuKeyboardInfo::setX(qreal value)
30 if (value != m_x) {
31 m_x = value;
32 Q_EMIT xChanged(m_x);
33 }
36void UbuntuKeyboardInfo::setY(qreal value)
38 if (value != m_y) {
39 m_y = value;
40 Q_EMIT yChanged(m_y);
41 }
44void UbuntuKeyboardInfo::setWidth(qreal value)
46 if (value != m_width) {
47 m_width = value;
48 Q_EMIT widthChanged(m_width);
49 }
52void UbuntuKeyboardInfo::setHeight(qreal value)
54 if (value != m_height) {
55 m_height = value;
56 Q_EMIT heightChanged(m_height);
57 }