Diffstat (limited to 'noncore/graphics/drawpad/thumbnailview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/thumbnailview.h | 53 |
1 files changed, 43 insertions, 10 deletions
diff --git a/noncore/graphics/drawpad/thumbnailview.h b/noncore/graphics/drawpad/thumbnailview.h index c74730d..ae97ff1 100644 --- a/noncore/graphics/drawpad/thumbnailview.h +++ b/noncore/graphics/drawpad/thumbnailview.h | |||
@@ -11,30 +11,63 @@ | |||
11 | * * | 11 | * * |
12 | ***************************************************************************/ | 12 | ***************************************************************************/ |
13 | 13 | ||
14 | #ifndef THUMBNAILVIEW_H | 14 | #ifndef THUMBNAILVIEW_H |
15 | #define THUMBNAILVIEW_H | 15 | #define THUMBNAILVIEW_H |
16 | 16 | ||
17 | #include <qdialog.h> | 17 | #include <qwidget.h> |
18 | #include <qlistview.h> | ||
18 | 19 | ||
19 | #include <qlist.h> | 20 | class DrawPadCanvas; |
21 | class Page; | ||
20 | 22 | ||
21 | class QListView; | 23 | class PageListViewItem : public QListViewItem |
24 | { | ||
25 | public: | ||
26 | PageListViewItem(Page* page, QListView* parent); | ||
27 | ~PageListViewItem(); | ||
22 | 28 | ||
23 | class Page; | 29 | Page* page() const; |
24 | 30 | ||
25 | class ThumbnailView : public QDialog | 31 | private: |
26 | { | 32 | Page* m_pPage; |
27 | Q_OBJECT | 33 | }; |
28 | 34 | ||
35 | class PageListView : public QListView | ||
36 | { | ||
29 | public: | 37 | public: |
30 | ThumbnailView(QList<Page> pages, QWidget* parent = 0, const char* name = 0); | 38 | PageListView(DrawPadCanvas* drawPadCanvas, QWidget* parent = 0, const char* name = 0); |
31 | ~ThumbnailView(); | 39 | ~PageListView(); |
40 | |||
41 | void updateView(); | ||
42 | |||
43 | Page* selected() const; | ||
32 | 44 | ||
33 | protected: | 45 | protected: |
34 | void resizeEvent(QResizeEvent* e); | 46 | void resizeEvent(QResizeEvent* e); |
35 | 47 | ||
36 | private: | 48 | private: |
37 | QListView* m_pListView; | 49 | DrawPadCanvas* m_pDrawPadCanvas; |
50 | }; | ||
51 | |||
52 | class ThumbnailView : public QWidget | ||
53 | { | ||
54 | Q_OBJECT | ||
55 | |||
56 | public: | ||
57 | ThumbnailView(DrawPadCanvas* drawPadCanvas, QWidget* parent = 0, const char* name = 0); | ||
58 | ~ThumbnailView(); | ||
59 | |||
60 | void hide(); | ||
61 | void exec(); | ||
62 | |||
63 | public slots: | ||
64 | void deletePage(); | ||
65 | |||
66 | private: | ||
67 | bool inLoop; | ||
68 | DrawPadCanvas* m_pDrawPadCanvas; | ||
69 | |||
70 | PageListView* m_pPageListView; | ||
38 | }; | 71 | }; |
39 | 72 | ||
40 | #endif // THUMBNAILVIEW_H | 73 | #endif // THUMBNAILVIEW_H |