Changeset 47806 in vbox
- Timestamp:
- Aug 16, 2013 12:52:34 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 88067
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp
r47772 r47806 57 57 , m_fLoaded(false) 58 58 , m_fSaved(false) 59 /* Status bar stuff: */ 60 , m_pStatusBar(new QStackedWidget(this)) 61 /* Process bar stuff: */ 62 , m_pProcessBar(new QProgressBar(this)) 63 /* Error/Warning stuff: */ 59 /* Status-bar stuff: */ 60 , m_pStatusBar(0) 61 /* Process-bar stuff: */ 62 , m_pProcessBar(0) 63 /* Warning-pane stuff: */ 64 , m_pWarningPane(0) 64 65 , m_fValid(true) 65 66 , m_fSilent(true) 66 , m_pWarningPane(new UIWarningPane(this))67 67 /* Whats-this stuff: */ 68 68 , m_pWhatsThisTimer(new QTimer(this)) … … 71 71 /* Apply UI decorations: */ 72 72 Ui::UISettingsDialog::setupUi(this); 73 74 #ifdef Q_WS_MAC75 /* No status bar on the mac: */76 setSizeGripEnabled(false);77 setStatusBar(0);78 #endif /* Q_WS_MAC */79 73 80 74 /* Page-title font is derived from the system font: */ … … 84 78 m_pLbTitle->setFont(pageTitleFont); 85 79 86 /* Get main grid layout: */80 /* Prepare selector: */ 87 81 QGridLayout *pMainLayout = static_cast<QGridLayout*>(centralWidget()->layout()); 88 82 #ifdef VBOX_GUI_WITH_TOOLBAR_SETTINGS … … 103 97 pMainLayout->setSpacing(10); 104 98 #endif /* VBOX_GUI_WITH_TOOLBAR_SETTINGS */ 105 106 /* Creating stack of pages: */ 99 connect(m_pSelector, SIGNAL(categoryChanged(int)), this, SLOT(sltCategoryChanged(int))); 100 101 /* Prepare page-stack: */ 107 102 m_pStack = new QStackedWidget(m_pWtStackHandler); 108 103 popupCenter().setPopupStackOrientation(m_pStack, UIPopupStackOrientation_Bottom); … … 111 106 pStackLayout->addWidget(m_pStack); 112 107 113 /* Status bar: */114 m_p StatusBar->addWidget(new QWidget);115 m_pButtonBox->addExtraWidget(m_pStatusBar);116 117 /* Setup process bar stuff: */118 m_p StatusBar->addWidget(m_pProcessBar);119 120 /* Setup error & warning stuff: */121 m_p StatusBar->addWidget(m_pWarningPane);108 /* Prepare button-box: */ 109 m_pButtonBox->button(QDialogButtonBox::Ok)->setDefault(true); 110 connect(m_pButtonBox, SIGNAL(helpRequested()), &msgCenter(), SLOT(sltShowHelpHelpDialog())); 111 112 /* Prepare process-bar: */ 113 m_pProcessBar = new QProgressBar; 114 115 /* Prepare warning-pane: */ 116 m_pWarningPane = new UIWarningPane; 122 117 connect(m_pWarningPane, SIGNAL(sigHoverEnter()), this, SLOT(sltHandleWarningPaneHovered())); 123 118 connect(m_pWarningPane, SIGNAL(sigHoverLeave()), this, SLOT(sltHandleWarningPaneUnhovered())); 119 120 /* Prepare status-bar: */ 121 m_pStatusBar = new QStackedWidget; 122 /* Add empty widget: */ 123 m_pStatusBar->addWidget(new QWidget); 124 /* Add process-bar widget: */ 125 m_pStatusBar->addWidget(m_pProcessBar); 126 /* Add warning-pane: */ 127 m_pStatusBar->addWidget(m_pWarningPane); 128 /* Add status-bar to button-box: */ 129 m_pButtonBox->addExtraWidget(m_pStatusBar); 124 130 125 131 /* Setup whatsthis stuff: */ … … 127 133 m_pWhatsThisTimer->setSingleShot(true); 128 134 connect(m_pWhatsThisTimer, SIGNAL(timeout()), this, SLOT(sltUpdateWhatsThis())); 129 130 /* Set the default button: */131 m_pButtonBox->button(QDialogButtonBox::Ok)->setDefault(true);132 133 /* Setup connections: */134 connect(m_pSelector, SIGNAL(categoryChanged(int)), this, SLOT(sltCategoryChanged(int)));135 connect(m_pButtonBox, SIGNAL(helpRequested()), &msgCenter(), SLOT(sltShowHelpHelpDialog()));136 135 137 136 /* Translate UI: */ … … 335 334 setError(QString()); 336 335 setWarning(QString()); 336 m_pWarningPane->setWarningText(QString()); 337 337 338 338 /* Enumerating all the validators we have: */ … … 371 371 } 372 372 373 /* Make sure message-pane visible if necessary: */373 /* Make sure warning-pane visible if necessary: */ 374 374 if ((!m_fValid || !m_fSilent) && m_pStatusBar->currentIndex() == 0) 375 375 m_pStatusBar->setCurrentWidget(m_pWarningPane); 376 /* Make sure whats-this-pane visible otherwise: */376 /* Make sure empty-pane visible otherwise: */ 377 377 else if (m_fValid && m_fSilent && m_pStatusBar->currentWidget() == m_pWarningPane) 378 378 m_pStatusBar->setCurrentIndex(0); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.h
r47763 r47806 139 139 140 140 /* Error & Warning stuff: */ 141 UIWarningPane *m_pWarningPane; 141 142 bool m_fValid; 142 143 bool m_fSilent; … … 145 146 QString m_strErrorString; 146 147 QString m_strWarningString; 147 UIWarningPane *m_pWarningPane;148 148 149 149 /* Whats-This stuff: */
Note:
See TracChangeset
for help on using the changeset viewer.