summaryrefslogtreecommitdiff
path: root/libopie
authorzecke <zecke>2002-09-15 20:00:57 (UTC)
committer zecke <zecke>2002-09-15 20:00:57 (UTC)
commitf79126f5ba0b1d1520e5fb07716ffe9e2479aedf (patch) (unidiff)
tree6e44ff18246728b0861cc7ce974a0a0fae3c6796 /libopie
parent1c5780f34ec9b4dc004714488b46997fe1a0909b (diff)
downloadopie-f79126f5ba0b1d1520e5fb07716ffe9e2479aedf.zip
opie-f79126f5ba0b1d1520e5fb07716ffe9e2479aedf.tar.gz
opie-f79126f5ba0b1d1520e5fb07716ffe9e2479aedf.tar.bz2
Make it compile but it's not working yet
Diffstat (limited to 'libopie') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofileselector/ofiledialog.cpp4
-rw-r--r--libopie/ofileselector/ofilelistview.cpp43
-rw-r--r--libopie/ofileselector/ofileselector.cpp56
-rw-r--r--libopie/ofileselector/ofileselector.h2
-rw-r--r--libopie/ofileselector/ofileview.cpp3
-rw-r--r--libopie/ofileselector/ofileview.h2
6 files changed, 69 insertions, 41 deletions
diff --git a/libopie/ofileselector/ofiledialog.cpp b/libopie/ofileselector/ofiledialog.cpp
index 4783004..430def2 100644
--- a/libopie/ofileselector/ofiledialog.cpp
+++ b/libopie/ofileselector/ofiledialog.cpp
@@ -83,3 +83,3 @@ QString OFileDialog::getOpenFileName(int selector,
83 OFileDialog dlg( caption.isEmpty() ? tr("Open") : caption, 83 OFileDialog dlg( caption.isEmpty() ? tr("Open") : caption,
84 wid, OFileSelector::OPEN, selector, startDir, file, mimes); 84 wid, OFileSelector::Open, selector, startDir, file, mimes);
85 dlg.showMaximized(); 85 dlg.showMaximized();
@@ -99,3 +99,3 @@ QString OFileDialog::getSaveFileName(int selector,
99 OFileDialog dlg( caption.isEmpty() ? tr("Save") : caption, 99 OFileDialog dlg( caption.isEmpty() ? tr("Save") : caption,
100 wid, OFileSelector::SAVE, selector, startDir, file, mimes); 100 wid, OFileSelector::Save, selector, startDir, file, mimes);
101 dlg.showMaximized(); 101 dlg.showMaximized();
diff --git a/libopie/ofileselector/ofilelistview.cpp b/libopie/ofileselector/ofilelistview.cpp
index 0c7d45b..7108a5b 100644
--- a/libopie/ofileselector/ofilelistview.cpp
+++ b/libopie/ofileselector/ofilelistview.cpp
@@ -1,2 +1,5 @@
1 1
2#include <qpe/mimetype.h>
3#include <qpe/resource.h>
4
2#include "ofileselector.h" 5#include "ofileselector.h"
@@ -17,3 +20,3 @@ void OFileListView::clear() {
17} 20}
18void OFileListView::addFile( const QString& mime, 21void OFileListView::addFile( const QString&,
19 QFileInfo* info, 22 QFileInfo* info,
@@ -35,4 +38,4 @@ void OFileListView::addFile( const QString& mime,
35 name = info->fileName(); 38 name = info->fileName();
36 if( ( selector()->mode() == Open && !info->isReadable() )|| 39 if( ( selector()->mode() == OFileSelector::Open && !info->isReadable() ) ||
37 ( selector()->mode() == Save && !info->isWritable() ) ){ 40 ( selector()->mode() == OFileSelector::Save && !info->isWritable() ) ){
38 41
@@ -50,4 +53,4 @@ void OFileListView::addFile( const QString& /*mime*/, const QString& /*dir*/,
50} 53}
51void OFileListView::addDir( const QString& mime, 54void OFileListView::addDir( const QString&,
52 QFileInfo* info, bool isSym ) { 55 QFileInfo* info, bool symlink ) {
53 56
@@ -57,4 +60,4 @@ void OFileListView::addDir( const QString& mime,
57 60
58 if( ( selector()->mode() == Open && !info->isReadable() ) || 61 if( ( selector()->mode() == OFileSelector::Open && !info->isReadable() ) ||
59 ( selector()->mode() == Save && !info->isWritable() ) ){ 62 ( selector()->mode() == OFileSelector::Save && !info->isWritable() ) ){
60 63
@@ -80,13 +83,13 @@ void OFileListView::addDir( const QString& mime,
80} 83}
81void OFileListView::addDir( const QString& mime, const QString& dir, 84void OFileListView::addDir( const QString& /*mime*/, const QString& /*dir*/,
82 const QString& file, bool ) { 85 const QString& /*file*/, bool ) {
83 86
84} 87}
85void OFileListView::addSymlink( const QString& mime, 88void OFileListView::addSymlink( const QString& /*mime*/,
86 QFileInfo* info, 89 QFileInfo* /*info*/,
87 bool isSym ) { 90 bool /*isSym*/ ) {
88 91
89} 92}
90void OFileListView::addSymlink( const QString& mime, const QString& path, 93void OFileListView::addSymlink( const QString& /*mime*/, const QString& /*path*/,
91 const QString& file, bool isSym ) { 94 const QString& /*file*/, bool /*isSym*/ ) {
92 95
@@ -107,9 +110,13 @@ QString OFileListView::selectedName()const{
107QStringList OFileListView::selectedNames()const { 110QStringList OFileListView::selectedNames()const {
108 111 QStringList list;
112 list << selectedName();
113 return list;
109} 114}
110QString OFileListView::selectedPath()const { 115QString OFileListView::selectedPath()const {
111 116 return QString::null;
112} 117}
113QString OFileListView::selectedPaths()const { 118QStringList OFileListView::selectedPaths()const {
114 119 QStringList list;
120 list << selectedPath();
121 return list;
115} 122}
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
@@ -248,3 +248,3 @@ void OFileSelector::setSelector(int mode )
248{ 248{
249QString text; 249 QString text;
250 switch( mode ){ 250 switch( mode ){
@@ -263,3 +263,3 @@ QString text;
263 263
264void OFileSelector::setPopupFactory(OPopupMenuFactory *popup ) 264void OFileSelector::setPopupFactory(OPopupMenuFactory */*popup*/ )
265{ 265{
@@ -276,5 +276,5 @@ QString OFileSelector::selectedName() const
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 ) {
@@ -306,5 +306,5 @@ QString OFileSelector::selectedPath()const
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;
@@ -335,3 +335,3 @@ int OFileSelector::fileCount()
335 default: 335 default:
336 count = currentView()->childCount(); 336 count = currentView()->fileCount();
337 break; 337 break;
@@ -351,3 +351,3 @@ DocLnk OFileSelector::selectedDocument() const
351 default: 351 default:
352 lnk = DocLnk( selectedName() ); // new DocLnk 352 lnk = DocLnk( selectedName() );
353 break; 353 break;
@@ -374,2 +374,3 @@ void OFileSelector::slotCancel()
374} 374}
375/* switch the views */
375void OFileSelector::slotViewCheck(const QString &sel) 376void OFileSelector::slotViewCheck(const QString &sel)
@@ -406,3 +407,3 @@ void OFileSelector::slotViewCheck(const QString &sel)
406} 407}
407// not yet finished..... 408
408QString OFileSelector::currentMimeType() const{ 409QString OFileSelector::currentMimeType() const{
@@ -633,3 +634,3 @@ void OFileSelector::initVars()
633} 634}
634void OFileSelector::addFile(const QString &mime, QFileInfo *info, bool symlink) 635void OFileSelector::addFile(const QString &, QFileInfo *info, bool )
635{ 636{
@@ -644,3 +645,3 @@ void OFileSelector::addFile(const QString &mime, QFileInfo *info, bool symlink)
644} 645}
645void OFileSelector::addDir(const QString &mime, QFileInfo *info, bool symlink ) 646void OFileSelector::addDir(const QString &, QFileInfo *, bool )
646{ 647{
@@ -927,3 +928,2 @@ bool OFileSelector::compliesMime( const QString& mime ) {
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 ) {
@@ -951,4 +951,5 @@ void OFileSelector::slotSelectionChanged()
951} 951}
952void OFileSelector::slotCurrentChanged(QListViewItem* item ) 952void OFileSelector::slotCurrentChanged(QListViewItem* /*item*/ )
953{ 953{
954 /*
954 if( item == 0 ) 955 if( item == 0 )
@@ -970,6 +971,8 @@ void OFileSelector::slotCurrentChanged(QListViewItem* item )
970 } 971 }
971 } 972 } */
972} 973}
973void OFileSelector::slotClicked( int button, QListViewItem *item, const QPoint &, int) 974void OFileSelector::slotClicked( int /*button*/, QListViewItem */*item*/, const QPoint &, int)
975
974{ 976{
977 /*
975 if ( item == 0 ) 978 if ( item == 0 )
@@ -983,3 +986,3 @@ void OFileSelector::slotClicked( int button, QListViewItem *item, const QPoint &
983 break; 986 break;
984 case Extended: // fall through 987 case Extended: // fall through
985 case ExtendedAll:{ 988 case ExtendedAll:{
@@ -1003,3 +1006,3 @@ void OFileSelector::slotClicked( int button, QListViewItem *item, const QPoint &
1003 } 1006 }
1004 } 1007 } */
1005} 1008}
@@ -1014,3 +1017,3 @@ void OFileSelector::slotRightButton(int button, QListViewItem *item, const QPoin
1014} 1017}
1015void OFileSelector::slotContextMenu( QListViewItem *item) 1018void OFileSelector::slotContextMenu( QListViewItem */*item*/)
1016{ 1019{
@@ -1020,2 +1023,3 @@ void OFileSelector::slotChangedDir()
1020{ 1023{
1024 /*
1021 OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); 1025 OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem();
@@ -1025,2 +1029,3 @@ void OFileSelector::slotChangedDir()
1025 } 1029 }
1030 */
1026} 1031}
@@ -1028,2 +1033,3 @@ void OFileSelector::slotOpen()
1028{ 1033{
1034 /*
1029 OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); 1035 OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem();
@@ -1036,2 +1042,3 @@ void OFileSelector::slotOpen()
1036 } 1042 }
1043 */
1037} 1044}
@@ -1047,2 +1054,3 @@ void OFileSelector::slotDelete()
1047{ 1054{
1055 /*
1048 OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); 1056 OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem();
@@ -1062,2 +1070,3 @@ void OFileSelector::slotDelete()
1062 delete sel; 1070 delete sel;
1071 */
1063} 1072}
@@ -1212,2 +1221,5 @@ OFileView* OFileSelector::currentView() {
1212} 1221}
1222OFileView* OFileSelector::currentView() const{
1223 return 0l;
1224}
1213int OFileSelector::filter() { 1225int OFileSelector::filter() {
@@ -1246 +1258,5 @@ void OFileSelector::internChangedDir( const QDir& s) {
1246} 1258}
1259QPixmap OFileSelector::pixmap( const QString& s ) {
1260
1261 return (*m_pixmaps)[s];
1262}
diff --git a/libopie/ofileselector/ofileselector.h b/libopie/ofileselector/ofileselector.h
index 937569d..12af732 100644
--- a/libopie/ofileselector/ofileselector.h
+++ b/libopie/ofileselector/ofileselector.h
@@ -338,4 +338,6 @@ class OFileSelector : public QWidget {
338 OFileView* currentView(); 338 OFileView* currentView();
339 OFileView* currentView()const;
339 int filter(); 340 int filter();
340 int sorting(); 341 int sorting();
342 QPixmap pixmap( const QString& );
341 343
diff --git a/libopie/ofileselector/ofileview.cpp b/libopie/ofileselector/ofileview.cpp
index 71843c1..9bb40c9 100644
--- a/libopie/ofileselector/ofileview.cpp
+++ b/libopie/ofileselector/ofileview.cpp
@@ -28 +28,4 @@ void OFileView::changedDir( const QDir& d ) {
28} 28}
29OFileSelector* OFileView::selector() const {
30 return m_sel;
31}
diff --git a/libopie/ofileselector/ofileview.h b/libopie/ofileselector/ofileview.h
index 997266a..1b397f5 100644
--- a/libopie/ofileselector/ofileview.h
+++ b/libopie/ofileselector/ofileview.h
@@ -92,3 +92,3 @@ protected:
92 void changedDir(const QDir & ); 92 void changedDir(const QDir & );
93 OFileSelector* selector(); 93 OFileSelector* selector()const;
94 94