compile
[kdegraphics.git] / okular / ui / toc.h
blobaa7363e83da6fad73158f12b6c1ef3e449d2cc5d
1 /***************************************************************************
2 * Copyright (C) 2004-2006 by Albert Astals Cid <tsdgeos@terra.es> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 ***************************************************************************/
10 #ifndef _OKULAR_TOC_H_
11 #define _OKULAR_TOC_H_
13 #include <qwidget.h>
14 #include "core/observer.h"
16 class QDomNode;
17 class QModelIndex;
18 class QTreeView;
19 class KTreeViewSearchLine;
20 class TOCModel;
22 namespace Okular {
23 class Document;
26 class TOC : public QWidget, public Okular::DocumentObserver
28 Q_OBJECT
29 public:
30 TOC(QWidget *parent, Okular::Document *document);
31 ~TOC();
33 // inherited from DocumentObserver
34 uint observerId() const;
35 void notifySetup( const QVector< Okular::Page * > & pages, int setupFlags );
36 void notifyViewportChanged( bool smoothMove );
38 void reparseConfig();
40 signals:
41 void hasTOC(bool has);
43 private slots:
44 void slotExecuted( const QModelIndex & );
46 private:
47 Okular::Document *m_document;
48 QTreeView *m_treeView;
49 KTreeViewSearchLine *m_searchLine;
50 TOCModel *m_model;
51 int m_currentPage;
54 #endif