193 lines
5.0 KiB
C++
193 lines
5.0 KiB
C++
#ifndef SANALY1
|
|
#define SANALY1
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
#include <QCalendarWidget>
|
|
#include <QDateEdit>
|
|
#include <QPushButton>
|
|
#include <QHBoxLayout>
|
|
#include <QComboBox>
|
|
#include <QLineEdit>
|
|
#include <QGroupBox>
|
|
#include <QListWidget>
|
|
#include <QTabWidget>
|
|
#include <QRadioButton>
|
|
#include <QButtonGroup>
|
|
#include <QTableWidget>
|
|
#include <QProgressBar>
|
|
#include <QMenuBar>
|
|
#include <QSqlDatabase>
|
|
#include <QListWidgetItem>
|
|
#include "stable.h"
|
|
|
|
class SAnaly1 : public QWidget
|
|
{
|
|
enum E_COLUMN
|
|
{
|
|
E_COLUMN_DATABASE=0,
|
|
E_COLUMN_NAME,
|
|
E_COLUMN_DATE,
|
|
E_COLUMN_COUNT,
|
|
};
|
|
|
|
enum E_LENGTH_COMP
|
|
{
|
|
E_LENGTH_COMP_GREATER = 0,
|
|
E_LENGTH_COMP_LESS,
|
|
E_LENGTH_COMP_EQUAL,
|
|
};
|
|
Q_OBJECT
|
|
public:
|
|
SAnaly1(QWidget *parent = 0);
|
|
~SAnaly1();
|
|
int getThread();
|
|
unsigned int getDateStart();
|
|
unsigned int getDateEnd();
|
|
int getPeriod();
|
|
QStringList getMorphereList();
|
|
bool getDateAll();
|
|
private:
|
|
// Data
|
|
QListWidget *m_plwData;
|
|
// Date
|
|
QCalendarWidget *m_pcw;
|
|
QDateEdit *m_pdeStart;
|
|
QDateEdit *m_pdeEnd;
|
|
//QPushButton *m_ppbInsertCalc;
|
|
//QComboBox *m_pcbDateCatalog;
|
|
int m_nColumn;
|
|
// Keyword
|
|
QComboBox *m_pcbCatalog;
|
|
QComboBox *m_pcbKeyword;
|
|
QComboBox *m_pcbMethod;
|
|
QLineEdit *m_pleString;
|
|
//QPushButton *m_ppbInsertSearch;
|
|
// Length
|
|
QComboBox *m_pcbLengthCatalog;
|
|
QComboBox *m_pcbLengthComp;
|
|
QComboBox *m_pcbLengthInsDel;
|
|
QLineEdit *m_pleLength;
|
|
// Filter
|
|
QListWidget *m_plwFilterGroup;
|
|
|
|
QListWidget *m_plwFilter;
|
|
QLineEdit *m_pleFilterGroup;
|
|
QGroupBox *m_pgbFilter;
|
|
// Replace
|
|
QComboBox *m_pcbReplaceCatalog;
|
|
QComboBox *m_pcbReplaceFind;
|
|
QLineEdit *m_pleReplaceFind;
|
|
QLineEdit *m_pleReplace;
|
|
|
|
// Count
|
|
QComboBox *m_pcbCountCatalog;
|
|
|
|
//
|
|
QTabWidget *m_ptwData;
|
|
//
|
|
QProgressBar *m_pProgress;
|
|
// Column
|
|
QVector <QStringList> m_vecColumn;
|
|
|
|
// MorphereList
|
|
QListWidget *m_plwMorphereList;
|
|
QListWidget *m_plwMorphereAdd;
|
|
|
|
QComboBox *m_pcbDate;
|
|
QComboBox *m_pcbPeriod;
|
|
|
|
QLineEdit *m_pleTop;
|
|
QLineEdit *m_pleKeyword;
|
|
|
|
QComboBox *m_pcbThread;
|
|
QComboBox *m_pcbSort;
|
|
|
|
QListWidgetItem **m_plwiMorphere;
|
|
QStringList m_strlistMorphere;
|
|
QStringList m_strlistMorphereko;
|
|
|
|
QRadioButton *m_rbDateMorphere;
|
|
QRadioButton *m_rbMorphereDate;
|
|
QButtonGroup *m_bgRadioGroup;
|
|
|
|
|
|
public:
|
|
struct m_mapKey
|
|
{
|
|
QString strDate;
|
|
QString strMorphere;
|
|
QString strKeyword;
|
|
};
|
|
|
|
//QHash<m_mapKey, int> m_HashResult[16];
|
|
QHash<QString, int> m_HashResult[16];
|
|
QMap<QString, int> m_TotalResult;
|
|
QMap<QString, QMap<QString, QMap<int, QString> > > m_mapViewResult;
|
|
|
|
private:
|
|
QMenuBar *setMenuWidget();
|
|
QGroupBox *setDataWidgets();
|
|
QGroupBox *setDateWidgets();
|
|
QGroupBox *setCountWidgets();
|
|
QGroupBox *setSearchWidgets();
|
|
QGroupBox *setLengthWidgets();
|
|
QGroupBox *setFilterWidgets();
|
|
QGroupBox *setReplaceWidgets();
|
|
|
|
QGroupBox *setMorphereList();
|
|
QGroupBox *setDate();
|
|
QGroupBox *setFilter();
|
|
QGroupBox *setOther();
|
|
QGroupBox *setSort();
|
|
|
|
|
|
QTableWidget *AddTable(QString _str);
|
|
void SetTableHead();
|
|
void InsertCopyRow(int _nRow,QTableWidget *_pCurrent,QTableWidget *_pNew);
|
|
void DataReload(QString _strTableName,int _nSelect);
|
|
void InsertFilter(int _nType,QString _strJson,int _nGroup);
|
|
void InsertTimeFilter(int _nTimeCategory ,QDate _dateStart ,QDate _dateEnd ,int _nGroup);
|
|
void InsertSearchFilter(int _nArticle,int _nCategory,int _nMethod,int _nKeyword, QString _str,int _nGroup);
|
|
void InsertLengthFilter(int _nArticle,int _nCategory,int _nComp,int _nInsDel,QString _str,int _nGroup);
|
|
void InsertReplaceFilter(int _nArticle,int _nCategory,int _nFind,QString _strFind,QString _strReplace,int _nGroup);
|
|
void RefreshFilter(int _nGroup);
|
|
|
|
bool ReloadColumn();
|
|
QString GetArticleType(int _nSelect);
|
|
public slots:
|
|
void CloseTab(int index);
|
|
void DoubleClickTab(int index);
|
|
void SearchDate();
|
|
void CountSave();
|
|
void SearchKeyword();
|
|
void DataGroupRefresh();
|
|
void DataGroupItemChanged ( QListWidgetItem * item );
|
|
void FilterGroupInsert();
|
|
void FilterGroupDelete();
|
|
void FilterGroupModify();
|
|
void FilterGroupRefresh();
|
|
void currentGroupItemChanged(QListWidgetItem *_pCurrent, QListWidgetItem *_pPrev=0);
|
|
void FilterDelete();
|
|
void currentFilterItemChanged(QListWidgetItem *_pCurrent, QListWidgetItem *_pPrev=0);
|
|
void SearchLengthInsert();
|
|
void SearchReplaceInsert();
|
|
void FileNew();
|
|
void FileImport();
|
|
void FileExport();
|
|
void FileExit();
|
|
void MemClear();
|
|
void MorphereListAdd();
|
|
void MorphereListDel();
|
|
QTabWidget* getQTabWidget();
|
|
|
|
|
|
bool isSortMorphereDateChecked();
|
|
|
|
bool isSortDateMorphereChecked();
|
|
|
|
};
|
|
|
|
#endif // SANALY1
|