VirtualBox

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

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

The debugger is back in the OSE.

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