• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegraphics API Reference
  • KDE Home
  • Contact Us
 

okular

  • sources
  • kde-4.12
  • kdegraphics
  • okular
  • core
bookmarkmanager.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2006 by Pino Toscano <pino@kde.org> *
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  ***************************************************************************/
9 
10 #ifndef _OKULAR_BOOKMARK_MANAGER_H_
11 #define _OKULAR_BOOKMARK_MANAGER_H_
12 
13 #include <kbookmark.h>
14 
15 #include "okular_export.h"
16 
17 class QAction;
18 class KUrl;
19 
20 namespace Okular {
21 
22 class Document;
23 class DocumentPrivate;
24 class DocumentViewport;
25 
32 class OKULAR_EXPORT BookmarkManager : public QObject
33 {
34  Q_OBJECT
35 
36  public:
37  virtual ~BookmarkManager();
38 
42  KUrl::List files() const;
43 
47  KBookmark::List bookmarks( const KUrl& url ) const;
48 
53  KBookmark::List bookmarks() const;
54 
59  KBookmark::List bookmarks( int page ) const;
60 
65  KBookmark bookmark( int page ) const;
66 
71  KBookmark bookmark( const DocumentViewport &viewport ) const;
72 
76  void save() const;
77 
81  void addBookmark( int page );
82 
87  void addBookmark( const DocumentViewport &vp );
88 
95  bool addBookmark( const KUrl& referurl, const Okular::DocumentViewport& vp, const QString& title = QString() );
96 
100  void removeBookmark( int page );
101 
106  void removeBookmark( const DocumentViewport &vp );
107 
111  int removeBookmark( const KUrl& referurl, const KBookmark& bm );
112 
120  void removeBookmarks( const KUrl& referurl, const KBookmark::List& list );
121 
126  void renameBookmark( KBookmark* bm, const QString& newName );
127 
133  void renameBookmark( const KUrl& referurl, const QString& newName );
134 
139  QString titleForUrl( const KUrl& referurl ) const;
140 
144  bool isBookmarked( int page ) const;
145 
150  bool isBookmarked( const DocumentViewport &viewport ) const;
151 
156  KBookmark nextBookmark( const DocumentViewport &viewport ) const;
157 
162  KBookmark previousBookmark( const DocumentViewport &viewport ) const;
163 
170  QList< QAction* > actionsForUrl( const KUrl& url ) const;
171 
172  Q_SIGNALS:
176  void openUrl( const KUrl& url );
177 
181  void saved();
182 
188  void bookmarksChanged( const KUrl& url );
189 
190  private:
191  class Private;
192  Private * const d;
193  friend class Private;
194 
195  // private interface used by the Document
196  friend class Document;
197  friend class DocumentPrivate;
198 
199  BookmarkManager( DocumentPrivate * document );
200 
201  void setUrl( const KUrl& url );
202  bool setPageBookmark( int page );
203  bool removePageBookmark( int page );
204 
205  Q_DISABLE_COPY( BookmarkManager )
206 
207  Q_PRIVATE_SLOT( d, void _o_changed( const QString &, const QString & ) )
208 };
209 
210 }
211 
212 #endif
QObject
okular_export.h
Okular::Document
The Document.
Definition: document.h:84
Okular::DocumentPrivate
Definition: document_p.h:83
OKULAR_EXPORT
#define OKULAR_EXPORT
Definition: okular_export.h:30
Okular::DocumentViewport
A view on the document.
Definition: document.h:1003
Okular::BookmarkManager
Bookmarks manager utility.
Definition: bookmarkmanager.h:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okular

Skip menu "okular"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal