Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qimpeninput.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2000 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 
00021 #ifndef _QIMPENINPUT_H_
00022 #define _QIMPENINPUT_H_
00023 
00024 #include "qimpenprofile.h"
00025 
00026 #include <qpe/qdawg.h>
00027 
00028 #include <qframe.h>
00029 #include <qlist.h>
00030 #include <qguardedptr.h>
00031 
00032 class QPushButton;
00033 class QTimer;
00034 class QIMPenWidget;
00035 class QIMPenSetup;
00036 class QIMPenWordPick;
00037 class QIMPenMatch;
00038 class HandwritingHelp;
00039 
00040 class QIMPenInput : public QFrame
00041 {
00042     Q_OBJECT
00043 public:
00044     QIMPenInput( QWidget *parent = 0, const char *name = 0, WFlags wf = 0 );
00045     virtual ~QIMPenInput();
00046 
00047     void resetState();
00048 
00049     QSize sizeHint() const;
00050 
00051 signals:
00052     void key( ushort, ushort, ushort, bool, bool );
00053     
00054 private slots:
00055     void wordPicked( const QString & );
00056     void selectCharSet( int );
00057     void beginStroke();
00058     void strokeEntered( QIMPenStroke *st );
00059     void matchedCharacters( const QIMPenCharMatchList &cl );
00060     void keypress( uint scan_uni );
00061     void erase();
00062     void help();
00063     void setup();
00064     void backspace();
00065     void enter();
00066 
00067 private:
00068     void loadProfiles();
00069     void selectProfile( const QString &name );
00070     void handleExtended( const QString & );
00071     void updateWordMatch( QIMPenCharMatchList &ml );
00072     void matchWords();
00073     void scanDict( const QDawg::Node* n, int ipos, const QString& str, int error );
00074 
00075     enum Mode { Normal, Switch, SwitchLock };
00076 
00077 private:
00078     Mode mode;
00079     QRect prefRect;
00080     QIMPenWidget *pw;
00081     QPushButton *helpBtn;
00082     QPushButton *setupBtn;
00083     QIMPenSetup *setupDlg;
00084     QIMPenMatch *matcher;
00085     QGuardedPtr<HandwritingHelp> helpDlg;
00086     QIMPenProfile *profile;
00087     QList<QIMPenProfile> profileList;
00088     QIMPenCharSet *shortcutCharSet;
00089     QIMPenCharSetList baseSets;
00090     int currCharSet;
00091     QIMPenWordPick *wordPicker;
00092 };
00093 
00094 #endif // _QIMPENINPUT_H_

Generated on Sat Nov 5 16:16:01 2005 for OPIE by  doxygen 1.4.2