* *
***************************************************************************/
-//#include "keduvocexpression.h"
#include "keduvoctranslation.h"
#include <KDebug>
}
-// bool KEduVocTranslation::uniqueType() const
-// { ///@todo what is this??? I have no clue... help!
-// /*
-// bool unique = true;
-// QString type0 = type ( 0 );
-// for ( int i = 1; i < translationCount(); i++ )
-// if ( type0 != type ( i ) )
-// unique = false;
-// return unique; */
-// return false;
-// }
-//
-
QString KEduVocTranslation::type() const
{
return m_types;
class KDEEDUCORE_EXPORT KEduVocTranslation
{
public:
+ /**
+ * Default constructor for an empty translation.
+ */
KEduVocTranslation( );
+ /**
+ * Constructor
+ * @param translation is used as translation
+ */
KEduVocTranslation( const QString &translation );
+ /**
+ * Destructor
+ */
~KEduVocTranslation();
+ /**
+ * The translation as string (the word itself)
+ * @return the translation
+ */
QString translation () const;
+ /**
+ * Sets the translation
+ * @param expr
+ */
void setTranslation ( const QString & expr );
+ /**
+ * Clears grading and date information.
+ */
void resetGrades();
*/
QString type() const;
-/// @todo is this still needed? if so rather in KEduVocExpression
-// /** all langs have same type ?
-// *
-// * @return true if all have same type
-// */
-// bool uniqueType () const;
-
/** sets type of this expression
*
* @param index index of type
*/
void incQueryCount( int indexFrom );
+ /**
+ * Equal operator to assing a translation to another one.
+ * @param translation translation to be copied
+ * @return reference to the new translation
+ */
KEduVocTranslation& operator=(const KEduVocTranslation &translation);
+ /**
+ * Compare two translations, including word type etc.
+ * @param translation
+ * @return true if equal
+ */
bool operator==(const KEduVocTranslation &translation) const;
private: