author | zecke <zecke> | 2002-04-27 22:20:11 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-27 22:20:11 (UTC) |
commit | 2dc8c64cfa30a199e4ebd45618e726e9ffc6f7dc (patch) (unidiff) | |
tree | 60d42174dc3898dae0c95a339b49997a8591a86b | |
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 { | |||
75 | } | 75 | } |
76 | 76 | class OFileSelectorItem : public QListViewItem { | |
77 | public: | ||
78 | OFileSelectorItem(QListView *view, const QPixmap &pixmap, const QString &path, | ||
79 | const QString &date, const QString &size, const QString &mDir, | ||
80 | bool isLocked=false, bool isDir=false ): QListViewItem(view) { | ||
81 | setPixmap(0, pixmap ); | ||
82 | setText(1, path ); | ||
83 | setText(2, size ); | ||
84 | setText(3, date ); | ||
85 | //setText(4, mDir ); | ||
86 | m_dir = mDir; | ||
87 | dir = isDir; | ||
88 | mLocked = isLocked; | ||
89 | } | ||
90 | bool isLocked() const{ | ||
91 | return mLocked; | ||
92 | } | ||
93 | QString directory()const{ | ||
94 | return m_dir; | ||
95 | } | ||
96 | bool isDir()const{ | ||
97 | return dir; | ||
98 | } | ||
99 | QString path()const{ | ||
100 | return text(1 ); | ||
101 | } | ||
102 | QString key(int id, bool )const { | ||
103 | QString ke; | ||
104 | if( id == 0 || id == 1 ){ // name | ||
105 | if( dir ){ | ||
106 | ke.append("0" ); | ||
107 | ke.append( text(1) ); | ||
108 | }else{ | ||
109 | ke.append("1" ); | ||
110 | ke.append( text(1) ); | ||
111 | } | ||
112 | }else if( id == 2 ){ // size | ||
113 | return text(2); | ||
114 | }else if( id == 3 ){ // date | ||
115 | return text(3); | ||
116 | } | ||
117 | return ke; | ||
118 | }; | ||
119 | private: | ||
120 | bool mLocked:1; | ||
121 | bool dir:1; | ||
122 | QString m_dir; | ||
123 | }; | ||
77 | }; | 124 | }; |
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; | |||
66 | // | 66 | // |
67 | class OFileSelectorItem : public QListViewItem { | 67 | |
68 | public: | ||
69 | OFileSelectorItem(QListView *view, const QPixmap &pixmap, const QString &path, | ||
70 | const QString &date, const QString &size, const QString &mDir, | ||
71 | bool isLocked=false, bool isDir=false ): QListViewItem(view) { | ||
72 | setPixmap(0, pixmap ); | ||
73 | setText(1, path ); | ||
74 | setText(2, size ); | ||
75 | setText(3, date ); | ||
76 | //setText(4, mDir ); | ||
77 | m_dir = mDir; | ||
78 | dir = isDir; | ||
79 | mLocked = isLocked; | ||
80 | } | ||
81 | bool isLocked() const{ | ||
82 | return mLocked; | ||
83 | } | ||
84 | QString directory()const{ | ||
85 | return m_dir; | ||
86 | } | ||
87 | bool isDir()const{ | ||
88 | return dir; | ||
89 | } | ||
90 | QString path()const{ | ||
91 | return text(1 ); | ||
92 | } | ||
93 | QString key(int id, bool )const { | ||
94 | QString ke; | ||
95 | if( id == 0 || id == 1 ){ // name | ||
96 | if( dir ){ | ||
97 | ke.append("0" ); | ||
98 | ke.append( text(1) ); | ||
99 | }else{ | ||
100 | ke.append("1" ); | ||
101 | ke.append( text(1) ); | ||
102 | } | ||
103 | }else if( id == 2 ){ // size | ||
104 | return text(2); | ||
105 | }else if( id == 3 ){ // date | ||
106 | return text(3); | ||
107 | } | ||
108 | return ke; | ||
109 | }; | ||
110 | private: | ||
111 | bool mLocked:1; | ||
112 | bool dir:1; | ||
113 | QString m_dir; | ||
114 | }; | ||
115 | 68 | ||