diff options
Diffstat (limited to 'src/findduplicates.h')
-rw-r--r-- | src/findduplicates.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/findduplicates.h b/src/findduplicates.h index e1a2fce..c11dcf3 100644 --- a/src/findduplicates.h +++ b/src/findduplicates.h @@ -20,10 +20,10 @@ #ifndef KBIBTEXFINDDUPLICATES_H #define KBIBTEXFINDDUPLICATES_H -#include <qobject.h> +#include <ntqobject.h> class KProgressDialog; -class QWidget; +class TQWidget; namespace KBibTeX { @@ -31,12 +31,12 @@ namespace KBibTeX /** @author Thomas Fischer <[email protected]> */ - class FindDuplicates : public QObject + class FindDuplicates : public TQObject { Q_OBJECT public: - typedef QValueList<BibTeX::Element*> DuplicateClique; - typedef QValueList<DuplicateClique> DuplicateCliqueList; + typedef TQValueList<BibTeX::Element*> DuplicateClique; + typedef TQValueList<DuplicateClique> DuplicateCliqueList; /** * Find duplicates in a given BibTeX file. The sensitivity parameter controls the distance between two elements where both elements are considered to be duplicates. The parent object is used as a progress dialog's parent. @@ -45,7 +45,7 @@ namespace KBibTeX * @param parent * @return */ - FindDuplicates( DuplicateCliqueList &result, unsigned int sensitivity, BibTeX::File *file, QWidget *parent ); + FindDuplicates( DuplicateCliqueList &result, unsigned int sensitivity, BibTeX::File *file, TQWidget *parent ); ~FindDuplicates(); @@ -55,24 +55,24 @@ namespace KBibTeX static const unsigned int maxDistance; protected: - void determineDistances( BibTeX::File *file, unsigned int *distVector, QMap<BibTeX::Element*, int> &mapElementToIndex, KProgressDialog *progDlg ); - void buildClique( DuplicateCliqueList &result, BibTeX::File *file, unsigned int *distVector, QMap<BibTeX::Element*, int> &mapElementToIndex, unsigned int sensitivity ); + void determineDistances( BibTeX::File *file, unsigned int *distVector, TQMap<BibTeX::Element*, int> &mapElementToIndex, KProgressDialog *progDlg ); + void buildClique( DuplicateCliqueList &result, BibTeX::File *file, unsigned int *distVector, TQMap<BibTeX::Element*, int> &mapElementToIndex, unsigned int sensitivity ); unsigned int entryDistance( BibTeX::Entry *entryA, BibTeX::Entry *entryB ); unsigned int macroDistance( BibTeX::Macro *macroA, BibTeX::Macro *macroB ); unsigned int preambleDistance( BibTeX::Preamble *preambleA, BibTeX::Preamble *preambleB ); - static QString extractTitle( BibTeX::Entry *entry ); - static QStringList authorsLastName( BibTeX::Entry *entry ); + static TQString extractTitle( BibTeX::Entry *entry ); + static TQStringList authorsLastName( BibTeX::Entry *entry ); static int extractYear( BibTeX::Entry *entry ); - static QString extractMacroKey( BibTeX::Macro *macro ); - static QString extractMacroValue( BibTeX::Macro *macro ); + static TQString extractMacroKey( BibTeX::Macro *macro ); + static TQString extractMacroValue( BibTeX::Macro *macro ); private: bool m_doCancel; - double levenshteinDistance( const QStringList &s, const QStringList &t ); - double levenshteinDistance( const QString &s, const QString &t ); - double levenshteinDistanceWord( const QString &s, const QString &t ); + double levenshteinDistance( const TQStringList &s, const TQStringList &t ); + double levenshteinDistance( const TQString &s, const TQString &t ); + double levenshteinDistanceWord( const TQString &s, const TQString &t ); int arrayOffset( int a, int b ); void sort( unsigned int *array, int len ); |