author | zecke <zecke> | 2004-03-13 19:51:45 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-13 19:51:45 (UTC) |
commit | 6d08277737e22b7a1527124623f3571969073ddf (patch) (unidiff) | |
tree | 4129e674e21df767b31299e873dd44e33a308e1b /libopie2/opieui/fileselector/ofileselector.h | |
parent | 8e28911f7199f4450ac5eef09482069f9b9caea2 (diff) | |
download | opie-6d08277737e22b7a1527124623f3571969073ddf.zip opie-6d08277737e22b7a1527124623f3571969073ddf.tar.gz opie-6d08277737e22b7a1527124623f3571969073ddf.tar.bz2 |
Move XML class to internal PIM
Add namespaces!!!
Opie::Core and Opie::Core::Private
Opie::Net and Opie::Net::Private
Opie::Ui and Opie::Ui::Private
Opie::MM and Opie::MM::Private
Opie::DB and Opie::DB::Private
PIM classes are not yet converted because we will do other work
on it as well
Diffstat (limited to 'libopie2/opieui/fileselector/ofileselector.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/libopie2/opieui/fileselector/ofileselector.h b/libopie2/opieui/fileselector/ofileselector.h index 7fa657b..2205963 100644 --- a/libopie2/opieui/fileselector/ofileselector.h +++ b/libopie2/opieui/fileselector/ofileselector.h | |||
@@ -43,47 +43,49 @@ | |||
43 | #include <qwidget.h> | 43 | #include <qwidget.h> |
44 | #include <qmap.h> | 44 | #include <qmap.h> |
45 | #include <qvaluelist.h> | 45 | #include <qvaluelist.h> |
46 | #include <qstringlist.h> | 46 | #include <qstringlist.h> |
47 | 47 | ||
48 | class QLineEdit; | 48 | class QLineEdit; |
49 | class QComboBox; | 49 | class QComboBox; |
50 | class QWidgetStack; | 50 | class QWidgetStack; |
51 | class QHBox; | 51 | class QHBox; |
52 | 52 | ||
53 | typedef QMap<QString, QStringList> MimeTypes; | 53 | typedef QMap<QString, QStringList> MimeTypes; |
54 | 54 | ||
55 | namespace Opie | 55 | namespace Opie { |
56 | { | 56 | namespace Ui { |
57 | 57 | ||
58 | namespace Private { | ||
58 | class OFileViewInterface; | 59 | class OFileViewInterface; |
59 | class OFileViewFileListView; | 60 | class OFileViewFileListView; |
61 | } | ||
60 | 62 | ||
61 | 63 | ||
62 | /** | 64 | /** |
63 | * @short a dropin replacement for the FileSelector | 65 | * @short a dropin replacement for the FileSelector |
64 | * | 66 | * |
65 | * This class is first used insert the OFileDialog. | 67 | * This class is first used insert the OFileDialog. |
66 | * It supports multiple view and mimetype filtering for now. | 68 | * It supports multiple view and mimetype filtering for now. |
67 | * | 69 | * |
68 | * @see OFileDialog | 70 | * @see OFileDialog |
69 | * @see FileSelector | 71 | * @see FileSelector |
70 | * @author zecke | 72 | * @author zecke |
71 | * @version 0.1 | 73 | * @version 0.1 |
72 | */ | 74 | */ |
73 | class OFileSelector : public QWidget | 75 | class OFileSelector : public QWidget |
74 | { | 76 | { |
75 | Q_OBJECT | 77 | Q_OBJECT |
76 | friend class Opie::OFileViewInterface; | 78 | friend class Private::OFileViewInterface; |
77 | friend class Opie::OFileViewFileListView; | 79 | friend class Private::OFileViewFileListView; |
78 | 80 | ||
79 | public: | 81 | public: |
80 | /** | 82 | /** |
81 | * The Mode of the Fileselector | 83 | * The Mode of the Fileselector |
82 | * Open = Open A File | 84 | * Open = Open A File |
83 | * Save = Save a File | 85 | * Save = Save a File |
84 | * FILESELECTOR = As A GUI in a screen to select a file | 86 | * FILESELECTOR = As A GUI in a screen to select a file |
85 | */ | 87 | */ |
86 | enum Mode { Open=1, Save=2, FileSelector=4, OPEN=1, SAVE=2, FILESELECTOR=4 }; | 88 | enum Mode { Open=1, Save=2, FileSelector=4, OPEN=1, SAVE=2, FILESELECTOR=4 }; |
87 | // enum OldMode { OPEN=1, SAVE=2, FILESELECTOR = 4 }; | 89 | // enum OldMode { OPEN=1, SAVE=2, FILESELECTOR = 4 }; |
88 | /** | 90 | /** |
89 | * Normal = The old FileSelector | 91 | * Normal = The old FileSelector |
@@ -176,44 +178,45 @@ private: | |||
176 | private: | 178 | private: |
177 | /* inits the Widgets */ | 179 | /* inits the Widgets */ |
178 | void initUI(); | 180 | void initUI(); |
179 | /* inits the MimeType ComboBox content + connects signals and slots */ | 181 | /* inits the MimeType ComboBox content + connects signals and slots */ |
180 | void initMime(); | 182 | void initMime(); |
181 | /* init the Views :) */ | 183 | /* init the Views :) */ |
182 | void initViews(); | 184 | void initViews(); |
183 | 185 | ||
184 | private: | 186 | private: |
185 | QLineEdit* m_lneEdit; // the LineEdit for the Name | 187 | QLineEdit* m_lneEdit; // the LineEdit for the Name |
186 | QComboBox *m_cmbView, *m_cmbMime; // two ComboBoxes to select the View and MimeType | 188 | QComboBox *m_cmbView, *m_cmbMime; // two ComboBoxes to select the View and MimeType |
187 | QWidgetStack* m_stack; // our widget stack which will contain the views | 189 | QWidgetStack* m_stack; // our widget stack which will contain the views |
188 | OFileViewInterface* currentView() const; // returns the currentView | 190 | Private::OFileViewInterface* currentView() const; // returns the currentView |
189 | OFileViewInterface* m_current; // here is the view saved | 191 | Private::OFileViewInterface* m_current; // here is the view saved |
190 | bool m_shNew : 1; // should we show New? | 192 | bool m_shNew : 1; // should we show New? |
191 | bool m_shClose : 1; // should we show Close? | 193 | bool m_shClose : 1; // should we show Close? |
192 | MimeTypes m_mimeType; // list of mimetypes | 194 | MimeTypes m_mimeType; // list of mimetypes |
193 | 195 | ||
194 | QMap<QString, OFileViewInterface*> m_views; // QString translated view name + ViewInterface Ptr | 196 | QMap<QString, Private::OFileViewInterface*> m_views; // QString translated view name + ViewInterface Ptr |
195 | QHBox* m_nameBox; // the LineEdit + Label is hold here | 197 | QHBox* m_nameBox; // the LineEdit + Label is hold here |
196 | QHBox* m_cmbBox; // this holds the two combo boxes | 198 | QHBox* m_cmbBox; // this holds the two combo boxes |
197 | 199 | ||
198 | QString m_startDir; | 200 | QString m_startDir; |
199 | int m_mode; | 201 | int m_mode; |
200 | int m_selector; | 202 | int m_selector; |
201 | 203 | ||
202 | struct Data; // used for future versions | 204 | struct Data; // used for future versions |
203 | Data *d; | 205 | Data *d; |
204 | 206 | ||
205 | private slots: | 207 | private slots: |
206 | void slotMimeTypeChanged(); | 208 | void slotMimeTypeChanged(); |
207 | 209 | ||
208 | /* will set the text of the lineedit and emit a fileChanged signal */ | 210 | /* will set the text of the lineedit and emit a fileChanged signal */ |
209 | void slotDocLnkBridge( const DocLnk& ); | 211 | void slotDocLnkBridge( const DocLnk& ); |
210 | void slotFileBridge( const QString& ); | 212 | void slotFileBridge( const QString& ); |
211 | void slotViewChange( const QString& ); | 213 | void slotViewChange( const QString& ); |
212 | 214 | ||
213 | bool eventFilter (QObject *o, QEvent *e); | 215 | bool eventFilter (QObject *o, QEvent *e); |
214 | 216 | ||
215 | }; | 217 | }; |
216 | 218 | ||
217 | }; | 219 | } |
220 | } | ||
218 | 221 | ||
219 | #endif | 222 | #endif |