00001 /* 00002 =. This file is part of the OPIE Project 00003 .=l. Copyright (C) 2002 Holger Freyther <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 /* QT */ 00033 #include <qobject.h> 00034 #include <qwidget.h> 00035 00036 class QFileInfo; 00037 class QDir; 00038 class DocLnk; 00039 00040 namespace Opie { 00041 namespace Ui { 00042 namespace Private { 00043 00052 class OFileView : public QWidget 00053 { 00054 Q_OBJECT 00055 public: 00056 OFileView(QWidget *widget, 00057 const char *name ); 00058 00059 OFileView(); 00060 00061 virtual void addFile(const QString &mine, 00062 QFileInfo *info, 00063 bool isSymlink = FALSE ) = 0; 00064 00065 virtual void addDir (const QString &mine, 00066 QFileInfo *info, 00067 bool isSymlink = FALSE ) = 0; 00068 00069 virtual void addSymlink(const QString &mime, 00070 QFileInfo *info, 00071 bool isSymlink = FALSE ) = 0; 00072 00073 virtual void cd(const QString &path ) = 0; 00074 signals: 00075 void fileSelected(const QString &); 00076 void fileSelected(const DocLnk & ); 00077 void contextMenu(); 00078 void changedDir(const QString &); 00079 void changedDir(const QDir & ); 00080 }; 00081 00082 00083 class OFileViewFactory 00084 { 00085 // Q_OBJECT 00086 public: 00087 OFileViewFactory() {} ; 00088 virtual ~OFileViewFactory() = 0; 00089 00090 OFileView* newView(QWidget *parent, const char *name ); 00091 QString name()const; 00092 }; 00093 00094 } 00095 } 00096 } 00097 00098 #endif
1.4.2