/*******************************************************************************
*                                                                              *
* Société de Transports de Montréal.                                    	   *
* 2012                                                                         *
*                                                                              *
* Projet Zones Tests                                                           *
*                                                                              *
*                                                                              *
*                                                                              *
*******************************************************************************/
/*
    Description:
    Description du fichier si nécessaire.

*/

/* ************************************************************************** */
/* Revision:
### 20131024 JFM
    Verision d'origine.

### YYYMMDD Description du besoin ou du bug
    Description du changement.
 */

/* ************************************************************************** */


#ifndef ZTLOGSLISTPAGE_H
#define ZTLOGSLISTPAGE_H

#include "GlobalDefine.h"
#include <QGraphicsWidget>
#include "Guipage.h"
#include <QString>
#include "PushButton.h"
#include "TextButtonWidget.h"
#include <QTableWidget>
#include <QCheckBox>
#include <QComboBox>
#include "ZTData.h"
#include "ZTLogFilesMgr.h"

class COutilZT;

class CZTLogsListPage : public CGuiPage
{
Q_OBJECT
public:
    virtual ~CZTLogsListPage();
    CZTLogsListPage(QGraphicsWidget *Parent = 0);


    COutilZT *mProgramHandle;
    CZTLogFilesMgr *mZTLogFilesManager;

	unsigned int RefreshList();

	virtual void resizeEvent(QGraphicsSceneResizeEvent *event);
	virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
	virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);

private:

    QTableWidget *mZTLogsTable;
    QGraphicsTextItem *mSummaryText;
    QTimer *mListParsingTimer;
    QComboBox *mStationsFilterComboBox;

    QString mStationFilter;

    QList<CZTLogFileInfo> *mZTLogFilesList;


	void ClearTable();



public slots:
	void ButtonClicked(CTextButtonWidget *);
	void LogsTableCellClicked(int, int);
    void LogsTableCellSelected(int,int,int,int);
    void CheckBoxClicked(int);
    void TableDoubleClicked(int,int);
    void StationFilterSelected(int);

//    void ParsingTimerExipred();

};

#endif // LOGSLISTPAGE_H
