VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/globals/UIStarter.h@ 88740

Last change on this file since 88740 was 88740, checked in by vboxsync, 4 years ago

FE/Qt: bugref:8161: Rework commit data request handling; GUI should NOT initiate state saving itself, VBoxSVC can do it itself; Moreover, if not VBoxSVC, VBoxHeadless would be forced to do it in separate/headless cases.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1/* $Id: UIStarter.h 88740 2021-04-27 16:52:17Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIStarter class declaration.
4 */
5
6/*
7 * Copyright (C) 2018-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_globals_UIStarter_h
19#define FEQT_INCLUDED_SRC_globals_UIStarter_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* Qt includes: */
25#include <QObject>
26
27/** QObject subclass allowing to control GUI part
28 * of VirtualBox application in sync/async modes. */
29class UIStarter : public QObject
30{
31 Q_OBJECT;
32
33 /** Constructs UI starter. */
34 UIStarter();
35 /** Destructs UI starter. */
36 virtual ~UIStarter() /* override */;
37
38public:
39
40 /** Returns the singleton UI starter instance. */
41 static UIStarter *instance() { return s_pInstance; }
42
43 /** Create the singleton UI starter instance. */
44 static void create();
45 /** Create the singleton UI starter instance. */
46 static void destroy();
47
48 /** Init UICommon connections. */
49 void init();
50 /** Deinit UICommon connections. */
51 void deinit();
52
53private slots:
54
55 /** Starts corresponding part of the UI. */
56 void sltStartUI();
57 /** Restarts corresponding part of the UI. */
58 void sltRestartUI();
59 /** Closes corresponding part of the UI. */
60 void sltCloseUI();
61
62private:
63
64 /** Holds the singleton UI starter instance. */
65 static UIStarter *s_pInstance;
66};
67
68/** Singleton UI starter 'official' name. */
69#define gStarter UIStarter::instance()
70
71#endif /* !FEQT_INCLUDED_SRC_globals_UIStarter_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette