[26719] | 1 | /* $Id: UIVMCloseDialog.cpp 32483 2010-09-14 13:45:07Z vboxsync $ */
|
---|
[8332] | 2 | /** @file
|
---|
| 3 | *
|
---|
| 4 | * VBox frontends: Qt4 GUI ("VirtualBox"):
|
---|
[32483] | 5 | * UIVMCloseDialog class implementation
|
---|
[8332] | 6 | */
|
---|
| 7 |
|
---|
| 8 | /*
|
---|
[32483] | 9 | * Copyright (C) 2006-2010 Oracle Corporation
|
---|
[8332] | 10 | *
|
---|
| 11 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
| 12 | * available from http://www.virtualbox.org. This file is free software;
|
---|
| 13 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
| 14 | * General Public License (GPL) as published by the Free Software
|
---|
| 15 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
| 16 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
| 17 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
| 18 | */
|
---|
| 19 |
|
---|
[25526] | 20 | #ifdef VBOX_WITH_PRECOMPILED_HEADERS
|
---|
| 21 | # include "precomp.h"
|
---|
| 22 | #else /* !VBOX_WITH_PRECOMPILED_HEADERS */
|
---|
[32483] | 23 | #include "UIVMCloseDialog.h"
|
---|
[9121] | 24 | #include "VBoxProblemReporter.h"
|
---|
[29794] | 25 | #include "UIMachineWindowNormal.h"
|
---|
[8332] | 26 |
|
---|
[31319] | 27 | #ifdef Q_WS_MAC
|
---|
| 28 | # include "VBoxGlobal.h"
|
---|
| 29 | #endif /* Q_WS_MAC */
|
---|
| 30 |
|
---|
[8332] | 31 | /* Qt includes */
|
---|
| 32 | #include <QPushButton>
|
---|
[25526] | 33 | #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
|
---|
[8332] | 34 |
|
---|
[32483] | 35 | UIVMCloseDialog::UIVMCloseDialog(QWidget *pParent)
|
---|
| 36 | : QIWithRetranslateUI<QIDialog>(pParent)
|
---|
[8332] | 37 | {
|
---|
[12097] | 38 | #ifdef Q_WS_MAC
|
---|
[27030] | 39 | /* No sheets in another mode than normal for now. Firstly it looks ugly and
|
---|
| 40 | * secondly in some cases it is broken. */
|
---|
[32483] | 41 | if (vboxGlobal().isSheetWindowsAllowed(pParent))
|
---|
| 42 | setWindowFlags(Qt::Sheet);
|
---|
[12097] | 43 | #endif /* Q_WS_MAC */
|
---|
| 44 |
|
---|
[8332] | 45 | /* Apply UI decorations */
|
---|
[32483] | 46 | Ui::UIVMCloseDialog::setupUi(this);
|
---|
[8332] | 47 |
|
---|
[11694] | 48 | #ifdef Q_WS_MAC
|
---|
| 49 | /* Make some more space around the content */
|
---|
[32483] | 50 | hboxLayout->setContentsMargins(40, 0, 40, 0);
|
---|
| 51 | vboxLayout2->insertSpacing(1, 20);
|
---|
[11694] | 52 | /* and more space between the radio buttons */
|
---|
[32483] | 53 | gridLayout->setSpacing(15);
|
---|
[11694] | 54 | #endif /* Q_WS_MAC */
|
---|
[8332] | 55 | /* Set fixed size */
|
---|
[32483] | 56 | setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
---|
[8332] | 57 |
|
---|
[32483] | 58 | connect(mButtonBox, SIGNAL(helpRequested()),
|
---|
| 59 | &vboxProblem(), SLOT(showHelpHelpDialog()));
|
---|
[8332] | 60 | }
|
---|
| 61 |
|
---|
[32483] | 62 | void UIVMCloseDialog::retranslateUi()
|
---|
[9056] | 63 | {
|
---|
| 64 | /* Translate uic generated strings */
|
---|
[32483] | 65 | Ui::UIVMCloseDialog::retranslateUi(this);
|
---|
[9056] | 66 | }
|
---|
| 67 |
|
---|