Changeset View
Changeset View
Standalone View
Standalone View
krusader/ActionMan/addplaceholderpopup.h
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | |||||
111 | /** | 111 | /** | ||
112 | * The simple Parameter widgets: a line-edit with the description above | 112 | * The simple Parameter widgets: a line-edit with the description above | ||
113 | * used by default | 113 | * used by default | ||
114 | */ | 114 | */ | ||
115 | class ParameterText : public ParameterBase | 115 | class ParameterText : public ParameterBase | ||
116 | { | 116 | { | ||
117 | public: | 117 | public: | ||
118 | ParameterText(const exp_parameter& parameter, QWidget* parent); | 118 | ParameterText(const exp_parameter& parameter, QWidget* parent); | ||
119 | QString text(); | 119 | QString text() Q_DECL_OVERRIDE; | ||
120 | QString preset(); | 120 | QString preset() Q_DECL_OVERRIDE; | ||
121 | void reset(); | 121 | void reset() Q_DECL_OVERRIDE; | ||
122 | bool valid(); | 122 | bool valid() Q_DECL_OVERRIDE; | ||
123 | private: | 123 | private: | ||
124 | KLineEdit * _lineEdit; | 124 | KLineEdit * _lineEdit; | ||
125 | QString _preset; | 125 | QString _preset; | ||
126 | }; | 126 | }; | ||
127 | 127 | | |||
128 | /** | 128 | /** | ||
129 | * A line-edit with the "addPlaceholder"-button | 129 | * A line-edit with the "addPlaceholder"-button | ||
130 | * used with default = "__placeholder" | 130 | * used with default = "__placeholder" | ||
131 | */ | 131 | */ | ||
132 | class ParameterPlaceholder : public ParameterBase | 132 | class ParameterPlaceholder : public ParameterBase | ||
133 | { | 133 | { | ||
134 | Q_OBJECT | 134 | Q_OBJECT | ||
135 | public: | 135 | public: | ||
136 | ParameterPlaceholder(const exp_parameter& parameter, QWidget* parent); | 136 | ParameterPlaceholder(const exp_parameter& parameter, QWidget* parent); | ||
137 | QString text(); | 137 | QString text() Q_DECL_OVERRIDE; | ||
138 | QString preset(); | 138 | QString preset() Q_DECL_OVERRIDE; | ||
139 | void reset(); | 139 | void reset() Q_DECL_OVERRIDE; | ||
140 | bool valid(); | 140 | bool valid() Q_DECL_OVERRIDE; | ||
141 | private: | 141 | private: | ||
142 | KLineEdit * _lineEdit; | 142 | KLineEdit * _lineEdit; | ||
143 | QToolButton* _button; | 143 | QToolButton* _button; | ||
144 | private slots: | 144 | private slots: | ||
145 | void addPlaceholder(); | 145 | void addPlaceholder(); | ||
146 | }; | 146 | }; | ||
147 | 147 | | |||
148 | /** | 148 | /** | ||
149 | * A Checkbox, default: checked; retuns "No" if unchecked | 149 | * A Checkbox, default: checked; retuns "No" if unchecked | ||
150 | * used with default = "__yes" | 150 | * used with default = "__yes" | ||
151 | */ | 151 | */ | ||
152 | class ParameterYes : public ParameterBase | 152 | class ParameterYes : public ParameterBase | ||
153 | { | 153 | { | ||
154 | public: | 154 | public: | ||
155 | ParameterYes(const exp_parameter& parameter, QWidget* parent); | 155 | ParameterYes(const exp_parameter& parameter, QWidget* parent); | ||
156 | QString text(); | 156 | QString text() Q_DECL_OVERRIDE; | ||
157 | QString preset(); | 157 | QString preset() Q_DECL_OVERRIDE; | ||
158 | void reset(); | 158 | void reset() Q_DECL_OVERRIDE; | ||
159 | bool valid(); | 159 | bool valid() Q_DECL_OVERRIDE; | ||
160 | private: | 160 | private: | ||
161 | QCheckBox* _checkBox; | 161 | QCheckBox* _checkBox; | ||
162 | }; | 162 | }; | ||
163 | 163 | | |||
164 | /** | 164 | /** | ||
165 | * A Checkbox, default: unchecked; retuns "Yes" if checked | 165 | * A Checkbox, default: unchecked; retuns "Yes" if checked | ||
166 | * used with default = "__no" | 166 | * used with default = "__no" | ||
167 | */ | 167 | */ | ||
168 | class ParameterNo : public ParameterBase | 168 | class ParameterNo : public ParameterBase | ||
169 | { | 169 | { | ||
170 | public: | 170 | public: | ||
171 | ParameterNo(const exp_parameter& parameter, QWidget* parent); | 171 | ParameterNo(const exp_parameter& parameter, QWidget* parent); | ||
172 | QString text(); | 172 | QString text() Q_DECL_OVERRIDE; | ||
173 | QString preset(); | 173 | QString preset() Q_DECL_OVERRIDE; | ||
174 | void reset(); | 174 | void reset() Q_DECL_OVERRIDE; | ||
175 | bool valid(); | 175 | bool valid() Q_DECL_OVERRIDE; | ||
176 | private: | 176 | private: | ||
177 | QCheckBox* _checkBox; | 177 | QCheckBox* _checkBox; | ||
178 | }; | 178 | }; | ||
179 | 179 | | |||
180 | /** | 180 | /** | ||
181 | * A line-edit with the "file open"-button | 181 | * A line-edit with the "file open"-button | ||
182 | * used with default = "__file" | 182 | * used with default = "__file" | ||
183 | */ | 183 | */ | ||
184 | class ParameterFile : public ParameterBase | 184 | class ParameterFile : public ParameterBase | ||
185 | { | 185 | { | ||
186 | Q_OBJECT | 186 | Q_OBJECT | ||
187 | public: | 187 | public: | ||
188 | ParameterFile(const exp_parameter& parameter, QWidget* parent); | 188 | ParameterFile(const exp_parameter& parameter, QWidget* parent); | ||
189 | QString text(); | 189 | QString text() Q_DECL_OVERRIDE; | ||
190 | QString preset(); | 190 | QString preset() Q_DECL_OVERRIDE; | ||
191 | void reset(); | 191 | void reset() Q_DECL_OVERRIDE; | ||
192 | bool valid(); | 192 | bool valid() Q_DECL_OVERRIDE; | ||
193 | private: | 193 | private: | ||
194 | KLineEdit * _lineEdit; | 194 | KLineEdit * _lineEdit; | ||
195 | QToolButton* _button; | 195 | QToolButton* _button; | ||
196 | private slots: | 196 | private slots: | ||
197 | void addFile(); | 197 | void addFile(); | ||
198 | }; | 198 | }; | ||
199 | 199 | | |||
200 | /** | 200 | /** | ||
201 | * A ComboBox with the description above | 201 | * A ComboBox with the description above | ||
202 | * used with default = "__choose:item1;item2;..." | 202 | * used with default = "__choose:item1;item2;..." | ||
203 | */ | 203 | */ | ||
204 | class ParameterChoose : public ParameterBase | 204 | class ParameterChoose : public ParameterBase | ||
205 | { | 205 | { | ||
206 | public: | 206 | public: | ||
207 | ParameterChoose(const exp_parameter& parameter, QWidget* parent); | 207 | ParameterChoose(const exp_parameter& parameter, QWidget* parent); | ||
208 | QString text(); | 208 | QString text() Q_DECL_OVERRIDE; | ||
209 | QString preset(); | 209 | QString preset() Q_DECL_OVERRIDE; | ||
210 | void reset(); | 210 | void reset() Q_DECL_OVERRIDE; | ||
211 | bool valid(); | 211 | bool valid() Q_DECL_OVERRIDE; | ||
212 | private: | 212 | private: | ||
213 | KComboBox * _combobox; | 213 | KComboBox * _combobox; | ||
214 | }; | 214 | }; | ||
215 | 215 | | |||
216 | /** | 216 | /** | ||
217 | * An editable ComboBox with the predefined selections | 217 | * An editable ComboBox with the predefined selections | ||
218 | * used with default = "__select" | 218 | * used with default = "__select" | ||
219 | */ | 219 | */ | ||
220 | class ParameterSelect : public ParameterBase | 220 | class ParameterSelect : public ParameterBase | ||
221 | { | 221 | { | ||
222 | public: | 222 | public: | ||
223 | ParameterSelect(const exp_parameter& parameter, QWidget* parent); | 223 | ParameterSelect(const exp_parameter& parameter, QWidget* parent); | ||
224 | QString text(); | 224 | QString text() Q_DECL_OVERRIDE; | ||
225 | QString preset(); | 225 | QString preset() Q_DECL_OVERRIDE; | ||
226 | void reset(); | 226 | void reset() Q_DECL_OVERRIDE; | ||
227 | bool valid(); | 227 | bool valid() Q_DECL_OVERRIDE; | ||
228 | private: | 228 | private: | ||
229 | KComboBox * _combobox; | 229 | KComboBox * _combobox; | ||
230 | }; | 230 | }; | ||
231 | 231 | | |||
232 | /** | 232 | /** | ||
233 | * A line-edit with a "choose dir"- and a bookmark-button | 233 | * A line-edit with a "choose dir"- and a bookmark-button | ||
234 | * used with default = "__goto" | 234 | * used with default = "__goto" | ||
235 | */ | 235 | */ | ||
236 | class ParameterGoto : public ParameterBase | 236 | class ParameterGoto : public ParameterBase | ||
237 | { | 237 | { | ||
238 | Q_OBJECT | 238 | Q_OBJECT | ||
239 | public: | 239 | public: | ||
240 | ParameterGoto(const exp_parameter& parameter, QWidget* parent); | 240 | ParameterGoto(const exp_parameter& parameter, QWidget* parent); | ||
241 | QString text(); | 241 | QString text() Q_DECL_OVERRIDE; | ||
242 | QString preset(); | 242 | QString preset() Q_DECL_OVERRIDE; | ||
243 | void reset(); | 243 | void reset() Q_DECL_OVERRIDE; | ||
244 | bool valid(); | 244 | bool valid() Q_DECL_OVERRIDE; | ||
245 | private: | 245 | private: | ||
246 | KLineEdit * _lineEdit; | 246 | KLineEdit * _lineEdit; | ||
247 | QToolButton* _dirButton, *_placeholderButton; | 247 | QToolButton* _dirButton, *_placeholderButton; | ||
248 | private slots: | 248 | private slots: | ||
249 | void setDir(); | 249 | void setDir(); | ||
250 | void addPlaceholder(); | 250 | void addPlaceholder(); | ||
251 | }; | 251 | }; | ||
252 | 252 | | |||
253 | /** | 253 | /** | ||
254 | * A ComboBox with all profiles available for the Synchronizer | 254 | * A ComboBox with all profiles available for the Synchronizer | ||
255 | * used with default = "__syncprofile" | 255 | * used with default = "__syncprofile" | ||
256 | */ | 256 | */ | ||
257 | class ParameterSyncprofile : public ParameterBase | 257 | class ParameterSyncprofile : public ParameterBase | ||
258 | { | 258 | { | ||
259 | public: | 259 | public: | ||
260 | ParameterSyncprofile(const exp_parameter& parameter, QWidget* parent); | 260 | ParameterSyncprofile(const exp_parameter& parameter, QWidget* parent); | ||
261 | QString text(); | 261 | QString text() Q_DECL_OVERRIDE; | ||
262 | QString preset(); | 262 | QString preset() Q_DECL_OVERRIDE; | ||
263 | void reset(); | 263 | void reset() Q_DECL_OVERRIDE; | ||
264 | bool valid(); | 264 | bool valid() Q_DECL_OVERRIDE; | ||
265 | private: | 265 | private: | ||
266 | KComboBox * _combobox; | 266 | KComboBox * _combobox; | ||
267 | }; | 267 | }; | ||
268 | 268 | | |||
269 | /** | 269 | /** | ||
270 | * A ComboBox with all profiles available for the panels | 270 | * A ComboBox with all profiles available for the panels | ||
271 | * used with default = "__panelprofile" | 271 | * used with default = "__panelprofile" | ||
272 | */ | 272 | */ | ||
273 | class ParameterPanelprofile : public ParameterBase | 273 | class ParameterPanelprofile : public ParameterBase | ||
274 | { | 274 | { | ||
275 | public: | 275 | public: | ||
276 | ParameterPanelprofile(const exp_parameter& parameter, QWidget* parent); | 276 | ParameterPanelprofile(const exp_parameter& parameter, QWidget* parent); | ||
277 | QString text(); | 277 | QString text() Q_DECL_OVERRIDE; | ||
278 | QString preset(); | 278 | QString preset() Q_DECL_OVERRIDE; | ||
279 | void reset(); | 279 | void reset() Q_DECL_OVERRIDE; | ||
280 | bool valid(); | 280 | bool valid() Q_DECL_OVERRIDE; | ||
281 | private: | 281 | private: | ||
282 | KComboBox * _combobox; | 282 | KComboBox * _combobox; | ||
283 | }; | 283 | }; | ||
284 | 284 | | |||
285 | /** | 285 | /** | ||
286 | * A ComboBox with all profiles available for the Searchmodule | 286 | * A ComboBox with all profiles available for the Searchmodule | ||
287 | * used with default = "__searchprofile" | 287 | * used with default = "__searchprofile" | ||
288 | */ | 288 | */ | ||
289 | class ParameterSearch : public ParameterBase | 289 | class ParameterSearch : public ParameterBase | ||
290 | { | 290 | { | ||
291 | public: | 291 | public: | ||
292 | ParameterSearch(const exp_parameter& parameter, QWidget* parent); | 292 | ParameterSearch(const exp_parameter& parameter, QWidget* parent); | ||
293 | QString text(); | 293 | QString text() Q_DECL_OVERRIDE; | ||
294 | QString preset(); | 294 | QString preset() Q_DECL_OVERRIDE; | ||
295 | void reset(); | 295 | void reset() Q_DECL_OVERRIDE; | ||
296 | bool valid(); | 296 | bool valid() Q_DECL_OVERRIDE; | ||
297 | private: | 297 | private: | ||
298 | KComboBox * _combobox; | 298 | KComboBox * _combobox; | ||
299 | }; | 299 | }; | ||
300 | 300 | | |||
301 | /** | 301 | /** | ||
302 | * A SpinBox for integer | 302 | * A SpinBox for integer | ||
303 | * used with default = "__int:min;max;step;value" | 303 | * used with default = "__int:min;max;step;value" | ||
304 | */ | 304 | */ | ||
305 | class ParameterInt : public ParameterBase | 305 | class ParameterInt : public ParameterBase | ||
306 | { | 306 | { | ||
307 | public: | 307 | public: | ||
308 | ParameterInt(const exp_parameter& parameter, QWidget* parent); | 308 | ParameterInt(const exp_parameter& parameter, QWidget* parent); | ||
309 | QString text(); | 309 | QString text() Q_DECL_OVERRIDE; | ||
310 | QString preset(); | 310 | QString preset() Q_DECL_OVERRIDE; | ||
311 | void reset(); | 311 | void reset() Q_DECL_OVERRIDE; | ||
312 | bool valid(); | 312 | bool valid() Q_DECL_OVERRIDE; | ||
313 | private: | 313 | private: | ||
314 | QSpinBox * _spinbox; | 314 | QSpinBox * _spinbox; | ||
315 | int _default; | 315 | int _default; | ||
316 | }; | 316 | }; | ||
317 | 317 | | |||
318 | //////////////////////////////////////////////////////////////////////////////////////////// | 318 | //////////////////////////////////////////////////////////////////////////////////////////// | ||
319 | /////////////////////////////// ParameterDialog //////////////////////////////////// | 319 | /////////////////////////////// ParameterDialog //////////////////////////////////// | ||
320 | //////////////////////////////////////////////////////////////////////////////////////////// | 320 | //////////////////////////////////////////////////////////////////////////////////////////// | ||
Show All 28 Lines |