1 | /* $Id: UIGuestProcessControlDialog.h 103803 2024-03-12 11:15:18Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIGuestProcessControlDialog class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010-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_guestctrl_UIGuestProcessControlDialog_h
|
---|
29 | #define FEQT_INCLUDED_SRC_guestctrl_UIGuestProcessControlDialog_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* Qt includes: */
|
---|
35 | #include <QString>
|
---|
36 |
|
---|
37 | /* GUI includes: */
|
---|
38 | #include "QIManagerDialog.h"
|
---|
39 | #include "QIWithRetranslateUI.h"
|
---|
40 |
|
---|
41 | /* COM includes: */
|
---|
42 | #include "CGuest.h"
|
---|
43 |
|
---|
44 | /** QIManagerDialogFactory extension used as a factory for the Guest Control dialog. */
|
---|
45 | class UIGuestProcessControlDialogFactory : public QIManagerDialogFactory
|
---|
46 | {
|
---|
47 | public:
|
---|
48 |
|
---|
49 | /** Constructs dialog factory. */
|
---|
50 | UIGuestProcessControlDialogFactory();
|
---|
51 |
|
---|
52 | protected:
|
---|
53 |
|
---|
54 | /** Creates derived @a pDialog instance.
|
---|
55 | * @param pCenterWidget Passes the widget to center wrt. pCenterWidget. */
|
---|
56 | virtual void create(QIManagerDialog *&pDialog, QWidget *pCenterWidget) RT_OVERRIDE;
|
---|
57 | };
|
---|
58 |
|
---|
59 | /** QIManagerDialog extension providing GUI with the dialog displaying guest control releated logs. */
|
---|
60 | class UIGuestProcessControlDialog : public QIWithRetranslateUI<QIManagerDialog>
|
---|
61 | {
|
---|
62 | Q_OBJECT;
|
---|
63 |
|
---|
64 | public:
|
---|
65 |
|
---|
66 | /** Constructs Guest Control dialog. */
|
---|
67 | UIGuestProcessControlDialog(QWidget *pCenterWidget);
|
---|
68 |
|
---|
69 | protected:
|
---|
70 |
|
---|
71 | /** @name Event-handling stuff.
|
---|
72 | * @{ */
|
---|
73 | /** Handles translation event. */
|
---|
74 | virtual void retranslateUi() RT_OVERRIDE;
|
---|
75 | /** @} */
|
---|
76 |
|
---|
77 | /** @name Prepare/cleanup cascade.
|
---|
78 | * @{ */
|
---|
79 | /** Configures all. */
|
---|
80 | virtual void configure() RT_OVERRIDE;
|
---|
81 | /** Configures central-widget. */
|
---|
82 | virtual void configureCentralWidget() RT_OVERRIDE;
|
---|
83 | /** Perform final preparations. */
|
---|
84 | virtual void finalize() RT_OVERRIDE;
|
---|
85 | /** Loads dialog setting from extradata. */
|
---|
86 | virtual void loadSettings() RT_OVERRIDE;
|
---|
87 |
|
---|
88 | /** Saves dialog setting into extradata. */
|
---|
89 | virtual void saveSettings() RT_OVERRIDE;
|
---|
90 | /** @} */
|
---|
91 |
|
---|
92 | /** @name Functions related to geometry restoration.
|
---|
93 | * @{ */
|
---|
94 | /** Returns whether the window should be maximized when geometry being restored. */
|
---|
95 | virtual bool shouldBeMaximized() const RT_OVERRIDE;
|
---|
96 | /** @} */
|
---|
97 |
|
---|
98 | private slots:
|
---|
99 |
|
---|
100 | void sltSetCloseButtonShortCut(QKeySequence shortcut);
|
---|
101 |
|
---|
102 | private:
|
---|
103 |
|
---|
104 | CGuest m_comGuest;
|
---|
105 | QString m_strMachineName;
|
---|
106 | };
|
---|
107 |
|
---|
108 | #endif /* !FEQT_INCLUDED_SRC_guestctrl_UIGuestProcessControlDialog_h */
|
---|