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 @@ -14,2 +14,3 @@ class QScrollView; class QLabel; +//class QValueList; @@ -18,11 +19,7 @@ class ThumbWidget : public QWidget Q_OBJECT - public: +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; @@ -47,2 +44,17 @@ private: + + +class ImageFileSelectorItem : public QListViewItem +{ +public: + ImageFileSelectorItem( QListView *parent, const DocLnk& f ); + ~ImageFileSelectorItem(); + + DocLnk file() const { + return fl; + } +private: + DocLnk fl; +}; + class ImageFileSelector : public QWidgetStack @@ -51,6 +63,5 @@ class ImageFileSelector : public QWidgetStack - public: +public: - enum CURRENT_VIEW - { + enum CURRENT_VIEW { THUMBNAIL, @@ -70,4 +81,3 @@ class ImageFileSelector : public QWidgetStack - CURRENT_VIEW view() - { + CURRENT_VIEW view() { return cView; @@ -75,2 +85,12 @@ class ImageFileSelector : public QWidgetStack + 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; + } @@ -111,23 +131,2 @@ private: }; - - -class ImageFileSelectorItem : public QListViewItem -{ -public: - ImageFileSelectorItem( QListView *parent, const DocLnk& f ); - ~ImageFileSelectorItem(); - - DocLnk file() const - { - return fl; - } - - -private: - DocLnk fl; -}; - - - - #endif // IMAGEFILE_SELECTOR_H |