MorphereAnalyzer
git-svn-id: svn://192.168.0.12/source@76 8346c931-da38-4b9b-9d4c-e48b93cbd075
This commit is contained in:
93
MorphereAnalyzer/sanalyzer.h
Normal file
93
MorphereAnalyzer/sanalyzer.h
Normal file
@@ -0,0 +1,93 @@
|
||||
#ifndef SANALYZER
|
||||
#define SANALYZER
|
||||
|
||||
#endif // SANALYZER
|
||||
|
||||
#include <QThread>
|
||||
#include <QWidget>
|
||||
#include "widget.h"
|
||||
#include <QDebug>
|
||||
#include <QMutex>
|
||||
#include "sanaly1.h"
|
||||
#include "mecab.h"
|
||||
#include <QLibrary>
|
||||
|
||||
|
||||
|
||||
class AnalyzerThread : public QThread
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
AnalyzerThread(QObject *parent = NULL);
|
||||
AnalyzerThread(int number);
|
||||
AnalyzerThread(QMutex &_mutex, int number, int &_nCount);
|
||||
|
||||
private:
|
||||
|
||||
enum {
|
||||
MONDAY = 1,
|
||||
TUESDAY,
|
||||
WEDNESDAY,
|
||||
THURSDAY,
|
||||
FRIDAY,
|
||||
SATURDAY,
|
||||
SUNDAY
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
WEEK = 7
|
||||
};
|
||||
int num;
|
||||
QWidget *m_pQWidget;
|
||||
int m_nThread;
|
||||
QStringList m_slMorphereList;
|
||||
int m_nSource;
|
||||
bool m_bPeriod;
|
||||
bool m_bDateAll;
|
||||
int m_nPeriod; // 0 none, 1 1day, 2 1week, 3 1month;
|
||||
unsigned int m_nDateStart;
|
||||
unsigned int m_nDateEnd;
|
||||
int m_nTitleBody;
|
||||
Widget *m_pWidget;
|
||||
int m_nPosDate;
|
||||
int m_nPosBody;
|
||||
int m_nPosTitle;
|
||||
QMutex *mutex;
|
||||
SAnaly1 *pWidget;
|
||||
QTabWidget *m_pTabWidget;
|
||||
int *nCount;
|
||||
|
||||
protected:
|
||||
void run();
|
||||
|
||||
public:
|
||||
void setThreadNumber(int _nThread = 1);
|
||||
int getThreadNumber();
|
||||
void setWidget(QWidget *_pWidget);
|
||||
QWidget* getWidget();
|
||||
void setMorphereList(const QStringList morpherelist);
|
||||
void setMorphereList(const QString morphere);
|
||||
QStringList getMorphereList();
|
||||
void resetMorphereList();
|
||||
void setParametersfromWidget(QWidget *_pWidget, int _nSource);
|
||||
void setPeriod(const int _nPeriod);
|
||||
int getPeriod();
|
||||
void setDate(const QString _strStart, const QString _strEnd);
|
||||
void setDate(const QDateTime _dtStart, const QDateTime _dtEnd);
|
||||
void setDateStart(const QString _strStart);
|
||||
void setDateStart(const QDateTime _dtStart);
|
||||
void setDateEnd(const QString _strEnd);
|
||||
void setDateEnd(const QDateTime _dtStart);
|
||||
unsigned int getDateStart();
|
||||
unsigned int getDateEnd();
|
||||
void setTitleBody(const int _n);
|
||||
void setSource(QWidget* _qwidget);
|
||||
void setPosDate(const int _nPos);
|
||||
void setPosBody(const int _nPos);
|
||||
void setPosTitle(const int _nPos);
|
||||
QString getWeeksInMonth(unsigned int _nDate);
|
||||
void setAnalyzerThread(QMutex &_mutex, int number, int &_nCount);
|
||||
};
|
||||
Reference in New Issue
Block a user