1 #ifndef TOC_H 2 #define TOC_H 3 4 #include <QTreeWidget> 5 6 7 class QDomDocument; 8 class QDomNode; 9 class Viewer; 10 11 12 class Toc : public QTreeWidget { 13 Q_OBJECT 14 15 public: 16 Toc(Viewer *v, QWidget *parent = 0); 17 ~Toc(); 18 19 void init(); 20 21 public slots: 22 void goto_link(QTreeWidgetItem *item, int column); 23 24 protected: 25 bool event(QEvent *e); 26 27 private: 28 void shutdown(); 29 void build(QDomNode *node, QTreeWidgetItem *parent); 30 31 Viewer *viewer; 32 }; 33 34 #endif 35 36