libkdeedu/keduvocdocument
keduvocwordtype.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef KEDUVOCWORDTYPE_H
00025 #define KEDUVOCWORDTYPE_H
00026
00027 #include "libkeduvocdocument_export.h"
00028
00029 #include <QtCore/QStringList>
00030 #include <QtCore/QMap>
00031
00038 class KEDUVOCDOCUMENT_EXPORT KEduVocWordType
00039 {
00040
00041 public:
00043 explicit KEduVocWordType();
00044
00046 KEduVocWordType( const KEduVocWordType& other );
00047
00049 ~KEduVocWordType();
00050
00052 KEduVocWordType& operator= ( const KEduVocWordType& other );
00053 bool operator== ( const KEduVocWordType& other );
00054
00055 void createDefaultWordTypes();
00056
00062 void addType( const QString& typeName, const QString& specialType = QString() );
00063
00064
00071 void addSubType( const QString& mainType, const QString& typeName, const QString& specialType = QString() );
00072
00078 QStringList typeNameList() const;
00079
00086 QStringList subTypeNameList( const QString& mainType ) const;
00087
00093 void renameType( const QString& oldTypeName, const QString& newTypeName );
00100 void renameSubType( const QString& mainTypeName, const QString& oldTypeName, const QString& newTypeName );
00101
00108 bool removeType( const QString& typeName );
00115 bool removeSubType( const QString& mainTypeName, const QString& typeName );
00116
00122 QString specialType( const QString& typeName );
00123 void setSpecialType( const QString& typeName, const QString& newSpecialType );
00130 QString specialSubType( const QString& mainTypeName, const QString& subTypeName );
00131 void setSpecialSubType( const QString& mainTypeName, const QString& subTypeName, const QString& newSpecialType );
00132
00133 QString specialTypeNoun() const;
00134 QString specialTypeNounMale() const;
00135 QString specialTypeNounFemale() const;
00136 QString specialTypeNounNeutral() const;
00137
00138 QString specialTypeVerb() const;
00139 QString specialTypeAdjective() const;
00140 QString specialTypeAdverb() const;
00141
00142 void clear();
00143
00144 private:
00145
00146
00147 QString mainTypeName( int index ) const;
00148 int mainTypeIndex( const QString& name ) const;
00149 int subTypeIndex( const QString& mainTypeName, const QString& subTypeName ) const;
00150
00151 class Private;
00152 Private * const d;
00153 };
00154
00155 #endif