VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlWidget.h@ 102493

Last change on this file since 102493 was 98875, checked in by vboxsync, 19 months ago

FE/Qt: bugref:10322: Cleanup for UIGuestProcessControlDialog related to UIMachine global pointer.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1/* $Id: UIGuestProcessControlWidget.h 98875 2023-03-08 09:40:48Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIGuestProcessControlWidget class declaration.
4 */
5
6/*
7 * Copyright (C) 2016-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_UIGuestProcessControlWidget_h
29#define FEQT_INCLUDED_SRC_guestctrl_UIGuestProcessControlWidget_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QWidget>
36
37/* COM includes: */
38#include "COMEnums.h"
39#include "CGuest.h"
40#include "CEventListener.h"
41
42/* GUI includes: */
43#include "QIWithRetranslateUI.h"
44#include "QIManagerDialog.h"
45#include "UIMainEventListener.h"
46
47/* Forward declarations: */
48class QVBoxLayout;
49class QIToolBar;
50class UIGuestControlTreeWidget;
51
52/** QWidget extension
53 * providing GUI with guest session information and control tab in session-information window. */
54class UIGuestProcessControlWidget : public QIWithRetranslateUI<QWidget>
55{
56 Q_OBJECT;
57
58public:
59
60 UIGuestProcessControlWidget(EmbedTo enmEmbedding, const CGuest &comGuest, QWidget *pParent,
61 QString strMachineName = QString(), bool fShowToolbar = false);
62 ~UIGuestProcessControlWidget();
63 /** When true we delete the corresponding tree item as soon as the guest session/process is unregistered. */
64 static const bool s_fDeleteAfterUnregister;
65
66protected:
67
68 void retranslateUi();
69
70private slots:
71
72 void sltGuestSessionsUpdated();
73 void sltGuestSessionRegistered(CGuestSession guestSession);
74 void sltGuestSessionUnregistered(CGuestSession guestSession);
75 void sltTreeItemUpdated();
76 void sltCloseSessionOrProcess();
77 void sltShowProperties();
78 void sltCleanupListener();
79
80private:
81
82 void prepareObjects();
83 void prepareConnections();
84 void prepareToolBar();
85 void prepareListener();
86 void initGuestSessionTree();
87 void updateTreeWidget();
88 void addGuestSession(CGuestSession guestSession);
89
90 CGuest m_comGuest;
91 QVBoxLayout *m_pMainLayout;
92 UIGuestControlTreeWidget *m_pTreeWidget;
93 const EmbedTo m_enmEmbedding;
94 QIToolBar *m_pToolBar;
95
96 /** Holds the Qt event listener instance. */
97 ComObjPtr<UIMainEventListenerImpl> m_pQtListener;
98
99 /** Holds the COM event listener instance. */
100 CEventListener m_comEventListener;
101 const bool m_fShowToolbar;
102 QString m_strMachineName;
103};
104
105#endif /* !FEQT_INCLUDED_SRC_guestctrl_UIGuestProcessControlWidget_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