VirtualBox

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

Last change on this file since 70905 was 69500, checked in by vboxsync, 7 years ago

*: scm --update-copyright-year

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