| 1 | /**************************************************************************** |
| 2 | ** |
| 3 | ** Copyright (C) 2016 The Qt Company Ltd. |
| 4 | ** Contact: https://www.qt.io/licensing/ |
| 5 | ** |
| 6 | ** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit. |
| 7 | ** |
| 8 | ** $QT_BEGIN_LICENSE:GPL$ |
| 9 | ** Commercial License Usage |
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in |
| 11 | ** accordance with the commercial license agreement provided with the |
| 12 | ** Software or, alternatively, in accordance with the terms contained in |
| 13 | ** a written agreement between you and The Qt Company. For licensing terms |
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
| 15 | ** information use the contact form at https://www.qt.io/contact-us. |
| 16 | ** |
| 17 | ** GNU General Public License Usage |
| 18 | ** Alternatively, this file may be used under the terms of the GNU |
| 19 | ** General Public License version 3 or (at your option) any later version |
| 20 | ** approved by the KDE Free Qt Foundation. The licenses are as published by |
| 21 | ** the Free Software Foundation and appearing in the file LICENSE.GPL3 |
| 22 | ** included in the packaging of this file. Please review the following |
| 23 | ** information to ensure the GNU General Public License requirements will |
| 24 | ** be met: https://www.gnu.org/licenses/gpl-3.0.html. |
| 25 | ** |
| 26 | ** $QT_END_LICENSE$ |
| 27 | ** |
| 28 | ****************************************************************************/ |
| 29 | |
| 30 | #include <QtVirtualKeyboard/private/abstractinputpanel_p.h> |
| 31 | #include <QtCore/QRect> |
| 32 | |
| 33 | QT_BEGIN_NAMESPACE |
| 34 | namespace QtVirtualKeyboard { |
| 35 | |
| 36 | /*! |
| 37 | \class QtVirtualKeyboard::AbstractInputPanel |
| 38 | \internal |
| 39 | \inmodule QtVirtualKeyboard |
| 40 | |
| 41 | \brief Base class for an input panel. |
| 42 | |
| 43 | Input panel is a container for InputPanel qml view. |
| 44 | |
| 45 | The virtual keyboard currently supports the following input panels: |
| 46 | \list |
| 47 | \li AppInputPanel Input panel type that is integrated directly into the |
| 48 | application. |
| 49 | \li DesktopInputPanel Input panel type for Desktop systems. |
| 50 | \endlist |
| 51 | */ |
| 52 | |
| 53 | /*! |
| 54 | Creates an input panel container with \a dd as private data and |
| 55 | \a parent but does not construct the view. The view is explicitly |
| 56 | constructed by the AbstractInputPanel::createView() method. |
| 57 | */ |
| 58 | AbstractInputPanel::AbstractInputPanel(QObjectPrivate &dd, QObject *parent) : |
| 59 | QObject(dd, parent) |
| 60 | { |
| 61 | } |
| 62 | |
| 63 | /*! |
| 64 | Creates an input panel container with \a parent but does not construct |
| 65 | the view. The view is explicitly constructed by the |
| 66 | AbstractInputPanel::createView() method. |
| 67 | */ |
| 68 | AbstractInputPanel::AbstractInputPanel(QObject *parent) : |
| 69 | QObject(parent) |
| 70 | { |
| 71 | } |
| 72 | |
| 73 | /*! |
| 74 | Destroys the input panel container. |
| 75 | */ |
| 76 | AbstractInputPanel::~AbstractInputPanel() |
| 77 | { |
| 78 | } |
| 79 | |
| 80 | /*! |
| 81 | \fn void QtVirtualKeyboard::AbstractInputPanel::show() = 0 |
| 82 | \internal |
| 83 | |
| 84 | Shows the input panel. |
| 85 | */ |
| 86 | |
| 87 | /*! |
| 88 | \fn void QtVirtualKeyboard::AbstractInputPanel::hide() = 0 |
| 89 | \internal |
| 90 | |
| 91 | Hides the input panel. |
| 92 | */ |
| 93 | |
| 94 | /*! |
| 95 | \fn bool QtVirtualKeyboard::AbstractInputPanel::isVisible() const = 0 |
| 96 | \internal |
| 97 | |
| 98 | Returns \c true if the input panel is currently visible. |
| 99 | */ |
| 100 | |
| 101 | /*! |
| 102 | This method adjusts the input rectangle of the input panel. |
| 103 | The \a inputRect specifies the area in which mouse input is accepted. |
| 104 | */ |
| 105 | void AbstractInputPanel::setInputRect(const QRect &inputRect) |
| 106 | { |
| 107 | Q_UNUSED(inputRect); |
| 108 | } |
| 109 | |
| 110 | /*! |
| 111 | Creates the view of the input panel. If the view is already created, |
| 112 | this method does nothing. |
| 113 | */ |
| 114 | void AbstractInputPanel::createView() |
| 115 | { |
| 116 | } |
| 117 | |
| 118 | /*! |
| 119 | \fn void QtVirtualKeyboard::AbstractInputPanel::destroyView() |
| 120 | \internal |
| 121 | |
| 122 | Destroys the view of the input panel. |
| 123 | */ |
| 124 | void AbstractInputPanel::destroyView() |
| 125 | { |
| 126 | } |
| 127 | |
| 128 | } // namespace QtVirtualKeyboard |
| 129 | QT_END_NAMESPACE |
| 130 | |