author | zecke <zecke> | 2004-08-27 22:22:44 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-08-27 22:22:44 (UTC) |
commit | 7d1ca5dba4cab829d9f7a8c79fb772dc3b643eac (patch) (side-by-side diff) | |
tree | 1d189e90585190465233a67c7c9a2a740cb1d98a /noncore/graphics/opie-eye/iface | |
parent | a6e7ebcee38719a9f33ede08ed4c8a364c2ecb20 (diff) | |
download | opie-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/iface') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/iface/dirlister.cpp | 13 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/iface/dirlister.h | 6 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/iface/iface.pro | 7 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/iface/ifaceinfo.h | 2 |
4 files changed, 26 insertions, 2 deletions
diff --git a/noncore/graphics/opie-eye/iface/dirlister.cpp b/noncore/graphics/opie-eye/iface/dirlister.cpp index 7cf4361..e0ae63b 100644 --- a/noncore/graphics/opie-eye/iface/dirlister.cpp +++ b/noncore/graphics/opie-eye/iface/dirlister.cpp @@ -1,9 +1,22 @@ #include "dirlister.h" +#include <qdir.h> PDirLister::PDirLister( const char* name ) : QObject( 0, name ) {} PDirLister::~PDirLister() {} + +/** + * Change dir one level up. The default implementation + * is to use QDir to change the dir. + * If you've a flat filesystem return \par path immediately. + */ +QString PDirLister::dirUp( const QString& path )const { + QDir dir( path ); + dir.cdUp(); + + return dir.absPath(); +} diff --git a/noncore/graphics/opie-eye/iface/dirlister.h b/noncore/graphics/opie-eye/iface/dirlister.h index 9c7b2a9..68e8495 100644 --- a/noncore/graphics/opie-eye/iface/dirlister.h +++ b/noncore/graphics/opie-eye/iface/dirlister.h @@ -14,31 +14,35 @@ class PDirLister : public QObject { Q_OBJECT public: enum Factor { Width, Height, None }; PDirLister( const char* name ); virtual QString defaultPath()const = 0; virtual QString setStartPath( const QString& ) = 0; virtual QString currentPath()const = 0; virtual QStringList folders()const = 0; virtual QStringList files()const = 0; + virtual QString nameToFname(const QString&name)const = 0; + virtual QString dirUp(const QString&)const ; + + public slots: virtual void deleteImage( const QString& ) = 0; virtual void imageInfo( const QString&) = 0; virtual void fullImageInfo( const QString& ) = 0; virtual void thumbNail( const QString&, int max_wid, int max_h ) = 0; virtual QImage image( const QString&, Factor, int max = 0) = 0; - virtual QString nameToFname(const QString&name)const = 0; + signals: void sig_dirchanged(); void sig_filechanged(); void sig_start(); void sig_end(); // If this app ever happens to get multithreaded... void sig_thumbInfo( const QString&, const QString& ); void sig_fullInfo( const QString&, const QString& ); void sig_thumbNail( const QString&, const QPixmap& ); protected: diff --git a/noncore/graphics/opie-eye/iface/iface.pro b/noncore/graphics/opie-eye/iface/iface.pro new file mode 100644 index 0000000..2ec499a --- a/dev/null +++ b/noncore/graphics/opie-eye/iface/iface.pro @@ -0,0 +1,7 @@ +HEADERS += iface/dirlister.h \ + iface/dirview.h \ + iface/ifaceinfo.h \ + iface/slaveiface.h + +SOURCES += iface/dirlister.cpp \ + iface/dirview.cpp diff --git a/noncore/graphics/opie-eye/iface/ifaceinfo.h b/noncore/graphics/opie-eye/iface/ifaceinfo.h index 74e0db6..3af2fce 100644 --- a/noncore/graphics/opie-eye/iface/ifaceinfo.h +++ b/noncore/graphics/opie-eye/iface/ifaceinfo.h @@ -1,19 +1,19 @@ /* * GPLv2 zecke@handhelds.org * No WArranty... */ #ifndef PHUNK_INTERFACE_INFO_H #define PHUNK_INTERFACE_INFO_H #include <qstring.h> class QWidget; class Config; -struct PInterfaceInfo { +struct PInterfaceInfo { virtual QString name()const = 0; virtual QWidget* configWidget( const Config& ) = 0; virtual void writeConfig( QWidget* wid, Config& ) = 0; }; #endif |