author | llornkcor <llornkcor> | 2002-11-03 17:59:00 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-03 17:59:00 (UTC) |
commit | 16e8fad81f7ee6045990f48edc84542638bf07d7 (patch) (side-by-side diff) | |
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) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/showimg/ImageFileSelector.h | 61 |
1 files changed, 30 insertions, 31 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 @@ #include "qpe/applnk.h" class QScrollView; class QLabel; +//class QValueList; class ThumbWidget : public QWidget { Q_OBJECT public: ThumbWidget(QPixmap p,QString text,const DocLnk& f,QWidget *parent=0,int width=-1); - ~ThumbWidget() - { - - } + ~ThumbWidget() { } - DocLnk file() const - { + DocLnk file() const { return fl; } @@ -44,16 +41,30 @@ private: DocLnk fl; }; + + +class ImageFileSelectorItem : public QListViewItem +{ +public: + ImageFileSelectorItem( QListView *parent, const DocLnk& f ); + ~ImageFileSelectorItem(); + + DocLnk file() const { + return fl; + } +private: + DocLnk fl; +}; + class ImageFileSelector : public QWidgetStack { Q_OBJECT public: - enum CURRENT_VIEW - { + enum CURRENT_VIEW { THUMBNAIL, DETAILED, UNKNOWN }; @@ -67,13 +78,22 @@ class ImageFileSelector : public QWidgetStack const DocLnk *selected(); void setView(CURRENT_VIEW v); - CURRENT_VIEW view() - { + CURRENT_VIEW view() { return cView; } + QValueList<DocLnk> fileList() const { + ((ImageFileSelector*)this)->fileCount(); // ensure all loaded when this is extended + QValueList<DocLnk> list; + ImageFileSelectorItem *item = (ImageFileSelectorItem *)detailed->firstChild(); + while (item) { + list.append(item->file()); + item = (ImageFileSelectorItem *)item->nextSibling(); + } + return list; + } public slots: void switchView(); @@ -108,28 +128,7 @@ private: QWidget *background; QGridLayout *gl; }; - - -class ImageFileSelectorItem : public QListViewItem -{ -public: - ImageFileSelectorItem( QListView *parent, const DocLnk& f ); - ~ImageFileSelectorItem(); - - DocLnk file() const - { - return fl; - } - - -private: - DocLnk fl; -}; - - - - #endif // IMAGEFILE_SELECTOR_H |