libkdeedu/keduvocdocument
keduvocwordtype.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 00003 Copyright 2007 Jeremy Whiting <jeremywhiting@scitools.com> 00004 Copyright 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net> 00005 00006 ***************************************************************************/ 00007 00008 /*************************************************************************** 00009 * * 00010 * This program is free software; you can redistribute it and/or modify * 00011 * it under the terms of the GNU General Public License as published by * 00012 * the Free Software Foundation; either version 2 of the License, or * 00013 * (at your option) any later version. * 00014 * * 00015 ***************************************************************************/ 00016 00017 #ifndef KEDUVOCWORDTYPE_H 00018 #define KEDUVOCWORDTYPE_H 00019 00020 #include "libkeduvocdocument_export.h" 00021 00022 #include "keduvoccontainer.h" 00023 00024 #include "keduvocwordflags.h" 00025 00026 #include <QtCore/QList> 00027 #include <QtCore/QString> 00028 00029 class KEduVocExpression; 00030 class KEduVocTranslation; 00031 00033 class KEDUVOCDOCUMENT_EXPORT KEduVocWordType :public KEduVocContainer 00034 { 00035 public: 00036 00037 00039 explicit KEduVocWordType(const QString& name, KEduVocWordType *parent = 0); 00040 00042 ~KEduVocWordType(); 00043 00045 // KEduVocWordType& operator= ( const KEduVocWordType& ); 00046 00051 void setWordType(KEduVocWordFlags flags); 00052 00057 KEduVocWordFlags wordType() const; 00058 00064 KEduVocWordType* childOfType(const KEduVocWordFlags& flags); 00065 00071 KEduVocTranslation * translation(int row); 00072 00078 QList < KEduVocExpression* > entries(EnumEntriesRecursive recursive = NotRecursive); 00079 00080 KEduVocExpression* entry(int row, EnumEntriesRecursive recursive = NotRecursive); 00081 00083 int entryCount(EnumEntriesRecursive recursive = NotRecursive); 00084 00085 private: 00086 class Private; 00087 Private * const d; 00088 00092 void addTranslation(KEduVocTranslation* translation); 00093 00097 void removeTranslation(KEduVocTranslation* translation); 00098 00099 friend class KEduVocTranslation; 00100 }; 00101 00102 #endif
KDE 4.2 API Reference