VirtualBox

source: vbox/trunk/src/VBox/Debugger/VBoxDbgGui.h@ 92780

Last change on this file since 92780 was 90520, checked in by vboxsync, 3 years ago

VBoxDbg,FE/Qt: Added --statistics-expand=pat and --statistics-filter=pat command line options to VirtualBoxVM to simplify monitoring the same statistics in repeated test runs.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.3 KB
Line 
1/* $Id: VBoxDbgGui.h 90520 2021-08-04 21:37:54Z vboxsync $ */
2/** @file
3 * VBox Debugger GUI - The Manager.
4 */
5
6/*
7 * Copyright (C) 2006-2020 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 DEBUGGER_INCLUDED_SRC_VBoxDbgGui_h
19#define DEBUGGER_INCLUDED_SRC_VBoxDbgGui_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24// VirtualBox COM interfaces declarations (generated header)
25#ifdef VBOX_WITH_XPCOM
26# include <VirtualBox_XPCOM.h>
27#else
28# include <VirtualBox.h>
29#endif
30
31#include "VBoxDbgStatsQt.h"
32#include "VBoxDbgConsole.h"
33
34
35/**
36 * The Debugger GUI manager class.
37 *
38 * It's job is to provide a C callable external interface and manage the
39 * windows and bit making up the debugger GUI.
40 */
41class VBoxDbgGui : public QObject
42{
43 Q_OBJECT;
44
45public:
46 /**
47 * Create a default VBoxDbgGui object.
48 */
49 VBoxDbgGui();
50
51 /**
52 * Initializes a VBoxDbgGui object by ISession.
53 *
54 * @returns VBox status code.
55 * @param pSession VBox Session object.
56 */
57 int init(ISession *pSession);
58
59 /**
60 * Initializes a VBoxDbgGui object by VM handle.
61 *
62 * @returns VBox status code.
63 * @param pUVM The user mode VM handle. The caller's reference will be
64 * consumed on success.
65 */
66 int init(PUVM pUVM);
67
68 /**
69 * Destroys the VBoxDbgGui object.
70 */
71 virtual ~VBoxDbgGui();
72
73 /**
74 * Sets the parent widget.
75 *
76 * @param pParent New parent widget.
77 * @remarks This only affects new windows.
78 */
79 void setParent(QWidget *pParent);
80
81 /**
82 * Sets the menu object.
83 *
84 * @param pMenu New menu object.
85 * @remarks This only affects new menu additions.
86 */
87 void setMenu(QMenu *pMenu);
88
89 /**
90 * Show the default statistics window, creating it if necessary.
91 *
92 * @returns VBox status code.
93 * @param pszFilter Filter pattern.
94 * @param pszExpand Expand pattern.
95 */
96 int showStatistics(const char *pszFilter, const char *pszExpand);
97
98 /**
99 * Repositions and resizes (optionally) the statistics to its defaults
100 *
101 * @param fResize If set (default) the size of window is also changed.
102 */
103 void repositionStatistics(bool fResize = true);
104
105 /**
106 * Show the console window (aka. command line), creating it if necessary.
107 *
108 * @returns VBox status code.
109 */
110 int showConsole();
111
112 /**
113 * Repositions and resizes (optionally) the console to its defaults
114 *
115 * @param fResize If set (default) the size of window is also changed.
116 */
117 void repositionConsole(bool fResize = true);
118
119 /**
120 * Update the desktop size.
121 * This is called whenever the reference window changes position.
122 */
123 void updateDesktopSize();
124
125 /**
126 * Notifies the debugger GUI that the console window (or whatever) has changed
127 * size or position.
128 *
129 * @param x The x-coordinate of the window the debugger is relative to.
130 * @param y The y-coordinate of the window the debugger is relative to.
131 * @param cx The width of the window the debugger is relative to.
132 * @param cy The height of the window the debugger is relative to.
133 */
134 void adjustRelativePos(int x, int y, unsigned cx, unsigned cy);
135
136 /**
137 * Gets the user mode VM handle.
138 * @returns The UVM handle.
139 */
140 PUVM getUvmHandle() const
141 {
142 return m_pUVM;
143 }
144
145 /**
146 * @returns The name of the machine.
147 */
148 QString getMachineName() const;
149
150protected slots:
151 /**
152 * Notify that a child object (i.e. a window is begin destroyed).
153 * @param pObj The object which is being destroyed.
154 */
155 void notifyChildDestroyed(QObject *pObj);
156
157protected:
158
159 /** The debugger statistics. */
160 VBoxDbgStats *m_pDbgStats;
161 /** The debugger console (aka. command line). */
162 VBoxDbgConsole *m_pDbgConsole;
163
164 /** The VirtualBox session. */
165 ISession *m_pSession;
166 /** The VirtualBox console. */
167 IConsole *m_pConsole;
168 /** The VirtualBox Machine Debugger. */
169 IMachineDebugger *m_pMachineDebugger;
170 /** The VirtualBox Machine. */
171 IMachine *m_pMachine;
172 /** The VM instance. */
173 PVM m_pVM;
174 /** The user mode VM handle. */
175 PUVM m_pUVM;
176
177 /** The parent widget. */
178 QWidget *m_pParent;
179 /** The menu object for the 'debug' menu. */
180 QMenu *m_pMenu;
181
182 /** The x-coordinate of the window we're relative to. */
183 int m_x;
184 /** The y-coordinate of the window we're relative to. */
185 int m_y;
186 /** The width of the window we're relative to. */
187 unsigned m_cx;
188 /** The height of the window we're relative to. */
189 unsigned m_cy;
190 /** The x-coordinate of the desktop. */
191 int m_xDesktop;
192 /** The y-coordinate of the desktop. */
193 int m_yDesktop;
194 /** The size of the desktop. */
195 unsigned m_cxDesktop;
196 /** The size of the desktop. */
197 unsigned m_cyDesktop;
198};
199
200
201#endif /* !DEBUGGER_INCLUDED_SRC_VBoxDbgGui_h */
202
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