~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/Frontends/VirtualBox/src/VBoxCloseVMDlg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-01-30 23:27:25 UTC
  • mfrom: (0.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110130232725-2ouajjd2ggdet0zd
Tags: 4.0.2-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Drop ubuntu-01-fix-build-gcc45.patch, fixed upstream.
* Drop ubuntu-02-as-needed.patch, added to the Debian package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: VBoxCloseVMDlg.cpp $ */
2
 
/** @file
3
 
 *
4
 
 * VBox frontends: Qt4 GUI ("VirtualBox"):
5
 
 * VBoxCloseVMDlg class implementation
6
 
 */
7
 
 
8
 
/*
9
 
 * Copyright (C) 2006-2008 Oracle Corporation
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
 
 
20
 
#ifdef VBOX_WITH_PRECOMPILED_HEADERS
21
 
# include "precomp.h"
22
 
#else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
23
 
#include "VBoxCloseVMDlg.h"
24
 
#include "VBoxProblemReporter.h"
25
 
#include "UIMachineWindowNormal.h"
26
 
 
27
 
/* Qt includes */
28
 
#include <QPushButton>
29
 
#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
30
 
 
31
 
VBoxCloseVMDlg::VBoxCloseVMDlg (QWidget *aParent)
32
 
    : QIWithRetranslateUI<QIDialog> (aParent)
33
 
{
34
 
#ifdef Q_WS_MAC
35
 
    /* No sheets in another mode than normal for now. Firstly it looks ugly and
36
 
     * secondly in some cases it is broken. */
37
 
    UIMachineWindowNormal *pWnd = qobject_cast<UIMachineWindowNormal*>(aParent);
38
 
    if (pWnd)
39
 
        setWindowFlags (Qt::Sheet);
40
 
#endif /* Q_WS_MAC */
41
 
 
42
 
    /* Apply UI decorations */
43
 
    Ui::VBoxCloseVMDlg::setupUi (this);
44
 
 
45
 
#ifdef Q_WS_MAC
46
 
    /* Make some more space around the content */
47
 
    hboxLayout->setContentsMargins (40, 0, 40, 0);
48
 
    vboxLayout2->insertSpacing (1, 20);
49
 
    /* and more space between the radio buttons */
50
 
    gridLayout->setSpacing (15);
51
 
#endif /* Q_WS_MAC */
52
 
    /* Set fixed size */
53
 
    setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
54
 
 
55
 
    connect (mButtonBox, SIGNAL (helpRequested()),
56
 
             &vboxProblem(), SLOT (showHelpHelpDialog()));
57
 
}
58
 
 
59
 
void VBoxCloseVMDlg::retranslateUi()
60
 
{
61
 
    /* Translate uic generated strings */
62
 
    Ui::VBoxCloseVMDlg::retranslateUi (this);
63
 
}
64