Changeset 47398 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jul 25, 2013 2:19:29 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
r47160 r47398 189 189 { 190 190 /* Configure button: */ 191 m_pSaveRadio->installEventFilter(this); 191 192 connect(m_pSaveRadio, SIGNAL(toggled(bool)), this, SLOT(sltUpdateWidgetAvailability())); 192 193 } … … 202 203 { 203 204 /* Configure button: */ 205 m_pShutdownRadio->installEventFilter(this); 204 206 connect(m_pShutdownRadio, SIGNAL(toggled(bool)), this, SLOT(sltUpdateWidgetAvailability())); 205 207 } … … 215 217 { 216 218 /* Configure button: */ 219 m_pPowerOffRadio->installEventFilter(this); 217 220 connect(m_pPowerOffRadio, SIGNAL(toggled(bool)), this, SLOT(sltUpdateWidgetAvailability())); 218 221 } … … 383 386 } 384 387 388 bool UIVMCloseDialog::eventFilter(QObject *pWatched, QEvent *pEvent) 389 { 390 /* For now we are interested in double-click events only: */ 391 if (pEvent->type() == QEvent::MouseButtonDblClick) 392 { 393 /* Make sure its one of the radio-buttons 394 * which has this event-filter installed: */ 395 if (qobject_cast<QRadioButton*>(pWatched)) 396 { 397 /* Since on double-click the button will be also selected 398 * we are just calling for the *accept* slot: */ 399 accept(); 400 } 401 } 402 403 /* Call to base-class: */ 404 return QIWithRetranslateUI<QIDialog>::eventFilter(pWatched, pEvent); 405 } 406 385 407 void UIVMCloseDialog::polishEvent(QShowEvent *pEvent) 386 408 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h
r46704 r47398 80 80 void retranslateUi(); 81 81 82 /* Handler: Event-filtering stuff: */ 83 bool eventFilter(QObject *pWatched, QEvent *pEvent); 84 82 85 /* Handler: Polish-event stuff: */ 83 86 void polishEvent(QShowEvent *pEvent);
Note:
See TracChangeset
for help on using the changeset viewer.