author | ar <ar> | 2004-09-17 22:30:48 (UTC) |
---|---|---|
committer | ar <ar> | 2004-09-17 22:30:48 (UTC) |
commit | 081f8a3c3a6c6d45743f451cd9dc966a135b8156 (patch) (unidiff) | |
tree | 69fc48dd6a07c4510d46118e92bc72796247de67 /libopie2 | |
parent | 8f14f56495dbef9dc760869da872513527cd7f91 (diff) | |
download | opie-081f8a3c3a6c6d45743f451cd9dc966a135b8156.zip opie-081f8a3c3a6c6d45743f451cd9dc966a135b8156.tar.gz opie-081f8a3c3a6c6d45743f451cd9dc966a135b8156.tar.bz2 |
- cleanup allItem handling
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector.cpp | 30 | ||||
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector.h | 3 | ||||
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector_p.h | 2 |
3 files changed, 12 insertions, 23 deletions
diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp index e8d502f..01a51a2 100644 --- a/libopie2/opieui/fileselector/ofileselector.cpp +++ b/libopie2/opieui/fileselector/ofileselector.cpp | |||
@@ -158,2 +158,8 @@ QString OFileViewInterface::startDirectory()const | |||
158 | 158 | ||
159 | bool OFileViewInterface::allItem( const QString& item )const | ||
160 | { | ||
161 | return selector()->m_allList.contains( item ); | ||
162 | } | ||
163 | |||
164 | |||
159 | ODocumentFileView::ODocumentFileView( OFileSelector* selector ) | 165 | ODocumentFileView::ODocumentFileView( OFileSelector* selector ) |
@@ -532,10 +538,2 @@ bool OFileViewFileListView::eventFilter (QObject *, QEvent *e) | |||
532 | 538 | ||
533 | /** | ||
534 | * @return true if the item show all files or directories | ||
535 | */ | ||
536 | bool OFileViewFileListView::allItem( const QString& item )const | ||
537 | { | ||
538 | return m_sel->allItem( item ); | ||
539 | } | ||
540 | |||
541 | void OFileViewFileListView::connectSlots() | 539 | void OFileViewFileListView::connectSlots() |
@@ -827,3 +825,3 @@ void OFileViewFileSystem::activate( const QString& str ) | |||
827 | { | 825 | { |
828 | m_all = m_view->allItem( str ); | 826 | m_all = allItem( str ); |
829 | } | 827 | } |
@@ -877,3 +875,3 @@ OFileSelector::OFileSelector( QWidget* parent, int mode, int sel, | |||
877 | 875 | ||
878 | m_allList = new QStringList(); | 876 | m_allList = QStringList(); |
879 | 877 | ||
@@ -1035,3 +1033,3 @@ void OFileSelector::initViews() | |||
1035 | m_views.insert( QObject::tr("All Directories"), in ); | 1033 | m_views.insert( QObject::tr("All Directories"), in ); |
1036 | m_allList->append( QObject::tr("All Directories") ); | 1034 | m_allList.append( QObject::tr("All Directories") ); |
1037 | } else { | 1035 | } else { |
@@ -1040,3 +1038,3 @@ void OFileSelector::initViews() | |||
1040 | m_views.insert( QObject::tr("All Files"), in ); | 1038 | m_views.insert( QObject::tr("All Files"), in ); |
1041 | m_allList->append( QObject::tr("All Files") ); | 1039 | m_allList.append( QObject::tr("All Files") ); |
1042 | } | 1040 | } |
@@ -1160,10 +1158,2 @@ int OFileSelector::selector()const | |||
1160 | 1158 | ||
1161 | /** | ||
1162 | * @return true if the item show all files or directories | ||
1163 | */ | ||
1164 | bool OFileSelector::allItem( const QString& item )const | ||
1165 | { | ||
1166 | return ( m_allList->findIndex( item ) != -1 ); | ||
1167 | } | ||
1168 | |||
1169 | QStringList OFileSelector::currentMimeType()const | 1159 | QStringList OFileSelector::currentMimeType()const |
diff --git a/libopie2/opieui/fileselector/ofileselector.h b/libopie2/opieui/fileselector/ofileselector.h index d96712a..d166afd 100644 --- a/libopie2/opieui/fileselector/ofileselector.h +++ b/libopie2/opieui/fileselector/ofileselector.h | |||
@@ -123,3 +123,2 @@ public: | |||
123 | int selector()const; | 123 | int selector()const; |
124 | bool allItem( const QString& )const; | ||
125 | 124 | ||
@@ -215,3 +214,3 @@ private: | |||
215 | 214 | ||
216 | QStringList* m_allList; | 215 | QStringList m_allList; |
217 | 216 | ||
diff --git a/libopie2/opieui/fileselector/ofileselector_p.h b/libopie2/opieui/fileselector/ofileselector_p.h index 252a7f5..790d2bd 100644 --- a/libopie2/opieui/fileselector/ofileselector_p.h +++ b/libopie2/opieui/fileselector/ofileselector_p.h | |||
@@ -77,2 +77,3 @@ public: | |||
77 | QString name()const; | 77 | QString name()const; |
78 | bool allItem( const QString& )const; | ||
78 | protected: | 79 | protected: |
@@ -154,3 +155,2 @@ public: | |||
154 | QString currentDir()const; | 155 | QString currentDir()const; |
155 | bool allItem( const QString& )const; | ||
156 | protected: | 156 | protected: |