#ifndef CCTRLFILEDIR_H
#define CCTRLFILEDIR_H

#include <QTreeWidget>
#include <QString>
#include <QIcon>
class CCtrlFileDir : public QTreeWidget
{
    Q_OBJECT
public:
    enum _item_type
    {
        ITEM_DIR,
        ITEM_FILE,
    };
    explicit CCtrlFileDir(QWidget *parent = 0);
    void reBuildCtrl();
    QString GetSelRelPath();
    QString GetSelRelDir();
    QString GetSelFullPath();
    QString GetRootPath();
public slots:
    void MFresh();
public:
    QTreeWidgetItem* m_pRootItem;
    QTreeWidgetItem* m_pSelItem;
    QString m_filters;
    QString rootPath;
public Q_SLOTS:
    void MUpdateCtrl(QTreeWidgetItem *current, QTreeWidgetItem *previous);
public:
    QIcon IconRoot;
    QIcon IconDir;
    QIcon IconData;

};

#endif // CCTRLFILEDIR_H
