libkdeedu/keduvocdocument
keduvocexpression.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 Vocabulary Expression for KDE Edu 00003 ----------------------------------------------------------------------- 00004 copyright : (C) 1999-2001 Ewald Arnold <kvoctrain@ewald-arnold.de> 00005 00006 (C) 2005-2007 Peter Hedlund <peter.hedlund@kdemail.net> 00007 Copyright 2008 Frederik Gladhorn <frederik.gladhorn@kdemail.net> 00008 ***************************************************************************/ 00009 00010 /*************************************************************************** 00011 * * 00012 * This program is free software; you can redistribute it and/or modify * 00013 * it under the terms of the GNU General Public License as published by * 00014 * the Free Software Foundation; either version 2 of the License, or * 00015 * (at your option) any later version. * 00016 * * 00017 ***************************************************************************/ 00018 00019 #ifndef KEDUVOCEXPRESSION_H 00020 #define KEDUVOCEXPRESSION_H 00021 00022 #include "libkeduvocdocument_export.h" 00023 00024 #include <QtCore/QDateTime> 00025 00026 #include "keduvoclesson.h" 00027 #include "keduvocarticle.h" 00028 #include "keduvocmultiplechoice.h" 00029 #include "keduvoctranslation.h" 00030 00031 class KEduVocLesson; 00032 00037 class KEDUVOCDOCUMENT_EXPORT KEduVocExpression 00038 { 00039 public: 00040 00043 explicit KEduVocExpression(); 00044 00050 explicit KEduVocExpression( const QString & expression ); 00051 00058 explicit KEduVocExpression( const QStringList & translations ); 00059 00060 KEduVocExpression(const KEduVocExpression& other); 00061 00062 ~KEduVocExpression(); 00063 00066 KEduVocLesson * lesson() const; 00067 00068 00072 void resetGrades( int index ); 00073 00076 bool isActive() const; 00077 00080 void setActive( bool flag = true ); 00081 00082 int sizeHint() const; 00083 void setSizeHint( int sizeHint ); 00084 00085 void setTranslation( int index, KEduVocTranslation* translation ); 00091 void setTranslation( int index, const QString &expression ); 00092 00097 void removeTranslation( int index ); 00098 00104 KEduVocTranslation* translation( int index ); 00105 KEduVocTranslation* translation( int index ) const; 00106 00107 QList<int> translationIndices() const; 00108 00109 KEduVocExpression& operator= ( const KEduVocExpression &expression ); 00110 bool operator== ( const KEduVocExpression &expression ) const; 00111 00112 private: 00113 class KEduVocExpressionPrivate; 00114 KEduVocExpressionPrivate* const d; 00115 00118 void setLesson( KEduVocLesson * l ); 00119 00120 friend class KEduVocLesson; 00121 }; 00122 00123 #endif // KEduVocExpression_H
KDE 4.2 API Reference