author | zecke <zecke> | 2002-09-15 20:00:57 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-15 20:00:57 (UTC) |
commit | f79126f5ba0b1d1520e5fb07716ffe9e2479aedf (patch) (unidiff) | |
tree | 6e44ff18246728b0861cc7ce974a0a0fae3c6796 /libopie/ofileselector/ofileselector.cpp | |
parent | 1c5780f34ec9b4dc004714488b46997fe1a0909b (diff) | |
download | opie-f79126f5ba0b1d1520e5fb07716ffe9e2479aedf.zip opie-f79126f5ba0b1d1520e5fb07716ffe9e2479aedf.tar.gz opie-f79126f5ba0b1d1520e5fb07716ffe9e2479aedf.tar.bz2 |
Make it compile but it's not working yet
Diffstat (limited to 'libopie/ofileselector/ofileselector.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/ofileselector/ofileselector.cpp | 56 |
1 files changed, 36 insertions, 20 deletions
diff --git a/libopie/ofileselector/ofileselector.cpp b/libopie/ofileselector/ofileselector.cpp index f655606..16ee3ee 100644 --- a/libopie/ofileselector/ofileselector.cpp +++ b/libopie/ofileselector/ofileselector.cpp | |||
@@ -246,7 +246,7 @@ bool OFileSelector::cd(const QString &path ) | |||
246 | } | 246 | } |
247 | void OFileSelector::setSelector(int mode ) | 247 | void OFileSelector::setSelector(int mode ) |
248 | { | 248 | { |
249 | QString text; | 249 | QString text; |
250 | switch( mode ){ | 250 | switch( mode ){ |
251 | case Normal: | 251 | case Normal: |
252 | text = tr("Documents"); | 252 | text = tr("Documents"); |
@@ -261,7 +261,7 @@ QString text; | |||
261 | slotViewCheck( text ); | 261 | slotViewCheck( text ); |
262 | } | 262 | } |
263 | 263 | ||
264 | void OFileSelector::setPopupFactory(OPopupMenuFactory *popup ) | 264 | void OFileSelector::setPopupFactory(OPopupMenuFactory */*popup*/ ) |
265 | { | 265 | { |
266 | /* m_custom = popup; | 266 | /* m_custom = popup; |
267 | m_showPopup = true; | 267 | m_showPopup = true; |
@@ -274,9 +274,9 @@ QString OFileSelector::selectedName() const | |||
274 | { | 274 | { |
275 | QString name; | 275 | QString name; |
276 | if( m_selector == Normal ){ | 276 | if( m_selector == Normal ){ |
277 | DocLnk lnk = m_select->selectedDocument(); | 277 | DocLnk lnk = m_select->selectedDocument(); |
278 | name = lnk.file(); | 278 | name = lnk.file(); |
279 | }else if( m_selector == Extended || m_selector == ExtendedAll ){ | 279 | }else { |
280 | if ( m_shLne ) { | 280 | if ( m_shLne ) { |
281 | name = m_currentDir + "/" +m_edit->text(); | 281 | name = m_currentDir + "/" +m_edit->text(); |
282 | }else{ | 282 | }else{ |
@@ -304,9 +304,9 @@ QString OFileSelector::selectedPath()const | |||
304 | QString path; | 304 | QString path; |
305 | if( m_selector == Normal ){ | 305 | if( m_selector == Normal ){ |
306 | path = QPEApplication::documentDir(); | 306 | path = QPEApplication::documentDir(); |
307 | }else if( m_selector == Extended || m_selector == ExtendedAll ){ | 307 | } /*else if( m_selector == Extended || m_selector == ExtendedAll ){ |
308 | ; //FIXME | 308 | ; |
309 | } | 309 | }*/ |
310 | return path; | 310 | return path; |
311 | } | 311 | } |
312 | QStringList OFileSelector::selectedPaths() const | 312 | QStringList OFileSelector::selectedPaths() const |
@@ -333,7 +333,7 @@ int OFileSelector::fileCount() | |||
333 | case Extended: | 333 | case Extended: |
334 | case ExtendedAll: | 334 | case ExtendedAll: |
335 | default: | 335 | default: |
336 | count = currentView()->childCount(); | 336 | count = currentView()->fileCount(); |
337 | break; | 337 | break; |
338 | } | 338 | } |
339 | return count; | 339 | return count; |
@@ -349,7 +349,7 @@ DocLnk OFileSelector::selectedDocument() const | |||
349 | case Extended: | 349 | case Extended: |
350 | case ExtendedAll: | 350 | case ExtendedAll: |
351 | default: | 351 | default: |
352 | lnk = DocLnk( selectedName() ); // new DocLnk | 352 | lnk = DocLnk( selectedName() ); |
353 | break; | 353 | break; |
354 | } | 354 | } |
355 | return lnk; | 355 | return lnk; |
@@ -372,6 +372,7 @@ void OFileSelector::slotCancel() | |||
372 | { | 372 | { |
373 | emit cancel(); | 373 | emit cancel(); |
374 | } | 374 | } |
375 | /* switch the views */ | ||
375 | void OFileSelector::slotViewCheck(const QString &sel) | 376 | void OFileSelector::slotViewCheck(const QString &sel) |
376 | { | 377 | { |
377 | if( sel == tr("Documents" ) ){ | 378 | if( sel == tr("Documents" ) ){ |
@@ -404,7 +405,7 @@ void OFileSelector::slotViewCheck(const QString &sel) | |||
404 | m_stack->raiseWidget( Extended ); // same widget other QFileFilter | 405 | m_stack->raiseWidget( Extended ); // same widget other QFileFilter |
405 | } | 406 | } |
406 | } | 407 | } |
407 | // not yet finished..... | 408 | |
408 | QString OFileSelector::currentMimeType() const{ | 409 | QString OFileSelector::currentMimeType() const{ |
409 | QString mime; | 410 | QString mime; |
410 | QString currentText; | 411 | QString currentText; |
@@ -631,7 +632,7 @@ void OFileSelector::initVars() | |||
631 | m_new = 0; | 632 | m_new = 0; |
632 | m_close = 0; | 633 | m_close = 0; |
633 | } | 634 | } |
634 | void OFileSelector::addFile(const QString &mime, QFileInfo *info, bool symlink) | 635 | void OFileSelector::addFile(const QString &, QFileInfo *info, bool ) |
635 | { | 636 | { |
636 | if(!m_files) | 637 | if(!m_files) |
637 | return; | 638 | return; |
@@ -642,7 +643,7 @@ void OFileSelector::addFile(const QString &mime, QFileInfo *info, bool symlink) | |||
642 | return; | 643 | return; |
643 | 644 | ||
644 | } | 645 | } |
645 | void OFileSelector::addDir(const QString &mime, QFileInfo *info, bool symlink ) | 646 | void OFileSelector::addDir(const QString &, QFileInfo *, bool ) |
646 | { | 647 | { |
647 | if(!m_dir) | 648 | if(!m_dir) |
648 | return; | 649 | return; |
@@ -925,7 +926,6 @@ bool OFileSelector::compliesMime( const QString& mime ) { | |||
925 | qWarning("list doesn't contain it "); | 926 | qWarning("list doesn't contain it "); |
926 | QStringList::Iterator it2; | 927 | QStringList::Iterator it2; |
927 | int pos; | 928 | int pos; |
928 | int pos2; | ||
929 | for ( it2 = list.begin(); it2 != list.end(); ++it2 ) { | 929 | for ( it2 = list.begin(); it2 != list.end(); ++it2 ) { |
930 | pos = (*it2).findRev("/*"); | 930 | pos = (*it2).findRev("/*"); |
931 | if ( pos >= 0 ) { | 931 | if ( pos >= 0 ) { |
@@ -949,8 +949,9 @@ void OFileSelector::slotSelectionChanged() | |||
949 | { | 949 | { |
950 | 950 | ||
951 | } | 951 | } |
952 | void OFileSelector::slotCurrentChanged(QListViewItem* item ) | 952 | void OFileSelector::slotCurrentChanged(QListViewItem* /*item*/ ) |
953 | { | 953 | { |
954 | /* | ||
954 | if( item == 0 ) | 955 | if( item == 0 ) |
955 | return; | 956 | return; |
956 | if( m_selector == Extended || m_selector == ExtendedAll ) { | 957 | if( m_selector == Extended || m_selector == ExtendedAll ) { |
@@ -968,10 +969,12 @@ void OFileSelector::slotCurrentChanged(QListViewItem* item ) | |||
968 | emit fileSelected(lnk ); | 969 | emit fileSelected(lnk ); |
969 | } | 970 | } |
970 | } | 971 | } |
971 | } | 972 | } */ |
972 | } | 973 | } |
973 | void OFileSelector::slotClicked( int button, QListViewItem *item, const QPoint &, int) | 974 | void OFileSelector::slotClicked( int /*button*/, QListViewItem */*item*/, const QPoint &, int) |
975 | |||
974 | { | 976 | { |
977 | /* | ||
975 | if ( item == 0 ) | 978 | if ( item == 0 ) |
976 | return; | 979 | return; |
977 | 980 | ||
@@ -981,7 +984,7 @@ void OFileSelector::slotClicked( int button, QListViewItem *item, const QPoint & | |||
981 | switch( m_selector ){ | 984 | switch( m_selector ){ |
982 | default: | 985 | default: |
983 | break; | 986 | break; |
984 | case Extended: // fall through | 987 | case Extended: // fall through |
985 | case ExtendedAll:{ | 988 | case ExtendedAll:{ |
986 | OFileSelectorItem *sel = (OFileSelectorItem*)item; | 989 | OFileSelectorItem *sel = (OFileSelectorItem*)item; |
987 | if(!sel->isLocked() ){ | 990 | if(!sel->isLocked() ){ |
@@ -1001,7 +1004,7 @@ void OFileSelector::slotClicked( int button, QListViewItem *item, const QPoint & | |||
1001 | } | 1004 | } |
1002 | break; | 1005 | break; |
1003 | } | 1006 | } |
1004 | } | 1007 | } */ |
1005 | } | 1008 | } |
1006 | void OFileSelector::slotRightButton(int button, QListViewItem *item, const QPoint &, int ) | 1009 | void OFileSelector::slotRightButton(int button, QListViewItem *item, const QPoint &, int ) |
1007 | { | 1010 | { |
@@ -1012,20 +1015,23 @@ void OFileSelector::slotRightButton(int button, QListViewItem *item, const QPoin | |||
1012 | return; | 1015 | return; |
1013 | slotContextMenu( item ); | 1016 | slotContextMenu( item ); |
1014 | } | 1017 | } |
1015 | void OFileSelector::slotContextMenu( QListViewItem *item) | 1018 | void OFileSelector::slotContextMenu( QListViewItem */*item*/) |
1016 | { | 1019 | { |
1017 | 1020 | ||
1018 | } | 1021 | } |
1019 | void OFileSelector::slotChangedDir() | 1022 | void OFileSelector::slotChangedDir() |
1020 | { | 1023 | { |
1024 | /* | ||
1021 | OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); | 1025 | OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); |
1022 | if(sel->isDir() ){ | 1026 | if(sel->isDir() ){ |
1023 | QStringList str = QStringList::split("->", sel->text(1) ); | 1027 | QStringList str = QStringList::split("->", sel->text(1) ); |
1024 | cd( sel->directory() + "/" + str[0].stripWhiteSpace() ); | 1028 | cd( sel->directory() + "/" + str[0].stripWhiteSpace() ); |
1025 | } | 1029 | } |
1030 | */ | ||
1026 | } | 1031 | } |
1027 | void OFileSelector::slotOpen() | 1032 | void OFileSelector::slotOpen() |
1028 | { | 1033 | { |
1034 | /* | ||
1029 | OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); | 1035 | OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); |
1030 | if(!sel->isDir() ){ | 1036 | if(!sel->isDir() ){ |
1031 | QStringList str = QStringList::split("->", sel->text(1) ); | 1037 | QStringList str = QStringList::split("->", sel->text(1) ); |
@@ -1034,6 +1040,7 @@ void OFileSelector::slotOpen() | |||
1034 | // DocLnk lnk( sel->directory() + "/" + str[0].stripWhiteSpace() ); | 1040 | // DocLnk lnk( sel->directory() + "/" + str[0].stripWhiteSpace() ); |
1035 | //emit fileSelected( lnk ); | 1041 | //emit fileSelected( lnk ); |
1036 | } | 1042 | } |
1043 | */ | ||
1037 | } | 1044 | } |
1038 | void OFileSelector::slotRescan() | 1045 | void OFileSelector::slotRescan() |
1039 | { | 1046 | { |
@@ -1045,6 +1052,7 @@ void OFileSelector::slotRename() | |||
1045 | } | 1052 | } |
1046 | void OFileSelector::slotDelete() | 1053 | void OFileSelector::slotDelete() |
1047 | { | 1054 | { |
1055 | /* | ||
1048 | OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); | 1056 | OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); |
1049 | QStringList list = QStringList::split("->", sel->text(1) ); | 1057 | QStringList list = QStringList::split("->", sel->text(1) ); |
1050 | if( sel->isDir() ){ | 1058 | if( sel->isDir() ){ |
@@ -1060,6 +1068,7 @@ void OFileSelector::slotDelete() | |||
1060 | } | 1068 | } |
1061 | m_View->takeItem( sel ); | 1069 | m_View->takeItem( sel ); |
1062 | delete sel; | 1070 | delete sel; |
1071 | */ | ||
1063 | } | 1072 | } |
1064 | void OFileSelector::cdUP() | 1073 | void OFileSelector::cdUP() |
1065 | { | 1074 | { |
@@ -1210,6 +1219,9 @@ void OFileSelector::reparse() | |||
1210 | OFileView* OFileSelector::currentView() { | 1219 | OFileView* OFileSelector::currentView() { |
1211 | return 0l; | 1220 | return 0l; |
1212 | } | 1221 | } |
1222 | OFileView* OFileSelector::currentView() const{ | ||
1223 | return 0l; | ||
1224 | } | ||
1213 | int OFileSelector::filter() { | 1225 | int OFileSelector::filter() { |
1214 | int filter; | 1226 | int filter; |
1215 | if ( m_selector == ExtendedAll ) | 1227 | if ( m_selector == ExtendedAll ) |
@@ -1244,3 +1256,7 @@ void OFileSelector::internChangedDir( const QString& s) { | |||
1244 | void OFileSelector::internChangedDir( const QDir& s) { | 1256 | void OFileSelector::internChangedDir( const QDir& s) { |
1245 | emit dirSelected( s ); | 1257 | emit dirSelected( s ); |
1246 | } | 1258 | } |
1259 | QPixmap OFileSelector::pixmap( const QString& s ) { | ||
1260 | |||
1261 | return (*m_pixmaps)[s]; | ||
1262 | } | ||