VirtualBox

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

Last change on this file since 41309 was 33540, checked in by vboxsync, 14 years ago

*: spelling fixes, thanks Timeless!

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.9 KB
Line 
1/* $Id: VBoxDbgGui.h 33540 2010-10-28 09:27:05Z vboxsync $ */
2/** @file
3 * VBox Debugger GUI - The Manager.
4 */
5
6/*
7 * Copyright (C) 2006-2010 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 "VBoxDbgStatsQt4.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 pVM The VM handle.
61 */
62 int init(PVM pVM);
63
64 /**
65 * Destroys the VBoxDbgGui object.
66 */
67 virtual ~VBoxDbgGui();
68
69 /**
70 * Sets the parent widget.
71 *
72 * @param pParent New parent widget.
73 * @remarks This only affects new windows.
74 */
75 void setParent(QWidget *pParent);
76
77 /**
78 * Sets the menu object.
79 *
80 * @param pMenu New menu object.
81 * @remarks This only affects new menu additions.
82 */
83 void setMenu(QMenu *pMenu);
84
85 /**
86 * Show the default statistics window, creating it if necessary.
87 *
88 * @returns VBox status code.
89 */
90 int showStatistics();
91
92 /**
93 * Repositions and resizes (optionally) the statistics to its defaults
94 *
95 * @param fResize If set (default) the size of window is also changed.
96 */
97 void repositionStatistics(bool fResize = true);
98
99 /**
100 * Show the console window (aka. command line), creating it if necessary.
101 *
102 * @returns VBox status code.
103 */
104 int showConsole();
105
106 /**
107 * Repositions and resizes (optionally) the console to its defaults
108 *
109 * @param fResize If set (default) the size of window is also changed.
110 */
111 void repositionConsole(bool fResize = true);
112
113 /**
114 * Update the desktop size.
115 * This is called whenever the reference window changes position.
116 */
117 void updateDesktopSize();
118
119 /**
120 * Notifies the debugger GUI that the console window (or whatever) has changed
121 * size or position.
122 *
123 * @param x The x-coordinate of the window the debugger is relative to.
124 * @param y The y-coordinate of the window the debugger is relative to.
125 * @param cx The width of the window the debugger is relative to.
126 * @param cy The height of the window the debugger is relative to.
127 */
128 void adjustRelativePos(int x, int y, unsigned cx, unsigned cy);
129
130 /**
131 * Gets the VM handle.
132 * @returns The VM handle.
133 */
134 PVM getVMHandle() const
135 {
136 return m_pVM;
137 }
138
139
140protected slots:
141 /**
142 * Notify that a child object (i.e. a window is begin destroyed).
143 * @param pObj The object which is being destroyed.
144 */
145 void notifyChildDestroyed(QObject *pObj);
146
147protected:
148
149 /** The debugger statistics. */
150 VBoxDbgStats *m_pDbgStats;
151 /** The debugger console (aka. command line). */
152 VBoxDbgConsole *m_pDbgConsole;
153
154 /** The VirtualBox session. */
155 ISession *m_pSession;
156 /** The VirtualBox console. */
157 IConsole *m_pConsole;
158 /** The VirtualBox Machine Debugger. */
159 IMachineDebugger *m_pMachineDebugger;
160 /** The VirtualBox Machine. */
161 IMachine *m_pMachine;
162 /** The VM instance. */
163 PVM m_pVM;
164
165 /** The parent widget. */
166 QWidget *m_pParent;
167 /** The menu object for the 'debug' menu. */
168 QMenu *m_pMenu;
169
170 /** The x-coordinate of the window we're relative to. */
171 int m_x;
172 /** The y-coordinate of the window we're relative to. */
173 int m_y;
174 /** The width of the window we're relative to. */
175 unsigned m_cx;
176 /** The height of the window we're relative to. */
177 unsigned m_cy;
178 /** The x-coordinate of the desktop. */
179 int m_xDesktop;
180 /** The y-coordinate of the desktop. */
181 int m_yDesktop;
182 /** The size of the desktop. */
183 unsigned m_cxDesktop;
184 /** The size of the desktop. */
185 unsigned m_cyDesktop;
186};
187
188
189#endif
190
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