2004-09-21 20:38:22 +00:00
|
|
|
/***************************************************************************
|
2006-02-18 12:06:52 +00:00
|
|
|
* Copyright (C) 2004-2006 by Albert Astals Cid <tsdgeos@terra.es> *
|
2004-09-21 20:38:22 +00:00
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
2006-09-21 08:45:36 +00:00
|
|
|
#ifndef _OKULAR_TOC_H_
|
|
|
|
#define _OKULAR_TOC_H_
|
2004-09-21 20:38:22 +00:00
|
|
|
|
2006-05-28 17:27:24 +00:00
|
|
|
#include <qwidget.h>
|
2005-01-02 14:55:14 +00:00
|
|
|
#include "core/observer.h"
|
2004-09-23 21:33:53 +00:00
|
|
|
|
2006-12-22 19:26:28 +00:00
|
|
|
class QDomNode;
|
2007-09-09 16:15:33 +00:00
|
|
|
class QModelIndex;
|
|
|
|
class QTreeView;
|
|
|
|
class KTreeViewSearchLine;
|
|
|
|
class TOCModel;
|
2005-01-02 15:18:50 +00:00
|
|
|
|
2006-09-21 08:45:36 +00:00
|
|
|
namespace Okular {
|
|
|
|
class Document;
|
|
|
|
}
|
|
|
|
|
|
|
|
class TOC : public QWidget, public Okular::DocumentObserver
|
2004-09-21 20:38:22 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2004-12-11 17:25:03 +00:00
|
|
|
public:
|
2006-09-21 08:45:36 +00:00
|
|
|
TOC(QWidget *parent, Okular::Document *document);
|
2006-02-18 12:06:52 +00:00
|
|
|
~TOC();
|
2004-09-21 20:38:22 +00:00
|
|
|
|
2005-01-09 23:37:07 +00:00
|
|
|
// inherited from DocumentObserver
|
2004-12-11 17:25:03 +00:00
|
|
|
uint observerId() const;
|
2007-09-09 10:50:36 +00:00
|
|
|
void notifySetup( const QVector< Okular::Page * > & pages, int setupFlags );
|
2006-06-20 13:59:08 +00:00
|
|
|
void notifyViewportChanged( bool smoothMove );
|
2004-09-21 20:38:22 +00:00
|
|
|
|
2006-12-22 20:42:36 +00:00
|
|
|
void reparseConfig();
|
|
|
|
|
2004-12-11 17:25:03 +00:00
|
|
|
signals:
|
|
|
|
void hasTOC(bool has);
|
2004-09-23 21:33:53 +00:00
|
|
|
|
2004-12-11 17:25:03 +00:00
|
|
|
private slots:
|
2007-09-09 16:15:33 +00:00
|
|
|
void slotExecuted( const QModelIndex & );
|
2004-09-21 20:38:22 +00:00
|
|
|
|
2004-12-11 17:25:03 +00:00
|
|
|
private:
|
2006-09-21 08:45:36 +00:00
|
|
|
Okular::Document *m_document;
|
2007-09-09 16:15:33 +00:00
|
|
|
QTreeView *m_treeView;
|
|
|
|
KTreeViewSearchLine *m_searchLine;
|
|
|
|
TOCModel *m_model;
|
2006-06-20 13:59:08 +00:00
|
|
|
int m_currentPage;
|
2004-09-21 20:38:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|