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 @@ | |||
1 | #include "dirlister.h" | 1 | #include "dirlister.h" |
2 | 2 | ||
3 | #include <qdir.h> | ||
3 | 4 | ||
4 | PDirLister::PDirLister( const char* name ) | 5 | PDirLister::PDirLister( const char* name ) |
5 | : QObject( 0, name ) | 6 | : QObject( 0, name ) |
6 | {} | 7 | {} |
7 | 8 | ||
8 | PDirLister::~PDirLister() | 9 | PDirLister::~PDirLister() |
9 | {} | 10 | {} |
11 | |||
12 | /** | ||
13 | * Change dir one level up. The default implementation | ||
14 | * is to use QDir to change the dir. | ||
15 | * If you've a flat filesystem return \par path immediately. | ||
16 | */ | ||
17 | QString PDirLister::dirUp( const QString& path )const { | ||
18 | QDir dir( path ); | ||
19 | dir.cdUp(); | ||
20 | |||
21 | return dir.absPath(); | ||
22 | } | ||
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 | |||
@@ -22,15 +22,19 @@ public: | |||
22 | virtual QString setStartPath( const QString& ) = 0; | 22 | virtual QString setStartPath( const QString& ) = 0; |
23 | virtual QString currentPath()const = 0; | 23 | virtual QString currentPath()const = 0; |
24 | virtual QStringList folders()const = 0; | 24 | virtual QStringList folders()const = 0; |
25 | virtual QStringList files()const = 0; | 25 | virtual QStringList files()const = 0; |
26 | virtual QString nameToFname(const QString&name)const = 0; | ||
27 | virtual QString dirUp(const QString&)const ; | ||
28 | |||
29 | |||
26 | public slots: | 30 | public slots: |
27 | virtual void deleteImage( const QString& ) = 0; | 31 | virtual void deleteImage( const QString& ) = 0; |
28 | virtual void imageInfo( const QString&) = 0; | 32 | virtual void imageInfo( const QString&) = 0; |
29 | virtual void fullImageInfo( const QString& ) = 0; | 33 | virtual void fullImageInfo( const QString& ) = 0; |
30 | virtual void thumbNail( const QString&, int max_wid, int max_h ) = 0; | 34 | virtual void thumbNail( const QString&, int max_wid, int max_h ) = 0; |
31 | virtual QImage image( const QString&, Factor, int max = 0) = 0; | 35 | virtual QImage image( const QString&, Factor, int max = 0) = 0; |
32 | virtual QString nameToFname(const QString&name)const = 0; | 36 | |
33 | 37 | ||
34 | signals: | 38 | signals: |
35 | void sig_dirchanged(); | 39 | void sig_dirchanged(); |
36 | void sig_filechanged(); | 40 | void sig_filechanged(); |
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 @@ | |||
1 | HEADERS += iface/dirlister.h \ | ||
2 | iface/dirview.h \ | ||
3 | iface/ifaceinfo.h \ | ||
4 | iface/slaveiface.h | ||
5 | |||
6 | SOURCES += iface/dirlister.cpp \ | ||
7 | 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 | |||
@@ -9,9 +9,9 @@ | |||
9 | #include <qstring.h> | 9 | #include <qstring.h> |
10 | 10 | ||
11 | class QWidget; | 11 | class QWidget; |
12 | class Config; | 12 | class Config; |
13 | struct PInterfaceInfo { | 13 | struct PInterfaceInfo { |
14 | virtual QString name()const = 0; | 14 | virtual QString name()const = 0; |
15 | virtual QWidget* configWidget( const Config& ) = 0; | 15 | virtual QWidget* configWidget( const Config& ) = 0; |
16 | virtual void writeConfig( QWidget* wid, Config& ) = 0; | 16 | virtual void writeConfig( QWidget* wid, Config& ) = 0; |
17 | }; | 17 | }; |