- Timestamp:
- Sep 12, 2016 12:47:43 PM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.h
r62493 r63796 72 72 73 73 UICocoaSegmentedButton(QWidget *pParent, int count, CocoaSegmentType type = RoundRectSegment); 74 ~UICocoaSegmentedButton(); 74 75 /** Returns the number of segments. */ 76 int count() const; 77 78 /** Returns whether the @a iSegment is selected. */ 79 bool isSelected(int iSegment) const; 80 81 /** Returns the @a iSegment description. */ 82 QString description(int iSegment) const; 75 83 76 84 QSize sizeHint() const; -
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.mm
r63492 r63796 404 404 } 405 405 406 UICocoaSegmentedButton::~UICocoaSegmentedButton() 407 { 406 int UICocoaSegmentedButton::count() const 407 { 408 return [nativeRef() segmentCount]; 409 } 410 411 bool UICocoaSegmentedButton::isSelected(int iSegment) const 412 { 413 return [nativeRef() isSelectedForSegment: iSegment]; 414 } 415 416 QString UICocoaSegmentedButton::description(int iSegment) const 417 { 418 /* Return segment description if segment index inside the bounds: */ 419 if (iSegment >=0 && iSegment < count()) 420 return ::darwinNSStringToQString([nativeRef() labelForSegment: iSegment]); 421 422 /* Null-string by default: */ 423 return QString(); 408 424 } 409 425
Note:
See TracChangeset
for help on using the changeset viewer.