#ifndef AWQUESTIONNAVIGATE_H
#define AWQUESTIONNAVIGATE_H

#include <QWidget>
#include "CHttpBll.h"
#include "awqn_item.h"

namespace Ui {
class awQuestionNavigate;
}

enum class ITEM_SHOW_TYPE
{
    ist_showAll = 1,
    ist_showMarked,
    ist_showAnswered,
    ist_showUnanswered
};

class awQuestionNavigate : public QWidget
{
    Q_OBJECT
signals:
    void showSubQuestion(QString sQuestionId, int nOrder, bool bHasContent);
public:
    explicit awQuestionNavigate(CPaperGroupStruct &pgs, QWidget *parent = nullptr);
    ~awQuestionNavigate();

    int setUI(const int nWidth);
    void refreshStatus();
    int setShowType(ITEM_SHOW_TYPE type);
private:
    int showItems(std::vector<awqn_item*> vItemList);

    Ui::awQuestionNavigate *ui;

    CPaperGroupStruct &m_pgs;
    std::vector<awqn_item*> m_vItemList;
};

#endif // AWQUESTIONNAVIGATE_H
