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 QIMPENPROFILE_H_ 00022 #define QIMPENPROFILE_H_ 00023 00024 #include "qimpenchar.h" 00025 00026 class QIMPenProfile 00027 { 00028 public: 00029 QIMPenProfile( const QString &fn ); 00030 00031 const QString &name() const { return pname; } 00032 const QString &description() const { return pdesc; } 00033 00034 enum Style { ToggleCases, BothCases }; 00035 Style style() const { return pstyle; } 00036 bool mono() const { return pmono; } 00037 void setStyle( Style s ); 00038 00039 bool canSelectStyle() const { return tstyle; } 00040 00041 int multiStrokeTimeout() const { return msTimeout; } 00042 void setMultiStrokeTimeout( int t ); 00043 00044 bool matchWords() const { return wordMatch; } 00045 00046 QIMPenCharSet *uppercase(); 00047 QIMPenCharSet *lowercase(); 00048 QIMPenCharSet *numeric(); 00049 QIMPenCharSet *punctuation(); 00050 QIMPenCharSet *symbol(); 00051 QIMPenCharSet *shortcut(); 00052 QIMPenCharSet *find( QIMPenCharSet::Type t ); 00053 00054 QIMPenCharSetList &charSets(); 00055 00056 private: 00057 QString userConfig(); 00058 void loadData(); 00059 00060 private: 00061 QIMPenCharSetList sets; 00062 QString filename; 00063 QString pname; 00064 QString pdesc; 00065 Style pstyle; 00066 bool tstyle; 00067 int msTimeout; 00068 bool wordMatch; 00069 bool pmono; 00070 }; 00071 00072 #endif
1.4.2