author | zecke <zecke> | 2002-04-27 22:20:11 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-27 22:20:11 (UTC) |
commit | 2dc8c64cfa30a199e4ebd45618e726e9ffc6f7dc (patch) (side-by-side diff) | |
tree | 60d42174dc3898dae0c95a339b49997a8591a86b /libopie | |
parent | 7d741c93b423a3ab721071971b2c345d2d8548e2 (diff) | |
download | opie-2dc8c64cfa30a199e4ebd45618e726e9ffc6f7dc.zip opie-2dc8c64cfa30a199e4ebd45618e726e9ffc6f7dc.tar.gz opie-2dc8c64cfa30a199e4ebd45618e726e9ffc6f7dc.tar.bz2 |
Move FileItem class from the header into an anonymous namespace
-rw-r--r-- | libopie/ofileselector.cc | 49 | ||||
-rw-r--r-- | libopie/ofileselector.h | 49 |
2 files changed, 49 insertions, 49 deletions
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc index 3a11032..0a6e595 100644 --- a/libopie/ofileselector.cc +++ b/libopie/ofileselector.cc @@ -75,3 +75,50 @@ namespace { } - + class OFileSelectorItem : public QListViewItem { + public: + OFileSelectorItem(QListView *view, const QPixmap &pixmap, const QString &path, + const QString &date, const QString &size, const QString &mDir, + bool isLocked=false, bool isDir=false ): QListViewItem(view) { + setPixmap(0, pixmap ); + setText(1, path ); + setText(2, size ); + setText(3, date ); + //setText(4, mDir ); + m_dir = mDir; + dir = isDir; + mLocked = isLocked; + } + bool isLocked() const{ + return mLocked; + } + QString directory()const{ + return m_dir; + } + bool isDir()const{ + return dir; + } + QString path()const{ + return text(1 ); + } + QString key(int id, bool )const { + QString ke; + if( id == 0 || id == 1 ){ // name + if( dir ){ + ke.append("0" ); + ke.append( text(1) ); + }else{ + ke.append("1" ); + ke.append( text(1) ); + } + }else if( id == 2 ){ // size + return text(2); + }else if( id == 3 ){ // date + return text(3); + } + return ke; + }; + private: + bool mLocked:1; + bool dir:1; + QString m_dir; + }; }; diff --git a/libopie/ofileselector.h b/libopie/ofileselector.h index babe09f..8173d76 100644 --- a/libopie/ofileselector.h +++ b/libopie/ofileselector.h @@ -66,50 +66,3 @@ class QFileInfo; // -class OFileSelectorItem : public QListViewItem { - public: - OFileSelectorItem(QListView *view, const QPixmap &pixmap, const QString &path, - const QString &date, const QString &size, const QString &mDir, - bool isLocked=false, bool isDir=false ): QListViewItem(view) { - setPixmap(0, pixmap ); - setText(1, path ); - setText(2, size ); - setText(3, date ); - //setText(4, mDir ); - m_dir = mDir; - dir = isDir; - mLocked = isLocked; - } - bool isLocked() const{ - return mLocked; - } - QString directory()const{ - return m_dir; - } - bool isDir()const{ - return dir; - } - QString path()const{ - return text(1 ); - } - QString key(int id, bool )const { - QString ke; - if( id == 0 || id == 1 ){ // name - if( dir ){ - ke.append("0" ); - ke.append( text(1) ); - }else{ - ke.append("1" ); - ke.append( text(1) ); - } - }else if( id == 2 ){ // size - return text(2); - }else if( id == 3 ){ // date - return text(3); - } - return ke; - }; - private: - bool mLocked:1; - bool dir:1; - QString m_dir; -}; + |