VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationProgressTask.h

Last change on this file was 103982, checked in by vboxsync, 2 months ago

FE/Qt: bugref:10624. Replacing override and final keywords with RT_OVERRIDE and RT_FINAL defines.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1/* $Id: UINotificationProgressTask.h 103982 2024-03-21 11:43:53Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UINotificationProgressTask class declaration.
4 */
5
6/*
7 * Copyright (C) 2021-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_notificationcenter_UINotificationProgressTask_h
29#define FEQT_INCLUDED_SRC_notificationcenter_UINotificationProgressTask_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* GUI includes: */
35#include "UIProgressTask.h"
36
37/* Forward declarations: */
38class UINotificationProgress;
39
40/** UIProgressTask extension for notification-center needs executed the silent way.
41 * That means no modal messages will arise, you'll be able to retreive error information via API
42 * provided. createProgress() and handleProgressFinished() being reloaded to handle everythig
43 * silently, you just need to implement UINotificationProgress::createProgress() instead. */
44class SHARED_LIBRARY_STUFF UINotificationProgressTask : public UIProgressTask
45{
46 Q_OBJECT;
47
48public:
49
50 /** Creates notification progress task passing @a pParent to the base-class.
51 * @param pParent Brings the notification progress this task belongs to. */
52 UINotificationProgressTask(UINotificationProgress *pParent);
53
54 /** Returns error message. */
55 QString errorMessage() const;
56
57protected:
58
59 /** Creates and returns started progress-wrapper required to init UIProgressObject.
60 * @note You don't need to reload it, it uses pParent's createProgress()
61 * which should be reloaded in your pParent sub-class. */
62 virtual CProgress createProgress() RT_OVERRIDE RT_FINAL;
63 /** Handles finished @a comProgress wrapper.
64 * @note You don't need to reload it. */
65 virtual void handleProgressFinished(CProgress &comProgress) RT_OVERRIDE RT_FINAL;
66
67private:
68
69 /** Holds the notification progress this task belongs to. */
70 UINotificationProgress *m_pParent;
71
72 /** Holds the error message. */
73 QString m_strErrorMessage;
74};
75
76#endif /* !FEQT_INCLUDED_SRC_notificationcenter_UINotificationProgressTask_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use