summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/impl/dcim/dcim_lister.h
authorzecke <zecke>2004-08-27 22:22:44 (UTC)
committer zecke <zecke>2004-08-27 22:22:44 (UTC)
commit7d1ca5dba4cab829d9f7a8c79fb772dc3b643eac (patch) (side-by-side diff)
tree1d189e90585190465233a67c7c9a2a740cb1d98a /noncore/graphics/opie-eye/impl/dcim/dcim_lister.h
parenta6e7ebcee38719a9f33ede08ed4c8a364c2ecb20 (diff)
downloadopie-7d1ca5dba4cab829d9f7a8c79fb772dc3b643eac.zip
opie-7d1ca5dba4cab829d9f7a8c79fb772dc3b643eac.tar.gz
opie-7d1ca5dba4cab829d9f7a8c79fb772dc3b643eac.tar.bz2
-Removal of debug messages
-Cleanups of .pro files -Cleanups of source code And finally the long awaited DigiCam (dcim) Backend
Diffstat (limited to 'noncore/graphics/opie-eye/impl/dcim/dcim_lister.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/impl/dcim/dcim_lister.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/impl/dcim/dcim_lister.h b/noncore/graphics/opie-eye/impl/dcim/dcim_lister.h
new file mode 100644
index 0000000..d0a2031
--- a/dev/null
+++ b/noncore/graphics/opie-eye/impl/dcim/dcim_lister.h
@@ -0,0 +1,71 @@
+/*
+ * GPLv2 zecke@handhelds.org
+ */
+
+#ifndef DCIM_LISTER_H
+#define DCIM_LISTER_H
+
+#include <iface/dirlister.h>
+
+#include <qmap.h>
+
+class Config;
+
+/**
+ * The DirLister is responsible for
+ * telling the GUI about files and folders
+ * and to load them.
+ * The DCIM is a special FileSystem lister
+ * in the that it starts with an overview
+ * of available 'Cameras'. It looks via 'Storage'
+ * for paths including a 'dcim' directory.
+ * And offers these as folders.
+ * Then it only lists Images. It tries to use
+ * the 'preview' directory to generate a thumbnail
+ * but will use the full image for the QImage
+ * call.
+ *
+ */
+class DCIM_DirLister : public PDirLister {
+ Q_OBJECT
+public:
+ enum ListMode{
+ ListingUnknown = -1,
+ ListingStart=1, /* give an overview over files */
+ ListingFolder, /* give access to albums */
+ ListingFiles, /* list the content of the album */
+ ListingReFolder
+ };
+ DCIM_DirLister();
+ ~DCIM_DirLister();
+
+ QString defaultPath()const;
+ QString setStartPath( const QString& );
+
+ QString currentPath()const;
+ QStringList folders()const;
+ QStringList files() const;
+
+ void deleteImage( const QString& );
+
+ void thumbNail( const QString&, int, int );
+ QImage image( const QString&, Factor, int );
+ void imageInfo( const QString& );
+ void fullImageInfo( const QString& );
+
+
+ virtual QString nameToFname( const QString& )const;
+ virtual QString dirUp(const QString& )const;
+
+private:
+ QStringList findCameras()const;
+ QStringList findAlbums ()const;
+ QStringList findImages ()const;
+
+private:
+ mutable QString m_path;
+ mutable ListMode m_mode;
+ mutable QMap<QString, QString> m_map;
+};
+
+#endif