From: Reto Zingg Date: Sat, 15 Dec 2012 17:28:48 +0000 (+0200) Subject: adapt qmvocdocument.h for querymee X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=61e2421846b0a500097c651848977daca67897a8;p=libqmvoc.git adapt qmvocdocument.h for querymee --- diff --git a/qmvocdocument.h b/qmvocdocument.h index dfd45c3..f46afc4 100644 --- a/qmvocdocument.h +++ b/qmvocdocument.h @@ -1,3 +1,7 @@ +/*************************************************************************** +* this file is from kdeedu project. Filename: keduvocdocument.h +***************************************************************************/ + /*************************************************************************** Vocabulary Document for KDE Edu ----------------------------------------------------------------------- @@ -5,6 +9,7 @@ (C) 2005, 2007 Peter Hedlund (C) 2007 Frederik Gladhorn + (C) 2010, 2012 Reto Zingg ***************************************************************************/ /*************************************************************************** @@ -16,32 +21,33 @@ * * ***************************************************************************/ -#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 #include #include -#include +// #include +#include 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: @@ -91,12 +97,12 @@ public: * * @param parent calling object */ - explicit KEduVocDocument( QObject* parent = 0 ); + explicit QmVocDocument( QObject* parent = 0 ); /** * Destructor */ - ~KEduVocDocument(); + ~QmVocDocument(); // *** whole document methods *** @@ -106,7 +112,7 @@ public: * @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 @@ -116,7 +122,7 @@ public: * @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); @@ -127,7 +133,7 @@ public: * @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 @@ -142,10 +148,10 @@ public: /** * 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 @@ -218,7 +224,7 @@ public: * @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 @@ -226,7 +232,7 @@ public: * @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 @@ -234,12 +240,12 @@ public: * @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 @@ -281,11 +287,11 @@ public: /** 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 *** @@ -319,7 +325,7 @@ public: 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. @@ -328,12 +334,12 @@ Q_SIGNALS: 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