VirtualBox

Changeset 45206 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 27, 2013 11:29:51 AM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI: Close VM dialog rework/cleanup (part 1).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp

    r45192 r45206  
    77
    88/*
    9  * Copyright (C) 2006-2012 Oracle Corporation
     9 * Copyright (C) 2006-2013 Oracle Corporation
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2121# include "precomp.h"
    2222#else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
     23/* Qt includes: */
     24#include <QPushButton>
     25
     26/* GUI includes: */
    2327#include "UIVMCloseDialog.h"
    2428#include "UIMessageCenter.h"
    2529#include "UIMachineWindowNormal.h"
    26 
    27 #ifdef Q_WS_MAC
    28 # include "VBoxGlobal.h"
    29 #endif /* Q_WS_MAC */
    30 
    31 /* Qt includes */
    32 #include <QPushButton>
    3330#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    3431
     
    3633    : QIWithRetranslateUI<QIDialog>(pParent)
    3734{
    38     /* Apply UI decorations */
     35    /* Apply UI decorations: */
    3936    Ui::UIVMCloseDialog::setupUi(this);
    4037
    4138#ifdef Q_WS_MAC
    42     /* Make some more space around the content */
     39    /* Add more space around the content: */
    4340    hboxLayout->setContentsMargins(40, 0, 40, 0);
    4441    vboxLayout2->insertSpacing(1, 20);
    45     /* and more space between the radio buttons */
     42    /* And more space between the radio buttons: */
    4643    gridLayout->setSpacing(15);
    4744#endif /* Q_WS_MAC */
    48     /* Set fixed size */
    49     setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
    5045
     46    /* Configure default button connections: */
    5147    connect(mButtonBox, SIGNAL(helpRequested()),
    5248            &msgCenter(), SLOT(sltShowHelpHelpDialog()));
     
    5551void UIVMCloseDialog::retranslateUi()
    5652{
    57     /* Translate uic generated strings */
     53    /* Translate uic generated strings: */
    5854    Ui::UIVMCloseDialog::retranslateUi(this);
    5955}
    6056
     57void UIVMCloseDialog::polishEvent(QShowEvent *pEvent)
     58{
     59    /* Call to base-class: */
     60    QIDialog::polishEvent(pEvent);
     61
     62    /* Make the dialog-size fixed: */
     63    setFixedSize(size());
     64}
     65
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h

    r45192 r45206  
    66
    77/*
    8  * Copyright (C) 2006-2012 Oracle Corporation
     8 * Copyright (C) 2006-2013 Oracle Corporation
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020#define __UIVMCloseDialog_h__
    2121
     22/* GUI includes: */
     23#include "QIDialog.h"
     24#include "QIWithRetranslateUI.h"
    2225#include "UIVMCloseDialog.gen.h"
    23 #include "QIWithRetranslateUI.h"
    24 #include "QIDialog.h"
    2526
     27/* QIDialog extension to handle Runtime UI close-event: */
    2628class UIVMCloseDialog : public QIWithRetranslateUI<QIDialog>,
    2729                        public Ui::UIVMCloseDialog
     
    3133public:
    3234
     35    /* Constructor: */
    3336    UIVMCloseDialog(QWidget *pParent);
    3437
    35 protected:
     38private:
    3639
     40    /* Helper: Translate stuff: */
    3741    void retranslateUi();
     42
     43    /* Handler: Polish-event stuff: */
     44    void polishEvent(QShowEvent *pEvent);
    3845};
    3946
Note: See TracChangeset for help on using the changeset viewer.

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