summaryrefslogtreecommitdiff
path: root/libopie/ofileselector
authorzecke <zecke>2002-09-15 20:00:57 (UTC)
committer zecke <zecke>2002-09-15 20:00:57 (UTC)
commitf79126f5ba0b1d1520e5fb07716ffe9e2479aedf (patch) (side-by-side diff)
tree6e44ff18246728b0861cc7ce974a0a0fae3c6796 /libopie/ofileselector
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/ofileselector') (more/less context) (show whitespace changes)
-rw-r--r--libopie/ofileselector/ofiledialog.cpp4
-rw-r--r--libopie/ofileselector/ofilelistview.cpp43
-rw-r--r--libopie/ofileselector/ofileselector.cpp48
-rw-r--r--libopie/ofileselector/ofileselector.h2
-rw-r--r--libopie/ofileselector/ofileview.cpp3
-rw-r--r--libopie/ofileselector/ofileview.h2
6 files changed, 65 insertions, 37 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,
OFileDialog dlg( caption.isEmpty() ? tr("Open") : caption,
- wid, OFileSelector::OPEN, selector, startDir, file, mimes);
+ wid, OFileSelector::Open, selector, startDir, file, mimes);
dlg.showMaximized();
@@ -99,3 +99,3 @@ QString OFileDialog::getSaveFileName(int selector,
OFileDialog dlg( caption.isEmpty() ? tr("Save") : caption,
- wid, OFileSelector::SAVE, selector, startDir, file, mimes);
+ wid, OFileSelector::Save, selector, startDir, file, mimes);
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 @@
+#include <qpe/mimetype.h>
+#include <qpe/resource.h>
+
#include "ofileselector.h"
@@ -17,3 +20,3 @@ void OFileListView::clear() {
}
-void OFileListView::addFile( const QString& mime,
+void OFileListView::addFile( const QString&,
QFileInfo* info,
@@ -35,4 +38,4 @@ void OFileListView::addFile( const QString& mime,
name = info->fileName();
- if( ( selector()->mode() == Open && !info->isReadable() )||
- ( selector()->mode() == Save && !info->isWritable() ) ){
+ if( ( selector()->mode() == OFileSelector::Open && !info->isReadable() ) ||
+ ( selector()->mode() == OFileSelector::Save && !info->isWritable() ) ){
@@ -50,4 +53,4 @@ void OFileListView::addFile( const QString& /*mime*/, const QString& /*dir*/,
}
-void OFileListView::addDir( const QString& mime,
- QFileInfo* info, bool isSym ) {
+void OFileListView::addDir( const QString&,
+ QFileInfo* info, bool symlink ) {
@@ -57,4 +60,4 @@ void OFileListView::addDir( const QString& mime,
- if( ( selector()->mode() == Open && !info->isReadable() ) ||
- ( selector()->mode() == Save && !info->isWritable() ) ){
+ if( ( selector()->mode() == OFileSelector::Open && !info->isReadable() ) ||
+ ( selector()->mode() == OFileSelector::Save && !info->isWritable() ) ){
@@ -80,13 +83,13 @@ void OFileListView::addDir( const QString& mime,
}
-void OFileListView::addDir( const QString& mime, const QString& dir,
- const QString& file, bool ) {
+void OFileListView::addDir( const QString& /*mime*/, const QString& /*dir*/,
+ const QString& /*file*/, bool ) {
}
-void OFileListView::addSymlink( const QString& mime,
- QFileInfo* info,
- bool isSym ) {
+void OFileListView::addSymlink( const QString& /*mime*/,
+ QFileInfo* /*info*/,
+ bool /*isSym*/ ) {
}
-void OFileListView::addSymlink( const QString& mime, const QString& path,
- const QString& file, bool isSym ) {
+void OFileListView::addSymlink( const QString& /*mime*/, const QString& /*path*/,
+ const QString& /*file*/, bool /*isSym*/ ) {
@@ -107,9 +110,13 @@ QString OFileListView::selectedName()const{
QStringList OFileListView::selectedNames()const {
-
+ QStringList list;
+ list << selectedName();
+ return list;
}
QString OFileListView::selectedPath()const {
-
+ return QString::null;
}
-QString OFileListView::selectedPaths()const {
-
+QStringList OFileListView::selectedPaths()const {
+ QStringList list;
+ list << selectedPath();
+ return list;
}
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
@@ -263,3 +263,3 @@ QString text;
-void OFileSelector::setPopupFactory(OPopupMenuFactory *popup )
+void OFileSelector::setPopupFactory(OPopupMenuFactory */*popup*/ )
{
@@ -278,3 +278,3 @@ QString OFileSelector::selectedName() const
name = lnk.file();
- }else if( m_selector == Extended || m_selector == ExtendedAll ){
+ }else {
if ( m_shLne ) {
@@ -306,5 +306,5 @@ QString OFileSelector::selectedPath()const
path = QPEApplication::documentDir();
- }else if( m_selector == Extended || m_selector == ExtendedAll ){
- ; //FIXME
- }
+ } /*else if( m_selector == Extended || m_selector == ExtendedAll ){
+ ;
+ }*/
return path;
@@ -335,3 +335,3 @@ int OFileSelector::fileCount()
default:
- count = currentView()->childCount();
+ count = currentView()->fileCount();
break;
@@ -351,3 +351,3 @@ DocLnk OFileSelector::selectedDocument() const
default:
- lnk = DocLnk( selectedName() ); // new DocLnk
+ lnk = DocLnk( selectedName() );
break;
@@ -374,2 +374,3 @@ void OFileSelector::slotCancel()
}
+/* switch the views */
void OFileSelector::slotViewCheck(const QString &sel)
@@ -406,3 +407,3 @@ void OFileSelector::slotViewCheck(const QString &sel)
}
-// not yet finished.....
+
QString OFileSelector::currentMimeType() const{
@@ -633,3 +634,3 @@ void OFileSelector::initVars()
}
-void OFileSelector::addFile(const QString &mime, QFileInfo *info, bool symlink)
+void OFileSelector::addFile(const QString &, QFileInfo *info, bool )
{
@@ -644,3 +645,3 @@ void OFileSelector::addFile(const QString &mime, QFileInfo *info, bool symlink)
}
-void OFileSelector::addDir(const QString &mime, QFileInfo *info, bool symlink )
+void OFileSelector::addDir(const QString &, QFileInfo *, bool )
{
@@ -927,3 +928,2 @@ bool OFileSelector::compliesMime( const QString& mime ) {
int pos;
- int pos2;
for ( it2 = list.begin(); it2 != list.end(); ++it2 ) {
@@ -951,4 +951,5 @@ void OFileSelector::slotSelectionChanged()
}
-void OFileSelector::slotCurrentChanged(QListViewItem* item )
+void OFileSelector::slotCurrentChanged(QListViewItem* /*item*/ )
{
+ /*
if( item == 0 )
@@ -970,6 +971,8 @@ void OFileSelector::slotCurrentChanged(QListViewItem* item )
}
+ } */
}
-}
-void OFileSelector::slotClicked( int button, QListViewItem *item, const QPoint &, int)
+void OFileSelector::slotClicked( int /*button*/, QListViewItem */*item*/, const QPoint &, int)
+
{
+ /*
if ( item == 0 )
@@ -1003,3 +1006,3 @@ void OFileSelector::slotClicked( int button, QListViewItem *item, const QPoint &
}
- }
+ } */
}
@@ -1014,3 +1017,3 @@ void OFileSelector::slotRightButton(int button, QListViewItem *item, const QPoin
}
-void OFileSelector::slotContextMenu( QListViewItem *item)
+void OFileSelector::slotContextMenu( QListViewItem */*item*/)
{
@@ -1020,2 +1023,3 @@ void OFileSelector::slotChangedDir()
{
+ /*
OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem();
@@ -1025,2 +1029,3 @@ void OFileSelector::slotChangedDir()
}
+ */
}
@@ -1028,2 +1033,3 @@ void OFileSelector::slotOpen()
{
+ /*
OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem();
@@ -1036,2 +1042,3 @@ void OFileSelector::slotOpen()
}
+ */
}
@@ -1047,2 +1054,3 @@ void OFileSelector::slotDelete()
{
+ /*
OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem();
@@ -1062,2 +1070,3 @@ void OFileSelector::slotDelete()
delete sel;
+ */
}
@@ -1212,2 +1221,5 @@ OFileView* OFileSelector::currentView() {
}
+OFileView* OFileSelector::currentView() const{
+ return 0l;
+}
int OFileSelector::filter() {
@@ -1246 +1258,5 @@ void OFileSelector::internChangedDir( const QDir& s) {
}
+QPixmap OFileSelector::pixmap( const QString& s ) {
+
+ return (*m_pixmaps)[s];
+}
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 {
OFileView* currentView();
+ OFileView* currentView()const;
int filter();
int sorting();
+ QPixmap pixmap( const QString& );
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 ) {
}
+OFileSelector* OFileView::selector() const {
+ return m_sel;
+}
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:
void changedDir(const QDir & );
- OFileSelector* selector();
+ OFileSelector* selector()const;