thumbnail.h 1.24 KB
Newer Older
Albert Astals Cid's avatar
Albert Astals Cid committed
1
/***************************************************************************
2
 *   Copyright (C) 2004 by Albert Astals Cid <tsdgeos@terra.es>            *
Albert Astals Cid's avatar
Albert Astals Cid committed
3
4
5
6
7
8
9
10
11
 *                                                                         *
 *   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 THUMBNAIL_H
#define THUMBNAIL_H
12

13
#include <qwidget.h>
Albert Astals Cid's avatar
Albert Astals Cid committed
14
15

class QLabel;
16
class KPDFPage;
Albert Astals Cid's avatar
Albert Astals Cid committed
17

18
class Thumbnail : public QWidget
Albert Astals Cid's avatar
Albert Astals Cid committed
19
20
{
public:
21
    Thumbnail(QWidget *parent, const KPDFPage *page);
Albert Astals Cid's avatar
Albert Astals Cid committed
22

23
24
    // resize / select commands
    int setThumbnailWidth(int width);
Albert Astals Cid's avatar
Albert Astals Cid committed
25
26
    void setSelected(bool selected);

27
28
29
30
    // query methods
    int pageNumber() const;
    int previewWidth() const;
    int previewHeight() const;
Enrico Ros's avatar
Enrico Ros committed
31

32
33
34
protected:
    void paintEvent(QPaintEvent *);

Albert Astals Cid's avatar
Albert Astals Cid committed
35
private:
36
    const KPDFPage *m_page;
37
38
    uint m_previewWidth;
    uint m_previewHeight;
39
40
41
42
    bool m_selected;
    uint m_labelNumber;
    uint m_labelHeight;
    uint m_labelWidth;
Albert Astals Cid's avatar
Albert Astals Cid committed
43
44
45
};

#endif