VirtualBox

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

Last change on this file was 104297, checked in by vboxsync, 2 months ago

FE/Qt. bugref:10622. Using new UITranslationEventListener in the guest control related GUI classes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
RevLine 
[71025]1/* $Id: UIGuestProcessControlWidget.h 104297 2024-04-11 13:20:43Z vboxsync $ */
2/** @file
[75057]3 * VBox Qt GUI - UIGuestProcessControlWidget class declaration.
[71025]4 */
5
6/*
[98103]7 * Copyright (C) 2016-2023 Oracle and/or its affiliates.
[71025]8 *
[96407]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
[71025]26 */
27
[76581]28#ifndef FEQT_INCLUDED_SRC_guestctrl_UIGuestProcessControlWidget_h
29#define FEQT_INCLUDED_SRC_guestctrl_UIGuestProcessControlWidget_h
[76532]30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
[71025]33
34/* Qt includes: */
35#include <QWidget>
36
37/* COM includes: */
[71037]38#include "CGuest.h"
39#include "CEventListener.h"
[71025]40
[71037]41/* GUI includes: */
[75087]42#include "QIManagerDialog.h"
[71037]43#include "UIMainEventListener.h"
44
[71025]45/* Forward declarations: */
46class QVBoxLayout;
[98875]47class QIToolBar;
[71049]48class UIGuestControlTreeWidget;
[71025]49
50/** QWidget extension
51 * providing GUI with guest session information and control tab in session-information window. */
[104297]52class UIGuestProcessControlWidget : public QWidget
[71025]53{
54 Q_OBJECT;
55
56public:
57
[77647]58 UIGuestProcessControlWidget(EmbedTo enmEmbedding, const CGuest &comGuest, QWidget *pParent,
59 QString strMachineName = QString(), bool fShowToolbar = false);
[88741]60 ~UIGuestProcessControlWidget();
[77647]61 /** When true we delete the corresponding tree item as soon as the guest session/process is unregistered. */
[98875]62 static const bool s_fDeleteAfterUnregister;
[71025]63
64private slots:
65
[104297]66 void sltRetranslateUI();
[71025]67 void sltGuestSessionsUpdated();
[71037]68 void sltGuestSessionRegistered(CGuestSession guestSession);
69 void sltGuestSessionUnregistered(CGuestSession guestSession);
[71049]70 void sltTreeItemUpdated();
71 void sltCloseSessionOrProcess();
[77647]72 void sltShowProperties();
[88874]73 void sltCleanupListener();
[71049]74
[71025]75private:
76
77 void prepareObjects();
78 void prepareConnections();
[75220]79 void prepareToolBar();
[71037]80 void prepareListener();
[71059]81 void initGuestSessionTree();
[71025]82 void updateTreeWidget();
[71059]83 void addGuestSession(CGuestSession guestSession);
84
[71049]85 CGuest m_comGuest;
86 QVBoxLayout *m_pMainLayout;
87 UIGuestControlTreeWidget *m_pTreeWidget;
[75087]88 const EmbedTo m_enmEmbedding;
[86233]89 QIToolBar *m_pToolBar;
[71037]90
[71038]91 /** Holds the Qt event listener instance. */
[71037]92 ComObjPtr<UIMainEventListenerImpl> m_pQtListener;
[98875]93
[71037]94 /** Holds the COM event listener instance. */
[98875]95 CEventListener m_comEventListener;
96 const bool m_fShowToolbar;
97 QString m_strMachineName;
[71025]98};
99
[76581]100#endif /* !FEQT_INCLUDED_SRC_guestctrl_UIGuestProcessControlWidget_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use