svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=639780
return d->m_lessonDescriptions[idx-1];
}
+int KEduVocDocument::lessonIndex(const QString description) const
+{
+ return d->m_lessonDescriptions.indexOf(description) +1;
+}
+
QList<int> KEduVocDocument::lessonsInQuery() const
{
void setModified(bool dirty = true);
/**
- * Sppends a new expression to the end of the vocabulary
+ * Appends a new expression to the end of the vocabulary
*
* @param expression expression to append
*/
*/
QString lessonDescription(int index) const;
+ /**
+ * @returns the index of the lesson (from its name)
+ * -1 if the lesson does not exist
+ */
+ int lessonIndex(const QString description) const;
+
/**
* @returns a list with the lessons in the current query
*/