summaryrefslogtreecommitdiffstats
path: root/examples/tools/inputpanel/myinputpanel.h
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-04-17 15:11:44 (GMT)
committeraxis <qt-info@nokia.com>2009-08-28 07:10:44 (GMT)
commitb1015e8d7ac12d365c4b738fbee4ce12ecbaa58e (patch)
treedd98324c121785d966e9e21c0e25d8d61bdd7b31 /examples/tools/inputpanel/myinputpanel.h
parent2e6c1f12babf1d36d1aa80bce7baeadc0e651cda (diff)
downloadQt-b1015e8d7ac12d365c4b738fbee4ce12ecbaa58e.zip
Qt-b1015e8d7ac12d365c4b738fbee4ce12ecbaa58e.tar.gz
Qt-b1015e8d7ac12d365c4b738fbee4ce12ecbaa58e.tar.bz2
Added an example documenting how to make a software input panel.
RevBy: David Boddie David's fixes are in the next two commits.
Diffstat (limited to 'examples/tools/inputpanel/myinputpanel.h')
-rw-r--r--examples/tools/inputpanel/myinputpanel.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/examples/tools/inputpanel/myinputpanel.h b/examples/tools/inputpanel/myinputpanel.h
new file mode 100644
index 0000000..5f91c05
--- /dev/null
+++ b/examples/tools/inputpanel/myinputpanel.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MYINPUTPANEL_H
+#define MYINPUTPANEL_H
+
+#include <QtGui>
+#include <QtCore>
+
+#include "ui_myinputpanelform.h"
+
+//! [0]
+
+class MyInputPanel : public QWidget
+{
+ Q_OBJECT
+
+public:
+ MyInputPanel();
+
+signals:
+ void characterGenerated(QChar character);
+
+protected:
+ bool event(QEvent *e);
+
+private slots:
+ void saveFocusWidget(QWidget *oldFocus, QWidget *newFocus);
+ void buttonClicked(QWidget *w);
+
+private:
+ Ui::MyInputPanelForm form;
+ QWidget *lastFocusedWidget;
+ QSignalMapper signalMapper;
+};
+
+//! [0]
+
+#endif // MYINPUTPANEL_H