1 | /* $Id: UIDetailsElements.h 103977 2024-03-21 02:04:52Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIDetailsElement[Name] classes declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2012-2023 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox base platform packages, as
|
---|
10 | * available from https://www.virtualbox.org.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or
|
---|
13 | * modify it under the terms of the GNU General Public License
|
---|
14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
15 | * License.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful, but
|
---|
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | * General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | *
|
---|
25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef FEQT_INCLUDED_SRC_manager_details_UIDetailsElements_h
|
---|
29 | #define FEQT_INCLUDED_SRC_manager_details_UIDetailsElements_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* Qt includes: */
|
---|
35 | #include <QMutex>
|
---|
36 |
|
---|
37 | /* GUI includes: */
|
---|
38 | #include "UIDetailsElement.h"
|
---|
39 | #include "UITask.h"
|
---|
40 |
|
---|
41 | /* COM includes: */
|
---|
42 | #include "CCloudMachine.h"
|
---|
43 | #include "CMachine.h"
|
---|
44 |
|
---|
45 | /* Forward declarations: */
|
---|
46 | class UIMachinePreview;
|
---|
47 | class CNetworkAdapter;
|
---|
48 |
|
---|
49 |
|
---|
50 | /** UITask extension used as update task for the details-element. */
|
---|
51 | class UIDetailsUpdateTask : public UITask
|
---|
52 | {
|
---|
53 | Q_OBJECT;
|
---|
54 |
|
---|
55 | public:
|
---|
56 |
|
---|
57 | /** Constructs update task taking @a comMachine as data. */
|
---|
58 | UIDetailsUpdateTask(const CMachine &comMachine);
|
---|
59 | /** Constructs update task taking @a comCloudMachine as data. */
|
---|
60 | UIDetailsUpdateTask(const CCloudMachine &comCloudMachine);
|
---|
61 |
|
---|
62 | /** Returns the machine. */
|
---|
63 | CMachine machine() const;
|
---|
64 | /** Returns the cloud machine. */
|
---|
65 | CCloudMachine cloudMachine() const;
|
---|
66 |
|
---|
67 | /** Returns the table. */
|
---|
68 | UITextTable table() const;
|
---|
69 | /** Defines the @a guiTable. */
|
---|
70 | void setTable(const UITextTable &guiTable);
|
---|
71 |
|
---|
72 | private:
|
---|
73 |
|
---|
74 | /** Holds the mutex to access m_comMachine and m_comCloudMachine members. */
|
---|
75 | mutable QMutex m_machineMutex;
|
---|
76 | /** Holds the machine being processed. */
|
---|
77 | CMachine m_comMachine;
|
---|
78 | /** Holds the cloud machine being processed. */
|
---|
79 | CCloudMachine m_comCloudMachine;
|
---|
80 |
|
---|
81 | /** Holds the mutex to access m_guiTable member. */
|
---|
82 | mutable QMutex m_tableMutex;
|
---|
83 | /** Holds the machine being filled. */
|
---|
84 | UITextTable m_guiTable;
|
---|
85 | };
|
---|
86 |
|
---|
87 | /** UIDetailsElement extension used as a wrapping interface to
|
---|
88 | * extend base-class with async functionality performed by the COM worker-threads. */
|
---|
89 | class UIDetailsElementInterface : public UIDetailsElement
|
---|
90 | {
|
---|
91 | Q_OBJECT;
|
---|
92 |
|
---|
93 | public:
|
---|
94 |
|
---|
95 | /** Constructs details-element interface for passed @a pParent set.
|
---|
96 | * @param type brings the details-element type this element belongs to.
|
---|
97 | * @param fOpened brings whether the details-element should be visually opened. */
|
---|
98 | UIDetailsElementInterface(UIDetailsSet *pParent, DetailsElementType type, bool fOpened);
|
---|
99 |
|
---|
100 | protected:
|
---|
101 |
|
---|
102 | /** Performs translation. */
|
---|
103 | virtual void retranslateUi() RT_OVERRIDE;
|
---|
104 |
|
---|
105 | /** Updates appearance. */
|
---|
106 | virtual void updateAppearance() RT_OVERRIDE;
|
---|
107 |
|
---|
108 | /** Creates update task. */
|
---|
109 | virtual UITask *createUpdateTask() = 0;
|
---|
110 |
|
---|
111 | private slots:
|
---|
112 |
|
---|
113 | /** Handles the signal about update @a pTask is finished. */
|
---|
114 | virtual void sltUpdateAppearanceFinished(UITask *pTask);
|
---|
115 |
|
---|
116 | private:
|
---|
117 |
|
---|
118 | /** Holds the instance of the update task. */
|
---|
119 | UITask *m_pTask;
|
---|
120 | };
|
---|
121 |
|
---|
122 |
|
---|
123 | /** UIDetailsElementInterface extension for the details-element type 'Preview'. */
|
---|
124 | class UIDetailsElementPreview : public UIDetailsElement
|
---|
125 | {
|
---|
126 | Q_OBJECT;
|
---|
127 |
|
---|
128 | public:
|
---|
129 |
|
---|
130 | /** Constructs details-element interface for passed @a pParent set.
|
---|
131 | * @param fOpened brings whether the details-element should be opened. */
|
---|
132 | UIDetailsElementPreview(UIDetailsSet *pParent, bool fOpened);
|
---|
133 |
|
---|
134 | /** Updates layout. */
|
---|
135 | virtual void updateLayout() RT_OVERRIDE;
|
---|
136 |
|
---|
137 | private slots:
|
---|
138 |
|
---|
139 | /** Handles preview size-hint changes. */
|
---|
140 | void sltPreviewSizeHintChanged();
|
---|
141 |
|
---|
142 | private:
|
---|
143 |
|
---|
144 | /** Performs translation. */
|
---|
145 | virtual void retranslateUi() RT_OVERRIDE;
|
---|
146 |
|
---|
147 | /** Returns minimum width hint. */
|
---|
148 | int minimumWidthHint() const RT_OVERRIDE;
|
---|
149 | /** Returns minimum height hint.
|
---|
150 | * @param fClosed allows to specify whether the hint should
|
---|
151 | * be calculated for the closed element. */
|
---|
152 | int minimumHeightHintForElement(bool fClosed) const RT_OVERRIDE;
|
---|
153 |
|
---|
154 | /** Updates appearance. */
|
---|
155 | void updateAppearance() RT_OVERRIDE;
|
---|
156 |
|
---|
157 | /** Holds the instance of VM preview. */
|
---|
158 | UIMachinePreview *m_pPreview;
|
---|
159 | };
|
---|
160 |
|
---|
161 |
|
---|
162 | /** UITask extension used as update task for the details-element type 'General'. */
|
---|
163 | class UIDetailsUpdateTaskGeneral : public UIDetailsUpdateTask
|
---|
164 | {
|
---|
165 | Q_OBJECT;
|
---|
166 |
|
---|
167 | public:
|
---|
168 |
|
---|
169 | /** Constructs update task passing @a comMachine to the base-class. */
|
---|
170 | UIDetailsUpdateTaskGeneral(const CMachine &comMachine, UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral fOptions)
|
---|
171 | : UIDetailsUpdateTask(comMachine), m_fOptions(fOptions) {}
|
---|
172 |
|
---|
173 | private:
|
---|
174 |
|
---|
175 | /** Contains update task body. */
|
---|
176 | void run();
|
---|
177 |
|
---|
178 | /** Holds the options. */
|
---|
179 | UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral m_fOptions;
|
---|
180 | };
|
---|
181 |
|
---|
182 | /** UITask extension used as update task for the details-element type 'General' of cloud VM. */
|
---|
183 | class UIDetailsUpdateTaskGeneralCloud : public UIDetailsUpdateTask
|
---|
184 | {
|
---|
185 | Q_OBJECT;
|
---|
186 |
|
---|
187 | public:
|
---|
188 |
|
---|
189 | /** Constructs update task passing @a comCloudMachine to the base-class. */
|
---|
190 | UIDetailsUpdateTaskGeneralCloud(const CCloudMachine &comCloudMachine, UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral fOptions)
|
---|
191 | : UIDetailsUpdateTask(comCloudMachine), m_fOptions(fOptions) {}
|
---|
192 |
|
---|
193 | private:
|
---|
194 |
|
---|
195 | /** Contains update task body. */
|
---|
196 | void run();
|
---|
197 |
|
---|
198 | /** Holds the options. */
|
---|
199 | UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral m_fOptions;
|
---|
200 | };
|
---|
201 |
|
---|
202 | /** UIDetailsElementInterface extension for the details-element type 'General'. */
|
---|
203 | class UIDetailsElementGeneral : public UIDetailsElementInterface
|
---|
204 | {
|
---|
205 | Q_OBJECT;
|
---|
206 |
|
---|
207 | public:
|
---|
208 |
|
---|
209 | /** Constructs details-element object for passed @a pParent set.
|
---|
210 | * @param fOpened brings whether the details-element should be visually opened. */
|
---|
211 | UIDetailsElementGeneral(UIDetailsSet *pParent, bool fOpened)
|
---|
212 | : UIDetailsElementInterface(pParent, DetailsElementType_General, fOpened) {}
|
---|
213 |
|
---|
214 | private:
|
---|
215 |
|
---|
216 | /** Creates update task for this element. */
|
---|
217 | virtual UITask *createUpdateTask() RT_OVERRIDE;
|
---|
218 | };
|
---|
219 |
|
---|
220 |
|
---|
221 | /** UITask extension used as update task for the details-element type 'System'. */
|
---|
222 | class UIDetailsUpdateTaskSystem : public UIDetailsUpdateTask
|
---|
223 | {
|
---|
224 | Q_OBJECT;
|
---|
225 |
|
---|
226 | public:
|
---|
227 |
|
---|
228 | /** Constructs update task passing @a comMachine to the base-class. */
|
---|
229 | UIDetailsUpdateTaskSystem(const CMachine &comMachine, UIExtraDataMetaDefs::DetailsElementOptionTypeSystem fOptions)
|
---|
230 | : UIDetailsUpdateTask(comMachine), m_fOptions(fOptions) {}
|
---|
231 |
|
---|
232 | private:
|
---|
233 |
|
---|
234 | /** Contains update task body. */
|
---|
235 | void run();
|
---|
236 |
|
---|
237 | /** Holds the options. */
|
---|
238 | UIExtraDataMetaDefs::DetailsElementOptionTypeSystem m_fOptions;
|
---|
239 | };
|
---|
240 |
|
---|
241 | /** UIDetailsElementInterface extension for the details-element type 'System'. */
|
---|
242 | class UIDetailsElementSystem : public UIDetailsElementInterface
|
---|
243 | {
|
---|
244 | Q_OBJECT;
|
---|
245 |
|
---|
246 | public:
|
---|
247 |
|
---|
248 | /** Constructs details-element object for passed @a pParent set.
|
---|
249 | * @param fOpened brings whether the details-element should be visually opened. */
|
---|
250 | UIDetailsElementSystem(UIDetailsSet *pParent, bool fOpened)
|
---|
251 | : UIDetailsElementInterface(pParent, DetailsElementType_System, fOpened) {}
|
---|
252 |
|
---|
253 | private:
|
---|
254 |
|
---|
255 | /** Creates update task for this element. */
|
---|
256 | virtual UITask *createUpdateTask() RT_OVERRIDE;
|
---|
257 | };
|
---|
258 |
|
---|
259 |
|
---|
260 | /** UITask extension used as update task for the details-element type 'Display'. */
|
---|
261 | class UIDetailsUpdateTaskDisplay : public UIDetailsUpdateTask
|
---|
262 | {
|
---|
263 | Q_OBJECT;
|
---|
264 |
|
---|
265 | public:
|
---|
266 |
|
---|
267 | /** Constructs update task passing @a comMachine to the base-class. */
|
---|
268 | UIDetailsUpdateTaskDisplay(const CMachine &comMachine, UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay fOptions)
|
---|
269 | : UIDetailsUpdateTask(comMachine), m_fOptions(fOptions) {}
|
---|
270 |
|
---|
271 | private:
|
---|
272 |
|
---|
273 | /** Contains update task body. */
|
---|
274 | void run();
|
---|
275 |
|
---|
276 | /** Holds the options. */
|
---|
277 | UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay m_fOptions;
|
---|
278 | };
|
---|
279 |
|
---|
280 | /** UIDetailsElementInterface extension for the details-element type 'Display'. */
|
---|
281 | class UIDetailsElementDisplay : public UIDetailsElementInterface
|
---|
282 | {
|
---|
283 | Q_OBJECT;
|
---|
284 |
|
---|
285 | public:
|
---|
286 |
|
---|
287 | /** Constructs details-element object for passed @a pParent set.
|
---|
288 | * @param fOpened brings whether the details-element should be visually opened. */
|
---|
289 | UIDetailsElementDisplay(UIDetailsSet *pParent, bool fOpened)
|
---|
290 | : UIDetailsElementInterface(pParent, DetailsElementType_Display, fOpened) {}
|
---|
291 |
|
---|
292 | private:
|
---|
293 |
|
---|
294 | /** Creates update task for this element. */
|
---|
295 | virtual UITask *createUpdateTask() RT_OVERRIDE;
|
---|
296 | };
|
---|
297 |
|
---|
298 |
|
---|
299 | /** UITask extension used as update task for the details-element type 'Storage'. */
|
---|
300 | class UIDetailsUpdateTaskStorage : public UIDetailsUpdateTask
|
---|
301 | {
|
---|
302 | Q_OBJECT;
|
---|
303 |
|
---|
304 | public:
|
---|
305 |
|
---|
306 | /** Constructs update task passing @a comMachine to the base-class. */
|
---|
307 | UIDetailsUpdateTaskStorage(const CMachine &comMachine, UIExtraDataMetaDefs::DetailsElementOptionTypeStorage fOptions)
|
---|
308 | : UIDetailsUpdateTask(comMachine), m_fOptions(fOptions) {}
|
---|
309 |
|
---|
310 | private:
|
---|
311 |
|
---|
312 | /** Contains update task body. */
|
---|
313 | void run();
|
---|
314 |
|
---|
315 | /** Holds the options. */
|
---|
316 | UIExtraDataMetaDefs::DetailsElementOptionTypeStorage m_fOptions;
|
---|
317 | };
|
---|
318 |
|
---|
319 | /** UIDetailsElementInterface extension for the details-element type 'Storage'. */
|
---|
320 | class UIDetailsElementStorage : public UIDetailsElementInterface
|
---|
321 | {
|
---|
322 | Q_OBJECT;
|
---|
323 |
|
---|
324 | public:
|
---|
325 |
|
---|
326 | /** Constructs details-element object for passed @a pParent set.
|
---|
327 | * @param fOpened brings whether the details-element should be visually opened. */
|
---|
328 | UIDetailsElementStorage(UIDetailsSet *pParent, bool fOpened)
|
---|
329 | : UIDetailsElementInterface(pParent, DetailsElementType_Storage, fOpened) {}
|
---|
330 |
|
---|
331 | private:
|
---|
332 |
|
---|
333 | /** Creates update task for this element. */
|
---|
334 | virtual UITask *createUpdateTask() RT_OVERRIDE;
|
---|
335 | };
|
---|
336 |
|
---|
337 |
|
---|
338 | /** UITask extension used as update task for the details-element type 'Audio'. */
|
---|
339 | class UIDetailsUpdateTaskAudio : public UIDetailsUpdateTask
|
---|
340 | {
|
---|
341 | Q_OBJECT;
|
---|
342 |
|
---|
343 | public:
|
---|
344 |
|
---|
345 | /** Constructs update task passing @a comMachine to the base-class. */
|
---|
346 | UIDetailsUpdateTaskAudio(const CMachine &comMachine, UIExtraDataMetaDefs::DetailsElementOptionTypeAudio fOptions)
|
---|
347 | : UIDetailsUpdateTask(comMachine), m_fOptions(fOptions) {}
|
---|
348 |
|
---|
349 | private:
|
---|
350 |
|
---|
351 | /** Contains update task body. */
|
---|
352 | void run();
|
---|
353 |
|
---|
354 | /** Holds the options. */
|
---|
355 | UIExtraDataMetaDefs::DetailsElementOptionTypeAudio m_fOptions;
|
---|
356 | };
|
---|
357 |
|
---|
358 | /** UIDetailsElementInterface extension for the details-element type 'Audio'. */
|
---|
359 | class UIDetailsElementAudio : public UIDetailsElementInterface
|
---|
360 | {
|
---|
361 | Q_OBJECT;
|
---|
362 |
|
---|
363 | public:
|
---|
364 |
|
---|
365 | /** Constructs details-element object for passed @a pParent set.
|
---|
366 | * @param fOpened brings whether the details-element should be visually opened. */
|
---|
367 | UIDetailsElementAudio(UIDetailsSet *pParent, bool fOpened)
|
---|
368 | : UIDetailsElementInterface(pParent, DetailsElementType_Audio, fOpened) {}
|
---|
369 |
|
---|
370 | private:
|
---|
371 |
|
---|
372 | /** Creates update task for this element. */
|
---|
373 | virtual UITask *createUpdateTask() RT_OVERRIDE;
|
---|
374 | };
|
---|
375 |
|
---|
376 |
|
---|
377 | /** UITask extension used as update task for the details-element type 'Network'. */
|
---|
378 | class UIDetailsUpdateTaskNetwork : public UIDetailsUpdateTask
|
---|
379 | {
|
---|
380 | Q_OBJECT;
|
---|
381 |
|
---|
382 | public:
|
---|
383 |
|
---|
384 | /** Constructs update task passing @a comMachine to the base-class. */
|
---|
385 | UIDetailsUpdateTaskNetwork(const CMachine &comMachine, UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork fOptions)
|
---|
386 | : UIDetailsUpdateTask(comMachine), m_fOptions(fOptions) {}
|
---|
387 |
|
---|
388 | private:
|
---|
389 |
|
---|
390 | /** Contains update task body. */
|
---|
391 | void run();
|
---|
392 |
|
---|
393 | /** Holds the options. */
|
---|
394 | UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork m_fOptions;
|
---|
395 | };
|
---|
396 |
|
---|
397 | /** UIDetailsElementInterface extension for the details-element type 'Network'. */
|
---|
398 | class UIDetailsElementNetwork : public UIDetailsElementInterface
|
---|
399 | {
|
---|
400 | Q_OBJECT;
|
---|
401 |
|
---|
402 | public:
|
---|
403 |
|
---|
404 | /** Constructs details-element object for passed @a pParent set.
|
---|
405 | * @param fOpened brings whether the details-element should be visually opened. */
|
---|
406 | UIDetailsElementNetwork(UIDetailsSet *pParent, bool fOpened)
|
---|
407 | : UIDetailsElementInterface(pParent, DetailsElementType_Network, fOpened) {}
|
---|
408 |
|
---|
409 | private:
|
---|
410 |
|
---|
411 | /** Creates update task for this element. */
|
---|
412 | virtual UITask *createUpdateTask() RT_OVERRIDE;
|
---|
413 | };
|
---|
414 |
|
---|
415 |
|
---|
416 | /** UITask extension used as update task for the details-element type 'Serial'. */
|
---|
417 | class UIDetailsUpdateTaskSerial : public UIDetailsUpdateTask
|
---|
418 | {
|
---|
419 | Q_OBJECT;
|
---|
420 |
|
---|
421 | public:
|
---|
422 |
|
---|
423 | /** Constructs update task passing @a comMachine to the base-class. */
|
---|
424 | UIDetailsUpdateTaskSerial(const CMachine &comMachine, UIExtraDataMetaDefs::DetailsElementOptionTypeSerial fOptions)
|
---|
425 | : UIDetailsUpdateTask(comMachine), m_fOptions(fOptions) {}
|
---|
426 |
|
---|
427 | private:
|
---|
428 |
|
---|
429 | /** Contains update task body. */
|
---|
430 | void run();
|
---|
431 |
|
---|
432 | /** Holds the options. */
|
---|
433 | UIExtraDataMetaDefs::DetailsElementOptionTypeSerial m_fOptions;
|
---|
434 | };
|
---|
435 |
|
---|
436 | /** UIDetailsElementInterface extension for the details-element type 'Serial'. */
|
---|
437 | class UIDetailsElementSerial : public UIDetailsElementInterface
|
---|
438 | {
|
---|
439 | Q_OBJECT;
|
---|
440 |
|
---|
441 | public:
|
---|
442 |
|
---|
443 | /** Constructs details-element object for passed @a pParent set.
|
---|
444 | * @param fOpened brings whether the details-element should be visually opened. */
|
---|
445 | UIDetailsElementSerial(UIDetailsSet *pParent, bool fOpened)
|
---|
446 | : UIDetailsElementInterface(pParent, DetailsElementType_Serial, fOpened) {}
|
---|
447 |
|
---|
448 | private:
|
---|
449 |
|
---|
450 | /** Creates update task for this element. */
|
---|
451 | virtual UITask *createUpdateTask() RT_OVERRIDE;
|
---|
452 | };
|
---|
453 |
|
---|
454 |
|
---|
455 | /** UITask extension used as update task for the details-element type 'USB'. */
|
---|
456 | class UIDetailsUpdateTaskUSB : public UIDetailsUpdateTask
|
---|
457 | {
|
---|
458 | Q_OBJECT;
|
---|
459 |
|
---|
460 | public:
|
---|
461 |
|
---|
462 | /** Constructs update task passing @a comMachine to the base-class. */
|
---|
463 | UIDetailsUpdateTaskUSB(const CMachine &comMachine, UIExtraDataMetaDefs::DetailsElementOptionTypeUsb fOptions)
|
---|
464 | : UIDetailsUpdateTask(comMachine), m_fOptions(fOptions) {}
|
---|
465 |
|
---|
466 | private:
|
---|
467 |
|
---|
468 | /** Contains update task body. */
|
---|
469 | void run();
|
---|
470 |
|
---|
471 | /** Holds the options. */
|
---|
472 | UIExtraDataMetaDefs::DetailsElementOptionTypeUsb m_fOptions;
|
---|
473 | };
|
---|
474 |
|
---|
475 | /** UIDetailsElementInterface extension for the details-element type 'USB'. */
|
---|
476 | class UIDetailsElementUSB : public UIDetailsElementInterface
|
---|
477 | {
|
---|
478 | Q_OBJECT;
|
---|
479 |
|
---|
480 | public:
|
---|
481 |
|
---|
482 | /** Constructs details-element object for passed @a pParent set.
|
---|
483 | * @param fOpened brings whether the details-element should be visually opened. */
|
---|
484 | UIDetailsElementUSB(UIDetailsSet *pParent, bool fOpened)
|
---|
485 | : UIDetailsElementInterface(pParent, DetailsElementType_USB, fOpened) {}
|
---|
486 |
|
---|
487 | private:
|
---|
488 |
|
---|
489 | /** Creates update task for this element. */
|
---|
490 | virtual UITask *createUpdateTask() RT_OVERRIDE;
|
---|
491 | };
|
---|
492 |
|
---|
493 |
|
---|
494 | /** UITask extension used as update task for the details-element type 'SF'. */
|
---|
495 | class UIDetailsUpdateTaskSF : public UIDetailsUpdateTask
|
---|
496 | {
|
---|
497 | Q_OBJECT;
|
---|
498 |
|
---|
499 | public:
|
---|
500 |
|
---|
501 | /** Constructs update task passing @a comMachine to the base-class. */
|
---|
502 | UIDetailsUpdateTaskSF(const CMachine &comMachine, UIExtraDataMetaDefs::DetailsElementOptionTypeSharedFolders fOptions)
|
---|
503 | : UIDetailsUpdateTask(comMachine), m_fOptions(fOptions) {}
|
---|
504 |
|
---|
505 | private:
|
---|
506 |
|
---|
507 | /** Contains update task body. */
|
---|
508 | void run();
|
---|
509 |
|
---|
510 | /** Holds the options. */
|
---|
511 | UIExtraDataMetaDefs::DetailsElementOptionTypeSharedFolders m_fOptions;
|
---|
512 | };
|
---|
513 |
|
---|
514 | /** UIDetailsElementInterface extension for the details-element type 'SF'. */
|
---|
515 | class UIDetailsElementSF : public UIDetailsElementInterface
|
---|
516 | {
|
---|
517 | Q_OBJECT;
|
---|
518 |
|
---|
519 | public:
|
---|
520 |
|
---|
521 | /** Constructs details-element object for passed @a pParent set.
|
---|
522 | * @param fOpened brings whether the details-element should be visually opened. */
|
---|
523 | UIDetailsElementSF(UIDetailsSet *pParent, bool fOpened)
|
---|
524 | : UIDetailsElementInterface(pParent, DetailsElementType_SF, fOpened) {}
|
---|
525 |
|
---|
526 | private:
|
---|
527 |
|
---|
528 | /** Creates update task for this element. */
|
---|
529 | virtual UITask *createUpdateTask() RT_OVERRIDE;
|
---|
530 | };
|
---|
531 |
|
---|
532 |
|
---|
533 | /** UITask extension used as update task for the details-element type 'UI'. */
|
---|
534 | class UIDetailsUpdateTaskUI : public UIDetailsUpdateTask
|
---|
535 | {
|
---|
536 | Q_OBJECT;
|
---|
537 |
|
---|
538 | public:
|
---|
539 |
|
---|
540 | /** Constructs update task passing @a comMachine to the base-class. */
|
---|
541 | UIDetailsUpdateTaskUI(const CMachine &comMachine, UIExtraDataMetaDefs::DetailsElementOptionTypeUserInterface fOptions)
|
---|
542 | : UIDetailsUpdateTask(comMachine), m_fOptions(fOptions) {}
|
---|
543 |
|
---|
544 | private:
|
---|
545 |
|
---|
546 | /** Contains update task body. */
|
---|
547 | void run();
|
---|
548 |
|
---|
549 | /** Holds the options. */
|
---|
550 | UIExtraDataMetaDefs::DetailsElementOptionTypeUserInterface m_fOptions;
|
---|
551 | };
|
---|
552 |
|
---|
553 | /** UIDetailsElementInterface extension for the details-element type 'UI'. */
|
---|
554 | class UIDetailsElementUI : public UIDetailsElementInterface
|
---|
555 | {
|
---|
556 | Q_OBJECT;
|
---|
557 |
|
---|
558 | public:
|
---|
559 |
|
---|
560 | /** Constructs details-element object for passed @a pParent set.
|
---|
561 | * @param fOpened brings whether the details-element should be visually opened. */
|
---|
562 | UIDetailsElementUI(UIDetailsSet *pParent, bool fOpened)
|
---|
563 | : UIDetailsElementInterface(pParent, DetailsElementType_UI, fOpened) {}
|
---|
564 |
|
---|
565 | private:
|
---|
566 |
|
---|
567 | /** Creates update task for this element. */
|
---|
568 | virtual UITask *createUpdateTask() RT_OVERRIDE;
|
---|
569 | };
|
---|
570 |
|
---|
571 |
|
---|
572 | /** UITask extension used as update task for the details-element type 'Description'. */
|
---|
573 | class UIDetailsUpdateTaskDescription : public UIDetailsUpdateTask
|
---|
574 | {
|
---|
575 | Q_OBJECT;
|
---|
576 |
|
---|
577 | public:
|
---|
578 |
|
---|
579 | /** Constructs update task passing @a comMachine to the base-class. */
|
---|
580 | UIDetailsUpdateTaskDescription(const CMachine &comMachine, UIExtraDataMetaDefs::DetailsElementOptionTypeDescription fOptions)
|
---|
581 | : UIDetailsUpdateTask(comMachine), m_fOptions(fOptions) {}
|
---|
582 |
|
---|
583 | private:
|
---|
584 |
|
---|
585 | /** Contains update task body. */
|
---|
586 | void run();
|
---|
587 |
|
---|
588 | /** Holds the options. */
|
---|
589 | UIExtraDataMetaDefs::DetailsElementOptionTypeDescription m_fOptions;
|
---|
590 | };
|
---|
591 |
|
---|
592 | /** UIDetailsElementInterface extension for the details-element type 'Description'. */
|
---|
593 | class UIDetailsElementDescription : public UIDetailsElementInterface
|
---|
594 | {
|
---|
595 | Q_OBJECT;
|
---|
596 |
|
---|
597 | public:
|
---|
598 |
|
---|
599 | /** Constructs details-element object for passed @a pParent set.
|
---|
600 | * @param fOpened brings whether the details-element should be visually opened. */
|
---|
601 | UIDetailsElementDescription(UIDetailsSet *pParent, bool fOpened)
|
---|
602 | : UIDetailsElementInterface(pParent, DetailsElementType_Description, fOpened) {}
|
---|
603 |
|
---|
604 | private:
|
---|
605 |
|
---|
606 | /** Creates update task for this element. */
|
---|
607 | virtual UITask *createUpdateTask() RT_OVERRIDE;
|
---|
608 | };
|
---|
609 |
|
---|
610 | #endif /* !FEQT_INCLUDED_SRC_manager_details_UIDetailsElements_h */
|
---|
611 |
|
---|