-rw-r--r-- | libopie/ofileselector.h | 62 |
1 files changed, 61 insertions, 1 deletions
diff --git a/libopie/ofileselector.h b/libopie/ofileselector.h index bdb3e56..767455c 100644 --- a/libopie/ofileselector.h +++ b/libopie/ofileselector.h | |||
@@ -52,4 +52,17 @@ class QComboBox; | |||
52 | class QWidgetStack; | 52 | class QWidgetStack; |
53 | class QHBox; | 53 | class QHBox; |
54 | |||
55 | |||
56 | /** | ||
57 | * @short a dropin replacement for the FileSelector | ||
58 | * | ||
59 | * This class is first used insert the OFileDialog. | ||
60 | * It supports multiple view and mimetype filtering for now. | ||
61 | * | ||
62 | * @see OFileDialog | ||
63 | * @see FileSelector | ||
64 | * @author zecke | ||
65 | * @version 0.1 | ||
66 | */ | ||
54 | class OFileSelector : public QWidget { | 67 | class OFileSelector : public QWidget { |
55 | Q_OBJECT | 68 | Q_OBJECT |
@@ -57,9 +70,22 @@ class OFileSelector : public QWidget { | |||
57 | friend class OFileViewFileListView; | 70 | friend class OFileViewFileListView; |
58 | public: | 71 | public: |
72 | /** | ||
73 | * The Mode of the Fileselector | ||
74 | * Open = Open A File | ||
75 | * Save = Save a File | ||
76 | * FILESELECTOR = As A GUI in a screen to select a file | ||
77 | */ | ||
59 | enum Mode { Open=1, Save=2, FileSelector=4, OPEN=1, SAVE=2, FILESELECTOR=4 }; | 78 | enum Mode { Open=1, Save=2, FileSelector=4, OPEN=1, SAVE=2, FILESELECTOR=4 }; |
60 | // enum OldMode { OPEN=1, SAVE=2, FILESELECTOR = 4 }; | 79 | // enum OldMode { OPEN=1, SAVE=2, FILESELECTOR = 4 }; |
80 | /** | ||
81 | * Normal = The old FileSelector | ||
82 | * Extended = Dir View | ||
83 | * ExtendedAll = Dir View with all hidden files | ||
84 | * Default = What the vendor considers best | ||
85 | */ | ||
61 | enum Selector { Normal = 0, Extended=1, ExtendedAll =2, Default=3, NORMAL=0,EXTENDED=1, EXTENDED_ALL =2, DEFAULT=3 }; | 86 | enum Selector { Normal = 0, Extended=1, ExtendedAll =2, Default=3, NORMAL=0,EXTENDED=1, EXTENDED_ALL =2, DEFAULT=3 }; |
62 | // enum OldSelector { NORMAL = 0, EXTENDED =1, EXTENDED_ALL = 2}; | 87 | // enum OldSelector { NORMAL = 0, EXTENDED =1, EXTENDED_ALL = 2}; |
63 | 88 | ||
89 | |||
64 | OFileSelector(QWidget* parent, int mode, int selector, | 90 | OFileSelector(QWidget* parent, int mode, int selector, |
65 | const QString& dirName, | 91 | const QString& dirName, |
@@ -86,15 +112,49 @@ public: | |||
86 | int selector()const; | 112 | int selector()const; |
87 | 113 | ||
88 | 114 | /** | |
115 | * Set the Icon visible | ||
116 | * @param b Show or Hide the New Button | ||
117 | */ | ||
89 | void setNewVisible( bool b ); | 118 | void setNewVisible( bool b ); |
119 | |||
120 | /** | ||
121 | * Set the Icon visible | ||
122 | */ | ||
90 | void setCloseVisible( bool b ); | 123 | void setCloseVisible( bool b ); |
124 | |||
125 | /** | ||
126 | * Set the Name Line visible | ||
127 | */ | ||
91 | void setNameVisible( bool b ); | 128 | void setNameVisible( bool b ); |
92 | 129 | ||
93 | signals: | 130 | signals: |
131 | /** | ||
132 | * dirSelected is emitted whenever changed into a different dir | ||
133 | */ | ||
94 | void dirSelected( const QString& ); | 134 | void dirSelected( const QString& ); |
135 | |||
136 | /** | ||
137 | * fileSelected is emitted when a file is selected | ||
138 | * it uses a DocLnk as parameter | ||
139 | */ | ||
95 | void fileSelected( const DocLnk& ); | 140 | void fileSelected( const DocLnk& ); |
141 | |||
142 | /** | ||
143 | * fileSelected is emitted when a file is selected | ||
144 | * the complete path is a parameter | ||
145 | */ | ||
96 | void fileSelected( const QString& ); | 146 | void fileSelected( const QString& ); |
147 | |||
148 | /** | ||
149 | * Create a new File with a DocLnk | ||
150 | */ | ||
97 | void newSelected( const DocLnk& ); | 151 | void newSelected( const DocLnk& ); |
152 | |||
98 | void closeMe(); | 153 | void closeMe(); |
154 | |||
155 | /** | ||
156 | * Ok is emitted on a Qt::Key_Return or Q::Key_Enter | ||
157 | * in the line edit | ||
158 | */ | ||
99 | void ok(); | 159 | void ok(); |
100 | void cancel(); | 160 | void cancel(); |