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