author | llornkcor <llornkcor> | 2002-11-03 17:59:00 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-03 17:59:00 (UTC) |
commit | 16e8fad81f7ee6045990f48edc84542638bf07d7 (patch) (unidiff) | |
tree | 96d836f914e0d1104d7c84830acac08a43ee4ac2 /noncore/multimedia/showimg/ImageFileSelector.h | |
parent | 2981b8f55f4a33860452f4571ef9f04781267489 (diff) | |
download | opie-16e8fad81f7ee6045990f48edc84542638bf07d7.zip opie-16e8fad81f7ee6045990f48edc84542638bf07d7.tar.gz opie-16e8fad81f7ee6045990f48edc84542638bf07d7.tar.bz2 |
added preferences dialog, and added slidshow
Diffstat (limited to 'noncore/multimedia/showimg/ImageFileSelector.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/showimg/ImageFileSelector.h | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/noncore/multimedia/showimg/ImageFileSelector.h b/noncore/multimedia/showimg/ImageFileSelector.h index 2c346c4..798ebcc 100644 --- a/noncore/multimedia/showimg/ImageFileSelector.h +++ b/noncore/multimedia/showimg/ImageFileSelector.h | |||
@@ -11,21 +11,18 @@ | |||
11 | #include "qpe/applnk.h" | 11 | #include "qpe/applnk.h" |
12 | 12 | ||
13 | class QScrollView; | 13 | class QScrollView; |
14 | class QLabel; | 14 | class QLabel; |
15 | //class QValueList; | ||
15 | 16 | ||
16 | class ThumbWidget : public QWidget | 17 | class ThumbWidget : public QWidget |
17 | { | 18 | { |
18 | Q_OBJECT | 19 | Q_OBJECT |
19 | public: | 20 | public: |
20 | ThumbWidget(QPixmap p,QString text,const DocLnk& f,QWidget *parent=0,int width=-1); | 21 | ThumbWidget(QPixmap p,QString text,const DocLnk& f,QWidget *parent=0,int width=-1); |
21 | ~ThumbWidget() | 22 | ~ThumbWidget() { } |
22 | { | ||
23 | |||
24 | } | ||
25 | 23 | ||
26 | DocLnk file() const | 24 | DocLnk file() const { |
27 | { | ||
28 | return fl; | 25 | return fl; |
29 | } | 26 | } |
30 | 27 | ||
31 | 28 | ||
@@ -44,16 +41,30 @@ private: | |||
44 | DocLnk fl; | 41 | DocLnk fl; |
45 | }; | 42 | }; |
46 | 43 | ||
47 | 44 | ||
45 | |||
46 | |||
47 | class ImageFileSelectorItem : public QListViewItem | ||
48 | { | ||
49 | public: | ||
50 | ImageFileSelectorItem( QListView *parent, const DocLnk& f ); | ||
51 | ~ImageFileSelectorItem(); | ||
52 | |||
53 | DocLnk file() const { | ||
54 | return fl; | ||
55 | } | ||
56 | private: | ||
57 | DocLnk fl; | ||
58 | }; | ||
59 | |||
48 | class ImageFileSelector : public QWidgetStack | 60 | class ImageFileSelector : public QWidgetStack |
49 | { | 61 | { |
50 | Q_OBJECT | 62 | Q_OBJECT |
51 | 63 | ||
52 | public: | 64 | public: |
53 | 65 | ||
54 | enum CURRENT_VIEW | 66 | enum CURRENT_VIEW { |
55 | { | ||
56 | THUMBNAIL, | 67 | THUMBNAIL, |
57 | DETAILED, | 68 | DETAILED, |
58 | UNKNOWN | 69 | UNKNOWN |
59 | }; | 70 | }; |
@@ -67,13 +78,22 @@ class ImageFileSelector : public QWidgetStack | |||
67 | const DocLnk *selected(); | 78 | const DocLnk *selected(); |
68 | 79 | ||
69 | void setView(CURRENT_VIEW v); | 80 | void setView(CURRENT_VIEW v); |
70 | 81 | ||
71 | CURRENT_VIEW view() | 82 | CURRENT_VIEW view() { |
72 | { | ||
73 | return cView; | 83 | return cView; |
74 | } | 84 | } |
75 | 85 | ||
86 | QValueList<DocLnk> fileList() const { | ||
87 | ((ImageFileSelector*)this)->fileCount(); // ensure all loaded when this is extended | ||
88 | QValueList<DocLnk> list; | ||
89 | ImageFileSelectorItem *item = (ImageFileSelectorItem *)detailed->firstChild(); | ||
90 | while (item) { | ||
91 | list.append(item->file()); | ||
92 | item = (ImageFileSelectorItem *)item->nextSibling(); | ||
93 | } | ||
94 | return list; | ||
95 | } | ||
76 | 96 | ||
77 | public slots: | 97 | public slots: |
78 | 98 | ||
79 | void switchView(); | 99 | void switchView(); |
@@ -108,28 +128,7 @@ private: | |||
108 | QWidget *background; | 128 | QWidget *background; |
109 | QGridLayout *gl; | 129 | QGridLayout *gl; |
110 | 130 | ||
111 | }; | 131 | }; |
112 | |||
113 | |||
114 | class ImageFileSelectorItem : public QListViewItem | ||
115 | { | ||
116 | public: | ||
117 | ImageFileSelectorItem( QListView *parent, const DocLnk& f ); | ||
118 | ~ImageFileSelectorItem(); | ||
119 | |||
120 | DocLnk file() const | ||
121 | { | ||
122 | return fl; | ||
123 | } | ||
124 | |||
125 | |||
126 | private: | ||
127 | DocLnk fl; | ||
128 | }; | ||
129 | |||
130 | |||
131 | |||
132 | |||
133 | #endif // IMAGEFILE_SELECTOR_H | 132 | #endif // IMAGEFILE_SELECTOR_H |
134 | 133 | ||
135 | 134 | ||