VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMainWindow.cpp@ 69496

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

*: scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 1.3 KB
Line 
1/* $Id: QIMainWindow.cpp 69496 2017-10-28 14:55:58Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - QIMainWindow class implementation.
4 */
5
6/*
7 * Copyright (C) 2016-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#ifdef VBOX_WITH_PRECOMPILED_HEADERS
19# include <precomp.h>
20#else /* !VBOX_WITH_PRECOMPILED_HEADERS */
21
22/* GUI includes: */
23# include "QIMainWindow.h"
24# include "VBoxGlobal.h"
25
26#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
27
28
29QIMainWindow::QIMainWindow(QWidget *pParent /* = 0 */, Qt::WindowFlags enmFlags /* = 0 */)
30 : QMainWindow(pParent, enmFlags)
31{
32}
33
34void QIMainWindow::restoreGeometry()
35{
36#ifdef VBOX_WS_MAC
37 /* Use the old approach for OSX: */
38 move(m_geometry.topLeft());
39 resize(m_geometry.size());
40#else /* VBOX_WS_MAC */
41 /* Use the new approach for Windows/X11: */
42 VBoxGlobal::setTopLevelGeometry(this, m_geometry);
43#endif /* !VBOX_WS_MAC */
44
45 /* Maximize (if necessary): */
46 if (shouldBeMaximized())
47 showMaximized();
48}
49
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette