summaryrefslogtreecommitdiff
path: root/libopie/ofileselector/ofileview.h
authorzecke <zecke>2002-09-15 17:52:30 (UTC)
committer zecke <zecke>2002-09-15 17:52:30 (UTC)
commit1c5780f34ec9b4dc004714488b46997fe1a0909b (patch) (unidiff)
tree524719fe92e4738dbcebf4bc792d6901cf215df9 /libopie/ofileselector/ofileview.h
parent8c161a2699a842e527ade4410189fd18964d1c31 (diff)
downloadopie-1c5780f34ec9b4dc004714488b46997fe1a0909b.zip
opie-1c5780f34ec9b4dc004714488b46997fe1a0909b.tar.gz
opie-1c5780f34ec9b4dc004714488b46997fe1a0909b.tar.bz2
Ok the demand for filters, listers and views were great so I'm currently
implementing it This OFileSelector will be in a different subdir but it'll be still linked into libopie. This makes it more easy to find all files which belong to the OFileSelector an OLister is able to list for example files and dirs ( OLocalLister ) a ftp lister a bluetooth lister whcich would show available devices a DocLnkSet lister for the Documents Tab a CrossReference lister a View is responsible for showing files to the user... and I renamed *.cc to *.cpp
Diffstat (limited to 'libopie/ofileselector/ofileview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofileselector/ofileview.h109
1 files changed, 109 insertions, 0 deletions
diff --git a/libopie/ofileselector/ofileview.h b/libopie/ofileselector/ofileview.h
new file mode 100644
index 0000000..997266a
--- a/dev/null
+++ b/libopie/ofileselector/ofileview.h
@@ -0,0 +1,109 @@
1/*
2               =. This file is part of the OPIE Project
3             .=l. Copyright (c) 2002 zecke <zecke@handhelds.org>
4           .>+-=
5 _;:,     .>    :=|. This library is free software; you can
6.> <`_,   >  .   <= redistribute it and/or modify it under
7:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
8.="- .-=="i,     .._ License as published by the Free Software
9 - .   .-<_>     .<> Foundation; either version 2 of the License,
10     ._= =}       : or (at your option) any later version.
11    .%`+i>       _;_.
12    .i_,=:_.      -<s. This library is distributed in the hope that
13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
14    : ..    .:,     . . . without even the implied warranty of
15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
17..}^=.=       =       ; Library General Public License for more
18++=   -.     .`     .: details.
19 :     =  ...= . :.=-
20 -.   .:....=;==+<; You should have received a copy of the GNU
21  -_. . .   )=.  = Library General Public License along with
22    --        :-=` this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA.
26
27*/
28
29#ifndef ofileview_h
30#define ofileview_h
31
32#include <qobject.h>
33#include <qwidget.h>
34#include <qpopupmenu.h>
35
36class QFileInfo;
37class QDir;
38class DocLnk;
39
40/**
41 * A OFileView is a specialised View for the
42 * OFileSelector
43 * With a View you can chage the user visible
44 * representation of a OFileLister
45 * OFileView is just a basic interface which helps you to
46 * write new views
47 */
48class OFileSelector;
49class OFileView {
50public:
51 OFileView( OFileSelector* );
52 OFileView();
53 virtual ~OFileView();
54
55 virtual void clear() = 0;
56 virtual void addFile(const QString &mine,
57 QFileInfo *info,
58 bool isSymlink = FALSE ) = 0;
59 virtual void addFile(const QString& mine, const QString& dir,
60 const QString& file, bool = FALSE ) = 0;
61
62 virtual void addDir (const QString &mine,
63 QFileInfo *info,
64 bool isSymlink = FALSE ) = 0;
65 virtual void addDir (const QString& mine, const QString& dir,
66 const QString& file, bool = FALSE) = 0;
67
68 virtual void addSymlink(const QString &mime,
69 QFileInfo *info,
70 bool isSymlink = FALSE ) = 0;
71 virtual void addSymlink(const QString& mine,
72 const QString& path,
73 const QString& file,
74 bool isSymlink = FALSE ) = 0;
75
76 virtual void cd(const QString &path ) = 0;
77 virtual QWidget* widget() = 0;
78
79 virtual QString selectedName()const = 0;
80 virtual QStringList selectedNames()const = 0;
81 virtual QString selectedPath()const = 0;
82 virtual QStringList selectedPaths()const = 0;
83 virtual int fileCount() = 0;
84
85/*signals:*/
86protected:
87
88 void fileSelected(const QString &);
89 void fileSelected(const DocLnk & );
90 void contextMenu();
91 void changedDir(const QString &);
92 void changedDir(const QDir & );
93 OFileSelector* selector();
94
95private:
96 OFileSelector* m_sel;
97};
98
99class OFileViewFactory {
100 public:
101 OFileViewFactory() {} ;
102 virtual ~OFileViewFactory() = 0;
103
104 OFileView* newView(QWidget *parent, const char *name );
105 QString name()const;
106};
107
108
109#endif