VirtualBox

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

Last change on this file since 72360 was 72360, checked in by vboxsync, 7 years ago

FE/Qt: bugref:9049: Small cleanup for UIStarter: Renaming sltShowUI => sltStartUI.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/* $Id: UIStarter.h 72360 2018-05-28 16:34:15Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIStarter class declaration.
4 */
5
6/*
7 * Copyright (C) 2018 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 ___UIStarter_h___
19#define ___UIStarter_h___
20
21/* Qt includes: */
22#include <QObject>
23
24/** QObject subclass allowing to control GUI part
25 * of VirtualBox application in sync/async modes. */
26class UIStarter : public QObject
27{
28 Q_OBJECT;
29
30 /** Constructs UI starter. */
31 UIStarter();
32 /** Destructs UI starter. */
33 virtual ~UIStarter() /* override */;
34
35 /** Prepares everything. */
36 void prepare();
37 /** Cleanups everything. */
38 void cleanup();
39
40public:
41
42 /** Returns the singleton UI starter instance. */
43 static UIStarter *instance() { return s_pInstance; }
44
45 /** Create the singleton UI starter instance. */
46 static void create();
47 /** Create the singleton UI starter instance. */
48 static void destroy();
49
50 /** Init VBoxGlobal connections. */
51 void init();
52 /** Deinit VBoxGlobal connections. */
53 void deinit();
54
55private slots:
56
57 /** Starts corresponding part of the UI. */
58 void sltStartUI();
59 /** Restarts corresponding part of the UI. */
60 void sltRestartUI();
61 /** Destroys corresponding part of the UI. */
62 void sltDestroyUI();
63
64 /** Opens URLs in Selector UI. */
65 void sltOpenURLs();
66
67 /** Handles commit data request. */
68 void sltHandleCommitDataRequest();
69
70private:
71
72 /** Holds the singleton UI starter instance. */
73 static UIStarter *s_pInstance;
74};
75
76/** Singleton UI starter 'official' name. */
77#define gStarter UIStarter::instance()
78
79#endif /* !___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