|
Anti-Plagiat Version 1.0
|
00001 /*********************************************************************** 00002 * Module: Document.h 00003 * Author: RONGIARD Fabien 00004 * DUREUIL Brice 00005 * CRESSON Thomas 00006 * NAJAR Soufiene 00007 * FATNI Elkhader 00008 * Modified: vendredi 26 mars 2011 16:46:28 00009 * Purpose: Declaration of the class Document 00010 ***********************************************************************/ 00011 00012 #ifndef DOCUMENT_H 00013 #define DOCUMENT_H 00014 00027 #include <QString> 00028 #include "moteurRecherche.h" 00029 #include "ihm.h" 00030 #include "google.h" 00031 #include "yahoo.h" 00032 #include "bing.h" 00033 #include "listTextCible.h" 00034 #include "textCible.h" 00035 #include "textdocx.h" 00036 #include "textPdf.h" 00037 #include "textodt.h" 00038 #include <QObject> 00039 #include <QStringList> 00040 #include <QtGlobal> 00041 00042 class MoteurRecherche; 00043 class Ihm; 00044 class Google; 00045 class Yahoo; 00046 class ListTextCicble; 00047 class TextCible; 00048 class Extension; 00049 class TextDocx; 00050 class TextPdf; 00051 class TextOdt; 00052 00061 typedef struct MemeSource MemeSource; 00062 struct MemeSource 00063 { 00064 int position; 00065 QString text; 00066 }; 00067 00068 00076 class Document : public QObject 00077 { 00078 00079 Q_OBJECT 00080 00081 public: 00088 Document(Ihm* interface); 00094 ~Document(); 00100 QString getText(); 00106 void setText(QString text); 00114 void traiterDocument(); 00121 void traiterDossier(); 00130 void traiterEnvoie(int idMoteurRecherche); 00135 void initialisation(); 00142 void determinTextCible(int nbMots); 00148 bool textIsPlagier(); 00155 bool setFile(QString file); 00163 QString getDocumentEnrichi(int mode); 00169 QString getUrlTextPlagier(); 00178 void determinTextCibleFile(int nbMots, bool tri_police, bool tri_size); 00185 QList<MemeSource> getMemeSource(QString source); 00192 int getNbSource(); 00199 int getPrCentPlagier(); 00206 QString getListSource(); 00215 void adaptNbCible(int prCent,int maxReq,int nbMotsParTest); 00221 void traiterEnvoieDossier(); 00222 00223 private: 00224 QString m_text; 00225 Extension *m_file; 00226 int m_indiceCible[3]; 00227 int m_nbRequet; 00228 int m_requet; 00229 bool m_annuler; 00230 ListTextCicble m_textCible; 00231 QList<MoteurRecherche*> m_moteurRecherche; 00232 Ihm *m_ihm; 00233 QDir m_dir; 00234 QStringList m_listFile; 00235 int m_indiceListFile; 00238 public slots: 00245 void traiterReponse(int idMoteurRecherche); 00251 void annulerTraitement(); 00258 void exportHtml(QString file); 00259 00260 signals: 00264 void traitementFini(); 00271 void progress(int valeur,QString text = QString("")); 00272 00273 }; 00274 00275 #endif /* DOCUMENT_H */ 00276
1.7.3