summaryrefslogtreecommitdiff
path: root/noncore/multimedia/showimg/ImageFileSelector.h
authorllornkcor <llornkcor>2002-11-03 17:59:00 (UTC)
committer llornkcor <llornkcor>2002-11-03 17:59:00 (UTC)
commit16e8fad81f7ee6045990f48edc84542638bf07d7 (patch) (unidiff)
tree96d836f914e0d1104d7c84830acac08a43ee4ac2 /noncore/multimedia/showimg/ImageFileSelector.h
parent2981b8f55f4a33860452f4571ef9f04781267489 (diff)
downloadopie-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.h65
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
@@ -9,25 +9,22 @@
9 9
10#include "qpe/filemanager.h" 10#include "qpe/filemanager.h"
11#include "qpe/applnk.h" 11#include "qpe/applnk.h"
12 12
13class QScrollView; 13class QScrollView;
14class QLabel; 14class QLabel;
15//class QValueList;
15 16
16class ThumbWidget : public QWidget 17class ThumbWidget : public QWidget
17{ 18{
18 Q_OBJECT 19 Q_OBJECT
19 public: 20public:
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
32 signals: 29 signals:
33 void clicked(const DocLnk &); 30 void clicked(const DocLnk &);
@@ -42,20 +39,34 @@ private:
42 QPixmap pixmap; 39 QPixmap pixmap;
43 QLabel *description; 40 QLabel *description;
44 DocLnk fl; 41 DocLnk fl;
45}; 42};
46 43
47 44
45
46
47class ImageFileSelectorItem : public QListViewItem
48{
49public:
50 ImageFileSelectorItem( QListView *parent, const DocLnk& f );
51 ~ImageFileSelectorItem();
52
53 DocLnk file() const {
54 return fl;
55 }
56private:
57 DocLnk fl;
58};
59
48class ImageFileSelector : public QWidgetStack 60class ImageFileSelector : public QWidgetStack
49{ 61{
50 Q_OBJECT 62 Q_OBJECT
51 63
52 public: 64public:
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 };
60 71
61 72
@@ -65,17 +76,26 @@ class ImageFileSelector : public QWidgetStack
65 void reread(bool purgeCache=false); 76 void reread(bool purgeCache=false);
66 int fileCount(); 77 int fileCount();
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
77public slots: 97public slots:
78 98
79 void switchView(); 99 void switchView();
80 100
81signals: 101signals:
@@ -106,30 +126,9 @@ private:
106 QScrollView *thumb; 126 QScrollView *thumb;
107 QList<ThumbWidget> tList; 127 QList<ThumbWidget> tList;
108 QWidget *background; 128 QWidget *background;
109 QGridLayout *gl; 129 QGridLayout *gl;
110 130
111}; 131};
112
113
114class ImageFileSelectorItem : public QListViewItem
115{
116public:
117 ImageFileSelectorItem( QListView *parent, const DocLnk& f );
118 ~ImageFileSelectorItem();
119
120 DocLnk file() const
121 {
122 return fl;
123 }
124
125
126private:
127 DocLnk fl;
128};
129
130
131
132
133#endif // IMAGEFILE_SELECTOR_H 132#endif // IMAGEFILE_SELECTOR_H
134 133
135 134