author | leseb <leseb> | 2002-06-10 20:24:06 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-06-10 20:24:06 (UTC) |
commit | 743296b2abaa9278ce7b83ebde55fbf2c198e218 (patch) (unidiff) | |
tree | 22776ec0e2921fc36a61c9522e8a105e7a3eba13 /noncore/graphics/drawpad/thumbnailview.h | |
parent | 4e125ad47285d36a4be02e8b20b6fa36e387c1bc (diff) | |
download | opie-743296b2abaa9278ce7b83ebde55fbf2c198e218.zip opie-743296b2abaa9278ce7b83ebde55fbf2c198e218.tar.gz opie-743296b2abaa9278ce7b83ebde55fbf2c198e218.tar.bz2 |
Thumbnail view ready for page attributes
Diffstat (limited to 'noncore/graphics/drawpad/thumbnailview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/thumbnailview.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/noncore/graphics/drawpad/thumbnailview.h b/noncore/graphics/drawpad/thumbnailview.h index eb748fa..88c3b27 100644 --- a/noncore/graphics/drawpad/thumbnailview.h +++ b/noncore/graphics/drawpad/thumbnailview.h | |||
@@ -14,8 +14,8 @@ | |||
14 | #ifndef THUMBNAILVIEW_H | 14 | #ifndef THUMBNAILVIEW_H |
15 | #define THUMBNAILVIEW_H | 15 | #define THUMBNAILVIEW_H |
16 | 16 | ||
17 | #include <qlistbox.h> | ||
17 | #include <qwidget.h> | 18 | #include <qwidget.h> |
18 | #include <qlistview.h> | ||
19 | 19 | ||
20 | class DrawPad; | 20 | class DrawPad; |
21 | class DrawPadCanvas; | 21 | class DrawPadCanvas; |
@@ -23,32 +23,41 @@ class Page; | |||
23 | 23 | ||
24 | class QToolButton; | 24 | class QToolButton; |
25 | 25 | ||
26 | class PageListViewItem : public QListViewItem | 26 | class PageListBoxItem : public QListBoxItem |
27 | { | 27 | { |
28 | public: | 28 | public: |
29 | PageListViewItem(Page* page, QListView* parent); | 29 | PageListBoxItem(Page* page, QListBox* parent); |
30 | ~PageListViewItem(); | 30 | ~PageListBoxItem(); |
31 | |||
32 | int height(const QListBox* lb) const; | ||
33 | int width(const QListBox* lb) const; | ||
34 | void paint(QPainter *painter); | ||
31 | 35 | ||
32 | Page* page() const; | 36 | Page* page() const; |
33 | 37 | ||
34 | private: | 38 | private: |
35 | Page* m_pPage; | 39 | Page* m_pPage; |
40 | |||
41 | QPixmap m_thumbnail; | ||
42 | |||
43 | QString m_titleText; | ||
44 | QString m_dimensionText; | ||
45 | QString m_dateTimeText; | ||
46 | |||
47 | QColor m_alternateColor; | ||
36 | }; | 48 | }; |
37 | 49 | ||
38 | class PageListView : public QListView | 50 | class PageListBox : public QListBox |
39 | { | 51 | { |
40 | public: | 52 | public: |
41 | PageListView(DrawPadCanvas* drawPadCanvas, QWidget* parent = 0, const char* name = 0); | 53 | PageListBox(DrawPadCanvas* drawPadCanvas, QWidget* parent = 0, const char* name = 0); |
42 | ~PageListView(); | 54 | ~PageListBox(); |
43 | 55 | ||
44 | void updateView(); | 56 | void updateView(); |
45 | 57 | ||
46 | void select(Page* page); | 58 | void select(Page* page); |
47 | Page* selected() const; | 59 | Page* selected() const; |
48 | 60 | ||
49 | protected: | ||
50 | void resizeEvent(QResizeEvent* e); | ||
51 | |||
52 | private: | 61 | private: |
53 | DrawPadCanvas* m_pDrawPadCanvas; | 62 | DrawPadCanvas* m_pDrawPadCanvas; |
54 | }; | 63 | }; |
@@ -83,7 +92,7 @@ private: | |||
83 | QToolButton* m_pMovePageUpButton; | 92 | QToolButton* m_pMovePageUpButton; |
84 | QToolButton* m_pMovePageDownButton; | 93 | QToolButton* m_pMovePageDownButton; |
85 | 94 | ||
86 | PageListView* m_pPageListView; | 95 | PageListBox* m_pPageListBox; |
87 | }; | 96 | }; |
88 | 97 | ||
89 | #endif // THUMBNAILVIEW_H | 98 | #endif // THUMBNAILVIEW_H |