57 lines
1.4 KiB
C
57 lines
1.4 KiB
C
|
|
#ifndef CACCIDENTREVIEWDIALOG_H
|
|||
|
|
#define CACCIDENTREVIEWDIALOG_H
|
|||
|
|
|
|||
|
|
#include <QObject>
|
|||
|
|
#include <QDialog>
|
|||
|
|
#include <QMap>
|
|||
|
|
|
|||
|
|
struct ST_NODE
|
|||
|
|
{
|
|||
|
|
QString name;
|
|||
|
|
int used;
|
|||
|
|
int type;
|
|||
|
|
QString icon;
|
|||
|
|
int web;
|
|||
|
|
QString data;
|
|||
|
|
QString webData;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
class QTreeWidget;
|
|||
|
|
class QTreeWidgetItem;
|
|||
|
|
class CAccidentReviewDialog : public QDialog
|
|||
|
|
{
|
|||
|
|
Q_OBJECT
|
|||
|
|
public:
|
|||
|
|
enum Node_Enable{Enable = 1,Disable = 2};
|
|||
|
|
CAccidentReviewDialog(const QString &path, QWidget *parent = Q_NULLPTR);
|
|||
|
|
~CAccidentReviewDialog();
|
|||
|
|
|
|||
|
|
QString getCurrentGraph();
|
|||
|
|
|
|||
|
|
private slots:
|
|||
|
|
void slotConfirm();
|
|||
|
|
void slotCancel();
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
void initView();
|
|||
|
|
void initTree();
|
|||
|
|
void getFilterNames(const QString &path);
|
|||
|
|
QStringList getAllFile(const QString &path, const QString &relativePath,
|
|||
|
|
const QString &filter);
|
|||
|
|
void treeFilter();
|
|||
|
|
|
|||
|
|
void addChildLevelItem(QTreeWidgetItem *item, const QPair<int, ST_NODE> &node,
|
|||
|
|
const QMap<int, QList<QPair<int, ST_NODE> > > &navMap);
|
|||
|
|
QTreeWidgetItem* getAddLevelItem(const ST_NODE& st_node);
|
|||
|
|
void readNavJson(const QString &path, QMap<int, QList<QPair<int, ST_NODE>>>& map);
|
|||
|
|
void makeStButton(ST_NODE &st_Node, const QJsonObject &object);
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
QTreeWidget * m_treeWidget;
|
|||
|
|
QPushButton * m_confirmBtn;
|
|||
|
|
QPushButton * m_cancelBtn;
|
|||
|
|
QStringList m_fileNameList;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
#endif // CACCIDENTREVIEWDIALOG_H
|