1 | /* $Id: UIProgressTaskReadCloudMachineList.h 86795 2020-11-03 12:29:09Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIProgressTaskReadCloudMachineList class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2020 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef FEQT_INCLUDED_SRC_manager_UIProgressTaskReadCloudMachineList_h
|
---|
19 | #define FEQT_INCLUDED_SRC_manager_UIProgressTaskReadCloudMachineList_h
|
---|
20 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
21 | # pragma once
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | /* GUI includes: */
|
---|
25 | #include "UICloudEntityKey.h"
|
---|
26 | #include "UIProgressTask.h"
|
---|
27 |
|
---|
28 | /* COM includes: */
|
---|
29 | #include "COMEnums.h"
|
---|
30 | #include "CCloudClient.h"
|
---|
31 | #include "CCloudMachine.h"
|
---|
32 |
|
---|
33 | /** UIProgressTask extension performing read cloud machine list task. */
|
---|
34 | class UIProgressTaskReadCloudMachineList : public UIProgressTask
|
---|
35 | {
|
---|
36 | Q_OBJECT;
|
---|
37 |
|
---|
38 | public:
|
---|
39 |
|
---|
40 | /** Constructs read cloud machine list task passing @a pParent to the base-class.
|
---|
41 | * @param guiCloudProfileKey Brings cloud profile description key.
|
---|
42 | * @param fWithRefresh Brings whether cloud machine should be refreshed as well. */
|
---|
43 | UIProgressTaskReadCloudMachineList(QObject *pParent, const UICloudEntityKey &guiCloudProfileKey, bool fWithRefresh);
|
---|
44 |
|
---|
45 | /** Returns cloud profile description key. */
|
---|
46 | UICloudEntityKey cloudProfileKey() const;
|
---|
47 |
|
---|
48 | /** Returns resulting cloud machine-wrapper vector. */
|
---|
49 | QVector<CCloudMachine> machines() const;
|
---|
50 |
|
---|
51 | protected:
|
---|
52 |
|
---|
53 | /** Creates and returns started progress-wrapper required to init UIProgressObject. */
|
---|
54 | virtual CProgress createProgress() /* override */;
|
---|
55 | /** Handles finished @a comProgress wrapper. */
|
---|
56 | virtual void handleProgressFinished(CProgress &comProgress) /* override */;
|
---|
57 |
|
---|
58 | private:
|
---|
59 |
|
---|
60 | /** Holds the cloud profile description key. */
|
---|
61 | UICloudEntityKey m_guiCloudProfileKey;
|
---|
62 | /** Holds whether cloud machine should be refreshed as well. */
|
---|
63 | bool m_fWithRefresh;
|
---|
64 |
|
---|
65 | /** Holds the cloud client-wrapper. */
|
---|
66 | CCloudClient m_comCloudClient;
|
---|
67 | /** Holds the resulting cloud machine-wrapper vector. */
|
---|
68 | QVector<CCloudMachine> m_machines;
|
---|
69 | };
|
---|
70 |
|
---|
71 | #endif /* !FEQT_INCLUDED_SRC_manager_UIProgressTaskReadCloudMachineList_h */
|
---|