00001 /* 00002 =. This file is part of the OPIE Project 00003 .=l. Copyright (c) 2002 zecke <zecke@handhelds.org> 00004 .>+-= 00005 _;:, .> :=|. This library is free software; you can 00006 .> <`_, > . <= redistribute it and/or modify it under 00007 :`=1 )Y*s>-.-- : the terms of the GNU Library General Public 00008 .="- .-=="i, .._ License as published by the Free Software 00009 - . .-<_> .<> Foundation; either version 2 of the License, 00010 ._= =} : or (at your option) any later version. 00011 .%`+i> _;_. 00012 .i_,=:_. -<s. This library is distributed in the hope that 00013 + . -:. = it will be useful, but WITHOUT ANY WARRANTY; 00014 : .. .:, . . . without even the implied warranty of 00015 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A 00016 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU 00017 ..}^=.= = ; Library General Public License for more 00018 ++= -. .` .: details. 00019 : = ...= . :.=- 00020 -. .:....=;==+<; You should have received a copy of the GNU 00021 -_. . . )=. = Library General Public License along with 00022 -- :-=` this library; see the file COPYING.LIB. 00023 If not, write to the Free Software Foundation, 00024 Inc., 59 Temple Place - Suite 330, 00025 Boston, MA 02111-1307, USA. 00026 00027 */ 00028 00029 #ifndef ofileview_h 00030 #define ofileview_h 00031 00032 #include <qobject.h> 00033 #include <qwidget.h> 00034 00035 class QFileInfo; 00036 class QDir; 00037 class DocLnk; 00038 00047 class OFileView { 00048 Q_OBJECT 00049 public: 00050 OFileView(QWidget *widget, 00051 const char *name ); 00052 virtual OFileView(); 00053 virtual ~OFileSelectorView() = 0; 00054 00055 virtual void addFile(const QString &mine, 00056 QFileInfo *info, 00057 bool isSymlink = FALSE ) = 0; 00058 00059 virtual void addDir (const QString &mine, 00060 QFileInfo *info, 00061 bool isSymlink = FALSE ) = 0; 00062 00063 virtual void addSymlink(const QString &mime, 00064 QFileInfo *info, 00065 bool isSymlink = FALSE ) = 0; 00066 00067 virtual void cd(const QString &path ) = 0; 00068 signals: 00069 void fileSelected(const QString &); 00070 void fileSelected(const DocLnk & ); 00071 void contextMenu(); 00072 void changedDir(const QString &); 00073 void changedDir(const QDir & ); 00074 }; 00075 00076 class OFileViewFactory { 00077 // Q_OBJECT 00078 public: 00079 OFileViewFactory() {} ; 00080 virtual ~OFileViewFactory() = 0; 00081 00082 OFileSelectorView* newView(QWidget *parent, const char *name ); 00083 QString name()const; 00084 }; 00085 00086 00087 #endif
1.4.2