+/***************************************************************************
+* this file is from kdeedu project. Filename: keduvocdocument.h
+***************************************************************************/
+
/***************************************************************************
Vocabulary Document for KDE Edu
-----------------------------------------------------------------------
(C) 2005, 2007 Peter Hedlund <peter.hedlund@kdemail.net>
(C) 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
+ (C) 2010, 2012 Reto Zingg <g.d0b3rm4n@gmail.com>
***************************************************************************/
/***************************************************************************
* *
***************************************************************************/
-#ifndef KEDUVOCDOCUMENT_H
-#define KEDUVOCDOCUMENT_H
+#ifndef QMVOCDOCUMENT_H
+#define QMVOCDOCUMENT_H
-#include "libkeduvocdocument_export.h"
+#include "libqmvocdocument_export.h"
-#include "keduvocidentifier.h"
-#include "keduvocarticle.h"
-#include "keduvocconjugation.h"
+#include "qmvocidentifier.h"
+#include "qmvocarticle.h"
+#include "qmvocconjugation.h"
#include <QtCore/QObject>
#include <QtCore/QList>
#include <QtCore/QMap>
-#include <KDE/KUrl>
+// #include <KDE/KUrl>
+#include <QUrl>
class QStringList;
-class KEduVocExpression;
-class KEduVocLesson;
-class KEduVocWordType;
-class KEduVocLeitnerBox;
+class QmVocExpression;
+class QmVocLesson;
+class QmVocWordType;
+class QmVocLeitnerBox;
/**
* This class contains the expressions of your vocabulary
* as well as other information about the vocabulary
*/
-class KEDUVOCDOCUMENT_EXPORT KEduVocDocument : public QObject
+class QMVOCDOCUMENT_EXPORT QmVocDocument : public QObject
{
Q_OBJECT
public:
*
* @param parent calling object
*/
- explicit KEduVocDocument( QObject* parent = 0 );
+ explicit QmVocDocument( QObject* parent = 0 );
/**
* Destructor
*/
- ~KEduVocDocument();
+ ~QmVocDocument();
// *** whole document methods ***
* @param url url to file to open
* @returns ErrorCode
*/
- int open( const KUrl& url );
+ int open( const QUrl& url );
/**
* Saves the data under the given name
* @param generator the name of the application saving the document
* @returns ErrorCode
*/
- int saveAs( const KUrl & url, FileType ft, const QString & generator );
+ int saveAs( const QUrl & url, FileType ft, const QString & generator );
QByteArray toByteArray(const QString &generator);
* @param matchIdentifiers if true only entries having identifiers present in the
* current document will be mergedurl is empty (or NULL) actual name is preserved
*/
- void merge( KEduVocDocument *docToMerge, bool matchIdentifiers );
+ void merge( QmVocDocument *docToMerge, bool matchIdentifiers );
/**
* Indicates if the document is modified
/**
* Sets the URL of the XML file
*/
- void setUrl( const KUrl& url );
+ void setUrl( const QUrl& url );
/** @returns the URL of the XML file */
- KUrl url() const;
+ QUrl url() const;
/** Set the title of the file
* @param identifier the identifier to append. If empty default names are used.
* @returns the identifier number
*/
- int appendIdentifier( const KEduVocIdentifier & identifier = KEduVocIdentifier());
+ int appendIdentifier( const QmVocIdentifier & identifier = QmVocIdentifier());
/**
* Sets the identifier of translation
* @param index number of translation 0..x
* @param lang the language identifier: en=english, de=german, ...
*/
- void setIdentifier( int index, const KEduVocIdentifier& lang );
+ void setIdentifier( int index, const QmVocIdentifier& lang );
/**
* Returns the identifier of translation @p index
* @param index number of translation 0..x
* @returns the language identifier: en=english, de=german, ...
*/
- KEduVocIdentifier& identifier( int index );
+ QmVocIdentifier& identifier( int index );
/**
* Const overload of identifier(int);
*/
- const KEduVocIdentifier& identifier( int index ) const;
+ const QmVocIdentifier& identifier( int index ) const;
/**
* Removes identifier and the according translation in all entries
/** Get the lesson root object
* @returns a pointer to the lesson object
*/
- KEduVocLesson * lesson();
+ QmVocLesson * lesson();
- KEduVocWordType * wordTypeContainer();
+ QmVocWordType * wordTypeContainer();
- KEduVocLeitnerBox * leitnerContainer();
+ QmVocLeitnerBox * leitnerContainer();
// *** file format specific methods ***
static QString errorDescription( int errorCode );
Q_SIGNALS:
- void progressChanged( KEduVocDocument *, int curr_percent );
+ void progressChanged( QmVocDocument *, int curr_percent );
/**
* Emitted when the document becomes modified or saved.
void docModified( bool mod );
private:
- // The private data of this - see KEduVocDocument::Private, implemented in keduvocdocument.cpp
- class KEduVocDocumentPrivate;
- KEduVocDocumentPrivate* const d;
+ // The private data of this - see QmVocDocument::Private, implemented in qmvocdocument.cpp
+ class QmVocDocumentPrivate;
+ QmVocDocumentPrivate* const d;
- Q_DISABLE_COPY( KEduVocDocument )
+ Q_DISABLE_COPY( QmVocDocument )
};
-#endif // KEDUVOCDOCUMENT_H
+#endif // QMVOCDOCUMENT_H