~ubuntu-branches/ubuntu/vivid/qpdfview/vivid

« back to all changes in this revision

Viewing changes to sources/documentview.h

  • Committer: Package Import Robot
  • Author(s): Benjamin Eltzner
  • Date: 2014-10-22 21:49:15 UTC
  • mfrom: (1.2.15)
  • Revision ID: package-import@ubuntu.com-20141022214915-agqeoe318lzs2s4d
Tags: 0.4.12-1
* New upstream release.
* Fixed option to zoom to selection and implemented tiled rendering
  (Closes: #739554)
* Enable support for qt5 and poppler-qt5.
* Explicit dependence on hicolor-icon-theme.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 
 
3
Copyright 2014 S. Razi Alavizadeh
3
4
Copyright 2012-2014 Adam Reichold
4
5
Copyright 2014 Dorian Scholz
5
6
 
51
52
class SearchTask;
52
53
class PresentationView;
53
54
class ShortcutHandler;
54
 
class DocumentLayout;
 
55
struct DocumentLayout;
55
56
 
56
57
class DocumentView : public QGraphicsView
57
58
{
67
68
    inline int numberOfPages() const { return m_pages.count(); }
68
69
    inline int currentPage() const { return m_currentPage; }
69
70
 
 
71
    inline bool hasFrontMatter() const { return m_firstPage > 1; }
 
72
 
 
73
    inline int firstPage() const { return m_firstPage; }
 
74
    void setFirstPage(int firstPage);
 
75
 
 
76
    QString defaultPageLabelFromNumber(int number) const;
 
77
    QString pageLabelFromNumber(int number) const;
 
78
    int pageNumberFromLabel(const QString& label) const;
 
79
 
70
80
    static QStringList openFilter();
71
81
    QStringList saveFilter() const;
72
82
 
178
188
    void startPresentation();
179
189
 
180
190
protected slots:
181
 
    void on_verticalScrollBar_valueChanged(int value);
 
191
    void on_verticalScrollBar_valueChanged();
182
192
 
183
193
    void on_autoRefresh_timeout();
184
194
    void on_prefetch_timeout();
187
197
 
188
198
    void on_searchTask_resultsReady(int index, QList< QRectF > results);
189
199
 
 
200
    void on_pages_cropRectChanged();
 
201
    void on_thumbnails_cropRectChanged();
 
202
 
190
203
    void on_pages_linkClicked(bool newTab, int page, qreal left, qreal top);
191
204
    void on_pages_linkClicked(const QString& url);
192
205
    void on_pages_linkClicked(const QString& fileName, int page);
224
237
    bool m_wasModified;
225
238
 
226
239
    int m_currentPage;
 
240
    int m_firstPage;
227
241
 
228
242
#ifdef WITH_CUPS
229
243
 
263
277
    QVector< PageItem* > m_pageItems;
264
278
    QVector< ThumbnailItem* > m_thumbnailItems;
265
279
 
266
 
    QMap< qreal, int > m_heightToIndex;
267
 
 
268
280
    QGraphicsRectItem* m_highlight;
269
281
 
270
282
    Qt::Orientation m_thumbnailsOrientation;
278
290
    void loadFallbackOutline();
279
291
    void loadDocumentDefaults();
280
292
 
 
293
    void adjustScrollBarPolicy();
 
294
 
281
295
    void prepareDocument(Model::Document* document);
282
296
    void preparePages();
283
297
    void prepareThumbnails();