#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QPushButton>
#include <QLineEdit>
#include <QTimer>
#include <QDateEdit>
#include <QListWidget>
#include <QSqlDatabase>
#include <QComboBox>

class SNaverBlogManage;
class SManage;

#define SAFE_DELETE(p) {if(p) delete (p); (p) = NULL; }

class Widget : public QWidget
{
    Q_OBJECT
public:
    Widget(QWidget *parent = 0);
    ~Widget();        
public:
    void    InsertLog(int _nSelect,QString str);
private:
    QLineEdit *m_pedTime;
    QTimer m_timer;
    QSqlDatabase m_db;
    static const int C_CRAWLER_MAX = 1;
    SManage *m_pManage[C_CRAWLER_MAX];
    QListWidget	m_aResultList[C_CRAWLER_MAX];
    QString m_strFileName;
    QComboBox   *m_pcb;
    QVector <QString> m_vecSelect;

    SNaverBlogManage *m_pNaverBlog;
private:                
    QString makeCafeGetListQuery(QString _str,QDate _date,int _nPage);
    //void SaveBlog(QString _strName);
    //void SaveCafe(QString _strName);
private slots:
    void RefreshButton();
    void StartButton();
    void StopButton();
    void Update();
};

#endif // WIDGET_H
