Changeset 54055 in vbox
- Timestamp:
- Jan 30, 2015 7:07:32 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
-
UIVMLogViewer.cpp (modified) (1 diff)
-
platform/darwin/UICocoaSpecialControls.h (modified) (7 diffs)
-
platform/darwin/UICocoaSpecialControls.mm (modified) (12 diffs)
-
selector/UIVMDesktop.cpp (modified) (3 diffs)
-
widgets/UISpecialControls.cpp (modified) (9 diffs)
-
widgets/UISpecialControls.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.cpp
r52722 r54055 73 73 74 74 /* Next/Previous buttons: */ 75 m_pNextPrevButtons = new UIRoundRectSegmentedButton( 2, this);75 m_pNextPrevButtons = new UIRoundRectSegmentedButton(this, 2); 76 76 m_pNextPrevButtons->setEnabled(0, false); 77 77 m_pNextPrevButtons->setEnabled(1, false); -
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.h
r52727 r54055 23 23 /* Qt includes */ 24 24 #include <QWidget> 25 26 /* Qt forward includes */ 27 class QMacCocoaViewContainer; 25 #include <QMacCocoaViewContainer> 28 26 29 27 /* Add typedefs for Cocoa types */ … … 32 30 ADD_COCOA_NATIVE_REF(NSSearchField); 33 31 34 class UICocoaWrapper: public QWidget 35 { 36 public: 37 UICocoaWrapper(QWidget *pParent = 0); 38 39 protected: 40 virtual void resizeEvent(QResizeEvent *pEvent); 41 42 QMacCocoaViewContainer *m_pContainer; 43 }; 44 45 class UICocoaButton: public UICocoaWrapper 32 class UICocoaButton: public QMacCocoaViewContainer 46 33 { 47 34 Q_OBJECT … … 55 42 }; 56 43 57 UICocoaButton( CocoaButtonType aType, QWidget *pParent = 0);44 UICocoaButton(QWidget *pParent, CocoaButtonType type); 58 45 ~UICocoaButton(); 59 46 … … 69 56 70 57 private: 71 /* Private member vars */ 72 NativeNSButtonRef m_pNativeRef; 58 NativeNSButtonRef nativeRef() const { return static_cast<NativeNSButtonRef>(cocoaView()); } 73 59 }; 74 60 75 class UICocoaSegmentedButton: public UICocoaWrapper61 class UICocoaSegmentedButton: public QMacCocoaViewContainer 76 62 { 77 63 Q_OBJECT … … 84 70 }; 85 71 86 UICocoaSegmentedButton( int count, CocoaSegmentType type = RoundRectSegment, QWidget *pParent = 0);72 UICocoaSegmentedButton(QWidget *pParent, int count, CocoaSegmentType type = RoundRectSegment); 87 73 ~UICocoaSegmentedButton(); 88 74 … … 101 87 102 88 private: 103 /* Private member vars */ 104 NativeNSSegmentedControlRef m_pNativeRef; 89 NativeNSSegmentedControlRef nativeRef() const { return static_cast<NativeNSSegmentedControlRef>(cocoaView()); } 105 90 }; 106 91 107 class UICocoaSearchField: public UICocoaWrapper92 class UICocoaSearchField: public QMacCocoaViewContainer 108 93 { 109 94 Q_OBJECT 110 95 111 96 public: 112 UICocoaSearchField(QWidget* pParent = 0);97 UICocoaSearchField(QWidget* pParent); 113 98 ~UICocoaSearchField(); 114 99 … … 129 114 130 115 private: 131 /* Private member vars */ 132 NativeNSSearchFieldRef m_pNativeRef; 116 NativeNSSearchFieldRef nativeRef() const { return static_cast<NativeNSSearchFieldRef>(cocoaView()); } 133 117 }; 134 118 -
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.mm
r52727 r54055 234 234 * Public classes 235 235 */ 236 UICocoaWrapper::UICocoaWrapper(QWidget *pParent /* = 0 */) 237 : QWidget(pParent) 238 , m_pContainer(0) 239 { 240 } 241 242 void UICocoaWrapper::resizeEvent(QResizeEvent *pEvent) 243 { 244 if (m_pContainer) 245 m_pContainer->resize(pEvent->size()); 246 QWidget::resizeEvent(pEvent); 247 } 248 249 UICocoaButton::UICocoaButton(CocoaButtonType aType, QWidget *pParent /* = 0 */) 250 : UICocoaWrapper(pParent) 251 { 236 UICocoaButton::UICocoaButton(QWidget *pParent, CocoaButtonType type) 237 : QMacCocoaViewContainer(0, pParent) 238 { 239 /* Prepare auto-release pool: */ 240 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 241 242 /* Prepare native button reference: */ 243 NativeNSButtonRef pNativeRef; 252 244 NSRect initFrame; 253 245 254 switch (aType) 246 /* Configure button: */ 247 switch (type) 255 248 { 256 249 case HelpButton: 257 250 { 258 m_pNativeRef = [[NSButton alloc] init];259 [ m_pNativeRef setTitle: @""];260 [ m_pNativeRef setBezelStyle: NSHelpButtonBezelStyle];261 [ m_pNativeRef setBordered: YES];262 [ m_pNativeRef setAlignment: NSCenterTextAlignment];263 [ m_pNativeRef sizeToFit];264 initFrame = [ m_pNativeRef frame];251 pNativeRef = [[NSButton alloc] init]; 252 [pNativeRef setTitle: @""]; 253 [pNativeRef setBezelStyle: NSHelpButtonBezelStyle]; 254 [pNativeRef setBordered: YES]; 255 [pNativeRef setAlignment: NSCenterTextAlignment]; 256 [pNativeRef sizeToFit]; 257 initFrame = [pNativeRef frame]; 265 258 initFrame.size.width += 12; /* Margin */ 266 [ m_pNativeRef setFrame:initFrame];259 [pNativeRef setFrame:initFrame]; 267 260 break; 268 261 }; 269 262 case CancelButton: 270 263 { 271 m_pNativeRef = [[NSButton alloc] initWithFrame: NSMakeRect(0, 0, 13, 13)];272 [ m_pNativeRef setTitle: @""];273 [ m_pNativeRef setBezelStyle:NSShadowlessSquareBezelStyle];274 [ m_pNativeRef setButtonType:NSMomentaryChangeButton];275 [ m_pNativeRef setImage: [NSImage imageNamed: NSImageNameStopProgressFreestandingTemplate]];276 [ m_pNativeRef setBordered: NO];277 [[ m_pNativeRef cell] setImageScaling: NSImageScaleProportionallyDown];278 initFrame = [ m_pNativeRef frame];264 pNativeRef = [[NSButton alloc] initWithFrame: NSMakeRect(0, 0, 13, 13)]; 265 [pNativeRef setTitle: @""]; 266 [pNativeRef setBezelStyle:NSShadowlessSquareBezelStyle]; 267 [pNativeRef setButtonType:NSMomentaryChangeButton]; 268 [pNativeRef setImage: [NSImage imageNamed: NSImageNameStopProgressFreestandingTemplate]]; 269 [pNativeRef setBordered: NO]; 270 [[pNativeRef cell] setImageScaling: NSImageScaleProportionallyDown]; 271 initFrame = [pNativeRef frame]; 279 272 break; 280 273 } 281 274 case ResetButton: 282 275 { 283 m_pNativeRef = [[NSButton alloc] initWithFrame: NSMakeRect(0, 0, 13, 13)];284 [ m_pNativeRef setTitle: @""];285 [ m_pNativeRef setBezelStyle:NSShadowlessSquareBezelStyle];286 [ m_pNativeRef setButtonType:NSMomentaryChangeButton];287 [ m_pNativeRef setImage: [NSImage imageNamed: NSImageNameRefreshFreestandingTemplate]];288 [ m_pNativeRef setBordered: NO];289 [[ m_pNativeRef cell] setImageScaling: NSImageScaleProportionallyDown];290 initFrame = [ m_pNativeRef frame];276 pNativeRef = [[NSButton alloc] initWithFrame: NSMakeRect(0, 0, 13, 13)]; 277 [pNativeRef setTitle: @""]; 278 [pNativeRef setBezelStyle:NSShadowlessSquareBezelStyle]; 279 [pNativeRef setButtonType:NSMomentaryChangeButton]; 280 [pNativeRef setImage: [NSImage imageNamed: NSImageNameRefreshFreestandingTemplate]]; 281 [pNativeRef setBordered: NO]; 282 [[pNativeRef cell] setImageScaling: NSImageScaleProportionallyDown]; 283 initFrame = [pNativeRef frame]; 291 284 break; 292 285 } 293 286 } 294 287 288 /* Install click listener: */ 295 289 UIButtonTargetPrivate *bt = [[UIButtonTargetPrivate alloc] initWithObjectAndLionTrouble:this]; 296 [m_pNativeRef setTarget:bt]; 297 [m_pNativeRef setAction:@selector(clicked:)]; 298 299 /* Create the container widget and attach the native view. */ 300 m_pContainer = new QMacCocoaViewContainer(m_pNativeRef, this); 301 /* Finally resize the widget */ 290 [pNativeRef setTarget:bt]; 291 [pNativeRef setAction:@selector(clicked:)]; 292 293 /* Put the button to the QCocoaViewContainer: */ 294 setCocoaView(pNativeRef); 295 /* Release our reference, since our super class 296 * takes ownership and we don't need it anymore. */ 297 [pNativeRef release]; 298 299 /* Finally resize the widget: */ 302 300 setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); 303 301 setFixedSize(NSWidth(initFrame), NSHeight(initFrame)); 302 303 /* Cleanup auto-release pool: */ 304 [pool release]; 304 305 } 305 306 … … 310 311 QSize UICocoaButton::sizeHint() const 311 312 { 312 NSRect frame = [ m_pNativeRefframe];313 NSRect frame = [nativeRef() frame]; 313 314 return QSize(frame.size.width, frame.size.height); 314 315 } … … 318 319 QString s(strText); 319 320 /* Set it for accessibility reasons as alternative title */ 320 [ m_pNativeRefsetAlternateTitle: ::darwinQStringToNSString(s.remove('&'))];321 [nativeRef() setAlternateTitle: ::darwinQStringToNSString(s.remove('&'))]; 321 322 } 322 323 323 324 void UICocoaButton::setToolTip(const QString& strTip) 324 325 { 325 [ m_pNativeRefsetToolTip: ::darwinQStringToNSString(strTip)];326 [nativeRef() setToolTip: ::darwinQStringToNSString(strTip)]; 326 327 } 327 328 … … 331 332 } 332 333 333 UICocoaSegmentedButton::UICocoaSegmentedButton(int count, CocoaSegmentType type /* = RoundRectSegment */, QWidget *pParent /* = 0 */) 334 : UICocoaWrapper(pParent) 335 { 334 UICocoaSegmentedButton::UICocoaSegmentedButton(QWidget *pParent, int count, CocoaSegmentType type /*= RoundRectSegment*/) 335 : QMacCocoaViewContainer(0, pParent) 336 { 337 /* Prepare auto-release pool: */ 338 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 339 340 /* Prepare native segmented-button reference: */ 341 NativeNSSegmentedControlRef pNativeRef; 336 342 NSRect initFrame; 337 343 338 m_pNativeRef = [[NSSegmentedControl alloc] init]; 339 [m_pNativeRef setSegmentCount:count]; 344 /* Configure segmented-button: */ 345 pNativeRef = [[NSSegmentedControl alloc] init]; 346 [pNativeRef setSegmentCount:count]; 340 347 switch (type) 341 348 { 342 349 case RoundRectSegment: 343 350 { 344 [ [m_pNativeRef cell] setTrackingMode: NSSegmentSwitchTrackingMomentary];345 [ m_pNativeRef setFont: [NSFont controlContentFontOfSize:351 [pNativeRef setSegmentStyle: NSSegmentStyleRoundRect]; 352 [pNativeRef setFont: [NSFont controlContentFontOfSize: 346 353 [NSFont systemFontSizeForControlSize: NSSmallControlSize]]]; 347 [ m_pNativeRef setSegmentStyle:NSSegmentStyleRoundRect];354 [[pNativeRef cell] setTrackingMode: NSSegmentSwitchTrackingMomentary]; 348 355 break; 349 356 } 350 357 case TexturedRoundedSegment: 351 358 { 352 [ m_pNativeRef setSegmentStyle:NSSegmentStyleTexturedRounded];353 [ m_pNativeRef setFont: [NSFont controlContentFontOfSize:359 [pNativeRef setSegmentStyle: NSSegmentStyleTexturedRounded]; 360 [pNativeRef setFont: [NSFont controlContentFontOfSize: 354 361 [NSFont systemFontSizeForControlSize: NSSmallControlSize]]]; 355 362 break; 356 363 } 357 364 } 358 [m_pNativeRef sizeToFit]; 359 365 366 /* Calculate corresponding size: */ 367 [pNativeRef sizeToFit]; 368 initFrame = [pNativeRef frame]; 369 370 /* Install click listener: */ 360 371 UISegmentedButtonTargetPrivate *bt = [[UISegmentedButtonTargetPrivate alloc] initWithObject1:this]; 361 [m_pNativeRef setTarget:bt]; 362 [m_pNativeRef setAction:@selector(segControlClicked:)]; 363 364 initFrame = [m_pNativeRef frame]; 365 /* Create the container widget and attach the native view. */ 366 m_pContainer = new QMacCocoaViewContainer(m_pNativeRef, this); 367 /* Finally resize the widget */ 372 [pNativeRef setTarget:bt]; 373 [pNativeRef setAction:@selector(segControlClicked:)]; 374 375 /* Put the button to the QCocoaViewContainer: */ 376 setCocoaView(pNativeRef); 377 /* Release our reference, since our super class 378 * takes ownership and we don't need it anymore. */ 379 [pNativeRef release]; 380 381 /* Finally resize the widget: */ 368 382 setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); 369 383 setFixedSize(NSWidth(initFrame), NSHeight(initFrame)); 384 385 /* Cleanup auto-release pool: */ 386 [pool release]; 370 387 } 371 388 … … 376 393 QSize UICocoaSegmentedButton::sizeHint() const 377 394 { 378 NSRect frame = [ m_pNativeRefframe];395 NSRect frame = [nativeRef() frame]; 379 396 return QSize(frame.size.width, frame.size.height); 380 397 } … … 383 400 { 384 401 QString s(strTitle); 385 [ m_pNativeRefsetLabel: ::darwinQStringToNSString(s.remove('&')) forSegment: iSegment];386 [ m_pNativeRefsizeToFit];387 NSRect frame = [ m_pNativeRefframe];402 [nativeRef() setLabel: ::darwinQStringToNSString(s.remove('&')) forSegment: iSegment]; 403 [nativeRef() sizeToFit]; 404 NSRect frame = [nativeRef() frame]; 388 405 setFixedSize(NSWidth(frame), NSHeight(frame)); 389 406 } … … 391 408 void UICocoaSegmentedButton::setToolTip(int iSegment, const QString &strTip) 392 409 { 393 [[ m_pNativeRefcell] setToolTip: ::darwinQStringToNSString(strTip) forSegment: iSegment];410 [[nativeRef() cell] setToolTip: ::darwinQStringToNSString(strTip) forSegment: iSegment]; 394 411 } 395 412 … … 399 416 400 417 NSImage *pNSimage = [::darwinToNSImageRef(&image) autorelease]; 401 [ m_pNativeRefsetImage: pNSimage forSegment: iSegment];402 [ m_pNativeRefsizeToFit];403 NSRect frame = [ m_pNativeRefframe];418 [nativeRef() setImage: pNSimage forSegment: iSegment]; 419 [nativeRef() sizeToFit]; 420 NSRect frame = [nativeRef() frame]; 404 421 setFixedSize(NSWidth(frame), NSHeight(frame)); 405 422 } … … 407 424 void UICocoaSegmentedButton::setEnabled(int iSegment, bool fEnabled) 408 425 { 409 [[ m_pNativeRefcell] setEnabled: fEnabled forSegment: iSegment];426 [[nativeRef() cell] setEnabled: fEnabled forSegment: iSegment]; 410 427 } 411 428 412 429 void UICocoaSegmentedButton::animateClick(int iSegment) 413 430 { 414 [ m_pNativeRefsetSelectedSegment: iSegment];415 [[ m_pNativeRef cell] performClick: m_pNativeRef];431 [nativeRef() setSelectedSegment: iSegment]; 432 [[nativeRef() cell] performClick: nativeRef()]; 416 433 } 417 434 … … 421 438 } 422 439 423 UICocoaSearchField::UICocoaSearchField(QWidget *pParent /* = 0 */) 424 : UICocoaWrapper(pParent) 425 { 440 UICocoaSearchField::UICocoaSearchField(QWidget *pParent) 441 : QMacCocoaViewContainer(0, pParent) 442 { 443 /* Prepare auto-release pool: */ 444 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 445 446 /* Prepare native search-field reference: */ 447 NativeNSSearchFieldRef pNativeRef; 426 448 NSRect initFrame; 427 449 428 m_pNativeRef = [[UISearchFieldPrivate alloc] initWithObject2: this]; 429 [m_pNativeRef setFont: [NSFont controlContentFontOfSize: 450 /* Configure search-field: */ 451 pNativeRef = [[UISearchFieldPrivate alloc] initWithObject2: this]; 452 [pNativeRef setFont: [NSFont controlContentFontOfSize: 430 453 [NSFont systemFontSizeForControlSize: NSMiniControlSize]]]; 431 [[ m_pNativeRef cell] setControlSize: NSMiniControlSize];432 [ m_pNativeRef sizeToFit];433 initFrame = [ m_pNativeRef frame];454 [[pNativeRef cell] setControlSize: NSMiniControlSize]; 455 [pNativeRef sizeToFit]; 456 initFrame = [pNativeRef frame]; 434 457 initFrame.size.width = 180; 435 [ m_pNativeRef setFrame: initFrame];436 437 /* Use our own delegate */458 [pNativeRef setFrame: initFrame]; 459 460 /* Use our own delegate: */ 438 461 UISearchFieldDelegatePrivate *sfd = [[UISearchFieldDelegatePrivate alloc] init]; 439 [m_pNativeRef setDelegate: sfd]; 440 441 /* Create the container widget and attach the native view. */ 442 m_pContainer = new QMacCocoaViewContainer(m_pNativeRef, this); 443 444 /* Finally resize the widget */ 462 [pNativeRef setDelegate: sfd]; 463 464 /* Put the button to the QCocoaViewContainer: */ 465 setCocoaView(pNativeRef); 466 /* Release our reference, since our super class 467 * takes ownership and we don't need it anymore. */ 468 [pNativeRef release]; 469 470 /* Finally resize the widget: */ 445 471 setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); 446 472 setMinimumWidth(NSWidth(initFrame)); 447 473 setFixedHeight(NSHeight(initFrame)); 448 474 setFocusPolicy(Qt::StrongFocus); 475 476 /* Cleanup auto-release pool: */ 477 [pool release]; 449 478 } 450 479 … … 455 484 QSize UICocoaSearchField::sizeHint() const 456 485 { 457 NSRect frame = [ m_pNativeRefframe];486 NSRect frame = [nativeRef() frame]; 458 487 return QSize(frame.size.width, frame.size.height); 459 488 } … … 461 490 QString UICocoaSearchField::text() const 462 491 { 463 return ::darwinNSStringToQString([ m_pNativeRefstringValue]);492 return ::darwinNSStringToQString([nativeRef() stringValue]); 464 493 } 465 494 466 495 void UICocoaSearchField::insert(const QString &strText) 467 496 { 468 [[ m_pNativeRef currentEditor] setString: [[m_pNativeRefstringValue] stringByAppendingString: ::darwinQStringToNSString(strText)]];497 [[nativeRef() currentEditor] setString: [[nativeRef() stringValue] stringByAppendingString: ::darwinQStringToNSString(strText)]]; 469 498 } 470 499 471 500 void UICocoaSearchField::setToolTip(const QString &strTip) 472 501 { 473 [ m_pNativeRefsetToolTip: ::darwinQStringToNSString(strTip)];502 [nativeRef() setToolTip: ::darwinQStringToNSString(strTip)]; 474 503 } 475 504 476 505 void UICocoaSearchField::selectAll() 477 506 { 478 [ m_pNativeRef selectText: m_pNativeRef];507 [nativeRef() selectText: nativeRef()]; 479 508 } 480 509 481 510 void UICocoaSearchField::markError() 482 511 { 483 [[ m_pNativeRefcell] setBackgroundColor: [[NSColor redColor] colorWithAlphaComponent: 0.3]];512 [[nativeRef() cell] setBackgroundColor: [[NSColor redColor] colorWithAlphaComponent: 0.3]]; 484 513 } 485 514 486 515 void UICocoaSearchField::unmarkError() 487 516 { 488 [[ m_pNativeRefcell] setBackgroundColor: nil];517 [[nativeRef() cell] setBackgroundColor: nil]; 489 518 } 490 519 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp
r52733 r54055 233 233 : QIWithRetranslateUI<QWidget>(pParent) 234 234 { 235 /* Prepare buttons: */ 236 m_pHeaderBtn = new UITexturedSegmentedButton(2); 237 m_pHeaderBtn->setIcon(Dtls, UIIconPool::iconSet(":/vm_settings_16px.png", 238 ":/vm_settings_disabled_16px.png")); 239 m_pHeaderBtn->setIcon(Snap, UIIconPool::iconSet(":/snapshot_take_16px.png", 240 ":/snapshot_take_disabled_16px.png")); 235 /* Create container: */ 236 QWidget *pContainer = new QWidget; 237 { 238 /* Create layout: */ 239 QHBoxLayout *pLayout = new QHBoxLayout(pContainer); 240 { 241 /* Configure layout: */ 242 pLayout->setContentsMargins(0, 0, 0, 0); 243 /* Create segmented-button: */ 244 m_pHeaderBtn = new UITexturedSegmentedButton(pContainer, 2); 245 { 246 /* Configure segmented-button: */ 247 m_pHeaderBtn->setIcon(Dtls, UIIconPool::iconSet(":/vm_settings_16px.png", 248 ":/vm_settings_disabled_16px.png")); 249 m_pHeaderBtn->setIcon(Snap, UIIconPool::iconSet(":/snapshot_take_16px.png", 250 ":/snapshot_take_disabled_16px.png")); 251 /* Add segmented-buttons into layout: */ 252 pLayout->addWidget(m_pHeaderBtn); 253 } 254 } 255 } 256 241 257 #ifdef Q_WS_MAC 242 258 /* Cocoa stuff should be async... … … 258 274 { 259 275 pToolBar->addWidget(new UIHorizontalSpacerWidget(this)); 260 pToolBar->addWidget( m_pHeaderBtn);276 pToolBar->addWidget(pContainer); 261 277 QWidget *pSpace = new QWidget(this); 262 278 /* We need a little bit more space for the beta label. */ … … 276 292 { 277 293 UIBar *pBar = new UIBar(this); 278 pBar->setContentWidget( m_pHeaderBtn);294 pBar->setContentWidget(pContainer); 279 295 pMainLayout->addWidget(pBar); 280 296 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.cpp
r52731 r54055 41 41 { 42 42 setShortcut(QKeySequence(Qt::Key_Escape)); 43 m_pButton = new UICocoaButton( UICocoaButton::CancelButton, this);43 m_pButton = new UICocoaButton(this, UICocoaButton::CancelButton); 44 44 connect(m_pButton, SIGNAL(clicked()), 45 45 this, SIGNAL(clicked())); … … 60 60 : QAbstractButton(pParent) 61 61 { 62 m_pButton = new UICocoaButton( UICocoaButton::ResetButton, this);62 m_pButton = new UICocoaButton(this, UICocoaButton::ResetButton); 63 63 connect(m_pButton, SIGNAL(clicked()), 64 64 this, SIGNAL(clicked())); … … 80 80 { 81 81 setShortcut(QKeySequence(QKeySequence::HelpContents)); 82 m_pButton = new UICocoaButton( UICocoaButton::HelpButton, this);82 m_pButton = new UICocoaButton(this, UICocoaButton::HelpButton); 83 83 connect(m_pButton, SIGNAL(clicked()), 84 84 this, SIGNAL(clicked())); … … 91 91 * 92 92 ********************************************************************************/ 93 UIRoundRectSegmentedButton::UIRoundRectSegmentedButton( int cCount, QWidget *pParent /* = 0 */)94 : UICocoaSegmentedButton( cCount, UICocoaSegmentedButton::RoundRectSegment, pParent)95 { 96 } 97 98 UITexturedSegmentedButton::UITexturedSegmentedButton( int cCount, QWidget *pParent /* = 0 */)99 : UICocoaSegmentedButton( cCount, UICocoaSegmentedButton::TexturedRoundedSegment, pParent)93 UIRoundRectSegmentedButton::UIRoundRectSegmentedButton(QWidget *pParent, int cCount) 94 : UICocoaSegmentedButton(pParent, cCount, UICocoaSegmentedButton::RoundRectSegment) 95 { 96 } 97 98 UITexturedSegmentedButton::UITexturedSegmentedButton(QWidget *pParent, int cCount) 99 : UICocoaSegmentedButton(pParent, cCount, UICocoaSegmentedButton::TexturedRoundedSegment) 100 100 { 101 101 } … … 126 126 * 127 127 ********************************************************************************/ 128 UIMiniCancelButton::UIMiniCancelButton(QWidget *pParent /* = 0*/)128 UIMiniCancelButton::UIMiniCancelButton(QWidget *pParent /*= 0*/) 129 129 : QIWithRetranslateUI<QIToolButton>(pParent) 130 130 { … … 146 146 static const int PushButtonBottomOffset = 4; 147 147 148 UIHelpButton::UIHelpButton(QWidget *pParent /* = 0*/)148 UIHelpButton::UIHelpButton(QWidget *pParent /*= 0*/) 149 149 : QIWithRetranslateUI<QPushButton>(pParent) 150 150 { … … 240 240 * 241 241 ********************************************************************************/ 242 UIRoundRectSegmentedButton::UIRoundRectSegmentedButton( int aCount, QWidget *pParent /* = 0 */)242 UIRoundRectSegmentedButton::UIRoundRectSegmentedButton(QWidget *pParent, int aCount) 243 243 : QWidget(pParent) 244 244 { … … 294 294 } 295 295 296 UITexturedSegmentedButton::UITexturedSegmentedButton( int cCount, QWidget *pParent /* = 0 */)297 : UIRoundRectSegmentedButton( cCount, pParent)296 UITexturedSegmentedButton::UITexturedSegmentedButton(QWidget *pParent, int cCount) 297 : UIRoundRectSegmentedButton(pParent, cCount) 298 298 { 299 299 for (int i=0; i < m_pButtons.size(); ++i) … … 309 309 * 310 310 ********************************************************************************/ 311 UISearchField::UISearchField(QWidget *pParent /* = 0 */)311 UISearchField::UISearchField(QWidget *pParent) 312 312 : QLineEdit(pParent) 313 313 { -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.h
r52727 r54055 110 110 111 111 public: 112 UIRoundRectSegmentedButton( int cCount, QWidget *pParent = 0);112 UIRoundRectSegmentedButton(QWidget *pParent, int cCount); 113 113 }; 114 114 … … 118 118 119 119 public: 120 UITexturedSegmentedButton( int cCount, QWidget *pParent = 0);120 UITexturedSegmentedButton(QWidget *pParent, int cCount); 121 121 }; 122 122 … … 131 131 132 132 public: 133 UISearchField(QWidget *pParent = 0);133 UISearchField(QWidget *pParent); 134 134 }; 135 135 … … 227 227 228 228 public: 229 UIRoundRectSegmentedButton( int aCount, QWidget *pParent = 0);229 UIRoundRectSegmentedButton(QWidget *pParent, int aCount); 230 230 ~UIRoundRectSegmentedButton(); 231 231 … … 251 251 252 252 public: 253 UITexturedSegmentedButton( int cCount, QWidget *pParent = 0);253 UITexturedSegmentedButton(QWidget *pParent, int cCount); 254 254 }; 255 255 … … 264 264 265 265 public: 266 UISearchField(QWidget *pParent = 0);266 UISearchField(QWidget *pParent); 267 267 268 268 void markError();
Note:
See TracChangeset
for help on using the changeset viewer.

