author | dwmw2 <dwmw2> | 2002-05-09 10:33:18 (UTC) |
---|---|---|
committer | dwmw2 <dwmw2> | 2002-05-09 10:33:18 (UTC) |
commit | 388e930a890f11c51dd862f6258c1fc60b396334 (patch) (unidiff) | |
tree | 69f322f31c2b2c3338fdb461924349c106f72f59 | |
parent | 4216d2833503440d25ee40683cd563f379f125a6 (diff) | |
download | opie-388e930a890f11c51dd862f6258c1fc60b396334.zip opie-388e930a890f11c51dd862f6258c1fc60b396334.tar.gz opie-388e930a890f11c51dd862f6258c1fc60b396334.tar.bz2 |
Add missing #include <qpainter.h>
-rw-r--r-- | libopie/ofileselector.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc index d780da9..8299b3d 100644 --- a/libopie/ofileselector.cc +++ b/libopie/ofileselector.cc | |||
@@ -1,107 +1,108 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #include <qcheckbox.h> | 3 | #include <qcheckbox.h> |
4 | #include <qcombobox.h> | 4 | #include <qcombobox.h> |
5 | #include <qheader.h> | 5 | #include <qheader.h> |
6 | #include <qlabel.h> | 6 | #include <qlabel.h> |
7 | #include <qabstractlayout.h> | 7 | #include <qabstractlayout.h> |
8 | #include <qlayout.h> | 8 | #include <qlayout.h> |
9 | #include <qlineedit.h> | 9 | #include <qlineedit.h> |
10 | #include <qlistview.h> | 10 | #include <qlistview.h> |
11 | #include <qmessagebox.h> | 11 | #include <qmessagebox.h> |
12 | #include <qpainter.h> | ||
12 | #include <qpushbutton.h> | 13 | #include <qpushbutton.h> |
13 | #include <qwidgetstack.h> | 14 | #include <qwidgetstack.h> |
14 | #include <qpopupmenu.h> | 15 | #include <qpopupmenu.h> |
15 | #include <qdir.h> | 16 | #include <qdir.h> |
16 | #include <qfile.h> | 17 | #include <qfile.h> |
17 | #include <qfileinfo.h> | 18 | #include <qfileinfo.h> |
18 | #include <qtimer.h> | 19 | #include <qtimer.h> |
19 | 20 | ||
20 | #include <qpe/qpeapplication.h> | 21 | #include <qpe/qpeapplication.h> |
21 | #include <qpe/applnk.h> | 22 | #include <qpe/applnk.h> |
22 | #include <qpe/fileselector.h> | 23 | #include <qpe/fileselector.h> |
23 | #include <qpe/global.h> | 24 | #include <qpe/global.h> |
24 | #include <qpe/mimetype.h> | 25 | #include <qpe/mimetype.h> |
25 | #include <qpe/resource.h> | 26 | #include <qpe/resource.h> |
26 | #include <qpe/storage.h> | 27 | #include <qpe/storage.h> |
27 | 28 | ||
28 | #include <unistd.h> | 29 | #include <unistd.h> |
29 | #include <stdlib.h> | 30 | #include <stdlib.h> |
30 | #include <sys/stat.h> | 31 | #include <sys/stat.h> |
31 | 32 | ||
32 | #include "ofileselector.h" | 33 | #include "ofileselector.h" |
33 | 34 | ||
34 | 35 | ||
35 | QMap<QString,QPixmap> *OFileSelector::m_pixmaps = 0; | 36 | QMap<QString,QPixmap> *OFileSelector::m_pixmaps = 0; |
36 | 37 | ||
37 | namespace { | 38 | namespace { |
38 | int indexByString( const QComboBox *box, const QString &str ){ | 39 | int indexByString( const QComboBox *box, const QString &str ){ |
39 | int index= 0; | 40 | int index= 0; |
40 | for(int i= 0; i < box->count(); i++ ){ | 41 | for(int i= 0; i < box->count(); i++ ){ |
41 | if( str == box->text(i ) ){ | 42 | if( str == box->text(i ) ){ |
42 | index= i; | 43 | index= i; |
43 | break; | 44 | break; |
44 | } | 45 | } |
45 | } | 46 | } |
46 | return index; | 47 | return index; |
47 | } | 48 | } |
48 | class OFileSelectorItem : public QListViewItem { | 49 | class OFileSelectorItem : public QListViewItem { |
49 | public: | 50 | public: |
50 | OFileSelectorItem(QListView *view, const QPixmap &pixmap, const QString &path, | 51 | OFileSelectorItem(QListView *view, const QPixmap &pixmap, const QString &path, |
51 | const QString &date, const QString &size, const QString &mDir, | 52 | const QString &date, const QString &size, const QString &mDir, |
52 | bool isLocked=false, bool isDir=false ): QListViewItem(view) { | 53 | bool isLocked=false, bool isDir=false ): QListViewItem(view) { |
53 | setPixmap(0, pixmap ); | 54 | setPixmap(0, pixmap ); |
54 | setText(1, path ); | 55 | setText(1, path ); |
55 | setText(2, size ); | 56 | setText(2, size ); |
56 | setText(3, date ); | 57 | setText(3, date ); |
57 | //setText(4, mDir ); | 58 | //setText(4, mDir ); |
58 | m_dir = mDir; | 59 | m_dir = mDir; |
59 | dir = isDir; | 60 | dir = isDir; |
60 | mLocked = isLocked; | 61 | mLocked = isLocked; |
61 | } | 62 | } |
62 | bool isLocked() const{ | 63 | bool isLocked() const{ |
63 | return mLocked; | 64 | return mLocked; |
64 | } | 65 | } |
65 | QString directory()const{ | 66 | QString directory()const{ |
66 | return m_dir; | 67 | return m_dir; |
67 | } | 68 | } |
68 | bool isDir()const{ | 69 | bool isDir()const{ |
69 | return dir; | 70 | return dir; |
70 | } | 71 | } |
71 | QString path()const{ | 72 | QString path()const{ |
72 | return text(1 ); | 73 | return text(1 ); |
73 | } | 74 | } |
74 | QString key(int id, bool )const { | 75 | QString key(int id, bool )const { |
75 | QString ke; | 76 | QString ke; |
76 | if( id == 0 || id == 1 ){ // name | 77 | if( id == 0 || id == 1 ){ // name |
77 | if( dir ){ | 78 | if( dir ){ |
78 | ke.append("0" ); | 79 | ke.append("0" ); |
79 | ke.append( text(1) ); | 80 | ke.append( text(1) ); |
80 | }else{ | 81 | }else{ |
81 | ke.append("1" ); | 82 | ke.append("1" ); |
82 | ke.append( text(1) ); | 83 | ke.append( text(1) ); |
83 | } | 84 | } |
84 | }else if( id == 2 ){ // size | 85 | }else if( id == 2 ){ // size |
85 | return text(2); | 86 | return text(2); |
86 | }else if( id == 3 ){ // date | 87 | }else if( id == 3 ){ // date |
87 | return text(3); | 88 | return text(3); |
88 | } | 89 | } |
89 | return ke; | 90 | return ke; |
90 | }; | 91 | }; |
91 | private: | 92 | private: |
92 | bool mLocked:1; | 93 | bool mLocked:1; |
93 | bool dir:1; | 94 | bool dir:1; |
94 | QString m_dir; | 95 | QString m_dir; |
95 | }; | 96 | }; |
96 | }; | 97 | }; |
97 | 98 | ||
98 | 99 | ||
99 | OFileSelector::OFileSelector( QWidget *wid, int mode, int selector, | 100 | OFileSelector::OFileSelector( QWidget *wid, int mode, int selector, |
100 | const QString &dirName, | 101 | const QString &dirName, |
101 | const QString &fileName, | 102 | const QString &fileName, |
102 | const QStringList &mimeTypes ) | 103 | const QStringList &mimeTypes ) |
103 | : QWidget( wid, "OFileSelector") | 104 | : QWidget( wid, "OFileSelector") |
104 | { | 105 | { |
105 | m_mimetypes = mimeTypes; | 106 | m_mimetypes = mimeTypes; |
106 | initVars(); | 107 | initVars(); |
107 | m_mode = mode; | 108 | m_mode = mode; |