blob: 6ea8aa294859f2795fa9e618fffc018e2b25a64a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
/* $Id$ */
/** @file
* VBox Qt GUI - UIGuestProcessControlDialog class declaration.
*/
/*
* Copyright (C) 2010-2022 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef FEQT_INCLUDED_SRC_guestctrl_UIGuestProcessControlDialog_h
#define FEQT_INCLUDED_SRC_guestctrl_UIGuestProcessControlDialog_h
#ifndef RT_WITHOUT_PRAGMA_ONCE
# pragma once
#endif
/* Qt includes: */
#include <QString>
/* GUI includes: */
#include "QIManagerDialog.h"
#include "QIWithRetranslateUI.h"
/* COM includes: */
#include "COMEnums.h"
#include "CGuest.h"
/* Forward declarations: */
class UIActionPool;
class UIGuestProcessControlDialog;
class CGuest;
/** QIManagerDialogFactory extension used as a factory for the Guest Control dialog. */
class UIGuestProcessControlDialogFactory : public QIManagerDialogFactory
{
public:
UIGuestProcessControlDialogFactory(UIActionPool *pActionPool = 0, const CGuest &comGuest = CGuest(), const QString &strMachineName = QString());
protected:
/** Creates derived @a pDialog instance.
* @param pCenterWidget Passes the widget to center wrt. pCenterWidget. */
virtual void create(QIManagerDialog *&pDialog, QWidget *pCenterWidget) RT_OVERRIDE;
UIActionPool *m_pActionPool;
CGuest m_comGuest;
QString m_strMachineName;
};
/** QIManagerDialog extension providing GUI with the dialog displaying guest control releated logs. */
class UIGuestProcessControlDialog : public QIWithRetranslateUI<QIManagerDialog>
{
Q_OBJECT;
public:
/** Constructs Guest Control dialog.
* @param pCenterWidget Passes the widget reference to center according to.
* @param pActionPool Passes the action-pool reference.
* @param comGuest Passes the com-guest reference. */
UIGuestProcessControlDialog(QWidget *pCenterWidget, UIActionPool *pActionPool, const CGuest &comGuest, const QString &strMachineName = QString());
protected:
/** @name Event-handling stuff.
* @{ */
/** Handles translation event. */
virtual void retranslateUi() RT_OVERRIDE;
/** @} */
/** @name Prepare/cleanup cascade.
* @{ */
/** Configures all. */
virtual void configure() RT_OVERRIDE;
/** Configures central-widget. */
virtual void configureCentralWidget() RT_OVERRIDE;
/** Perform final preparations. */
virtual void finalize() RT_OVERRIDE;
/** Loads dialog setting from extradata. */
virtual void loadSettings() RT_OVERRIDE;
/** Saves dialog setting into extradata. */
virtual void saveSettings() RT_OVERRIDE;
/** @} */
/** @name Functions related to geometry restoration.
* @{ */
/** Returns whether the window should be maximized when geometry being restored. */
virtual bool shouldBeMaximized() const RT_OVERRIDE;
/** @} */
private slots:
void sltSetCloseButtonShortCut(QKeySequence shortcut);
private:
UIActionPool *m_pActionPool;
CGuest m_comGuest;
QString m_strMachineName;
};
#endif /* !FEQT_INCLUDED_SRC_guestctrl_UIGuestProcessControlDialog_h */
|