okular/ui/toc.h
Enrico Ros 6dd95c9e06 Viewport MOD 1. Implemented the DocumentViewport class, owned by Document.
A const reference may be asked. When set all DocumentObservers will be
notified so they can update their gfx if needed. Converted TOC, Links
to the new usage. DocumentViewport can be saved/restored to/from QString
so it can be asked as metadata and saved on document's XML. When loading
a document the viewport is restored exactly where it was when the document
was closed. More fixes with Viewport class. Swapped groupboxes in Perform
dialog. Changed members naming in DocumentObservers and inherited classes.
PageView and ThumbnailsList now linked.

Still regressions / TODOs about the Viewport thing.

svn path=/trunk/kdegraphics/kpdf/; revision=377066
2005-01-09 23:37:07 +00:00

41 lines
1.3 KiB
C++

/***************************************************************************
* Copyright (C) 2004 by Albert Astals Cid <tsdgeos@terra.es> *
* *
* 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. *
***************************************************************************/
#ifndef _KPDF_TOC_H_
#define _KPDF_TOC_H_
#include <qdom.h>
#include <klistview.h>
#include "core/observer.h"
class KPDFDocument;
class TOC : public KListView, public DocumentObserver
{
Q_OBJECT
public:
TOC(QWidget *parent, KPDFDocument *document);
// inherited from DocumentObserver
uint observerId() const;
void notifySetup( const QValueVector< KPDFPage * > & pages, bool documentChanged );
signals:
void hasTOC(bool has);
private slots:
void slotExecuted(QListViewItem *i);
private:
void addChildren( const QDomNode & parentNode, KListViewItem * parentItem = 0 );
KPDFDocument *m_document;
};
#endif