Index: /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerBookmarksPanel.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerBookmarksPanel.h	(revision 71576)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerBookmarksPanel.h	(revision 71577)
@@ -26,5 +26,4 @@
 class QFrame;
 class QIToolButton;
-class UIRoundRectSegmentedButton;
 
 /** UIVMLogViewerPanel extension providing GUI for bookmark management. Show a list of bookmarks currently set
Index: /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.h	(revision 71576)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.h	(revision 71577)
@@ -31,5 +31,4 @@
 class QLabel;
 class QIToolButton;
-class UISearchField;
 class UIVMLogViewerSearchField;
 class UIVMLogViewerWidget;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.h	(revision 71576)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.h	(revision 71577)
@@ -1,9 +1,9 @@
 /* $Id$ */
 /** @file
- * VBox Qt GUI - VBoxCocoaSpecialControls class declaration.
+ * VBox Qt GUI - UICocoaSpecialControls class declaration.
  */
 
 /*
- * Copyright (C) 2009-2017 Oracle Corporation
+ * Copyright (C) 2009-2018 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -16,24 +16,31 @@
  */
 
-#ifndef ___darwin_UICocoaSpecialControls_h__
-#define ___darwin_UICocoaSpecialControls_h__
+#ifndef ___UICocoaSpecialControls_h___
+#define ___UICocoaSpecialControls_h___
 
-/* VBox includes */
+/* Qt includes: */
+#include <QMacCocoaViewContainer>
+#include <QWidget>
+
+/* GUI includes: */
 #include "VBoxCocoaHelper.h"
 
-/* Qt includes */
-#include <QWidget>
-#include <QMacCocoaViewContainer>
+/* Add typedefs for Cocoa types: */
+ADD_COCOA_NATIVE_REF(NSButton);
 
-/* Add typedefs for Cocoa types */
-ADD_COCOA_NATIVE_REF(NSButton);
-ADD_COCOA_NATIVE_REF(NSSegmentedControl);
-ADD_COCOA_NATIVE_REF(NSSearchField);
-
-class UICocoaButton: public QMacCocoaViewContainer
+/** QMacCocoaViewContainer extension,
+  * used as cocoa button container. */
+class UICocoaButton : public QMacCocoaViewContainer
 {
     Q_OBJECT
 
+signals:
+
+    /** Notifies about button click and whether it's @a fChecked. */
+    void clicked(bool fChecked = false);
+
 public:
+
+    /** Cocoa button types. */
     enum CocoaButtonType
     {
@@ -43,88 +50,27 @@
     };
 
-    UICocoaButton(QWidget *pParent, CocoaButtonType type);
+    /** Constructs cocoa button passing @a pParent to the base-class.
+      * @param  enmType  Brings the button type. */
+    UICocoaButton(QWidget *pParent, CocoaButtonType enmType);
+    /** Destructs cocoa button. */
     ~UICocoaButton();
 
+    /** Returns size-hint. */
     QSize sizeHint() const;
 
-    void setText(const QString& strText);
-    void setToolTip(const QString& strTip);
+    /** Defines button @a strText. */
+    void setText(const QString &strText);
+    /** Defines button @a strToolTip. */
+    void setToolTip(const QString &strToolTip);
 
+    /** Handles button click. */
     void onClicked();
 
-signals:
-    void clicked(bool fChecked = false);
+private:
 
-private:
+    /** Returns native cocoa button reference. */
     NativeNSButtonRef nativeRef() const { return static_cast<NativeNSButtonRef>(cocoaView()); }
 };
 
-class UICocoaSegmentedButton: public QMacCocoaViewContainer
-{
-    Q_OBJECT
+#endif /* !___UICocoaSpecialControls_h___ */
 
-public:
-    enum CocoaSegmentType
-    {
-        RoundRectSegment,
-        TexturedRoundedSegment
-    };
-
-    UICocoaSegmentedButton(QWidget *pParent, int count, CocoaSegmentType type = RoundRectSegment);
-
-    /** Returns the number of segments. */
-    int count() const;
-
-    /** Returns whether the @a iSegment is selected. */
-    bool isSelected(int iSegment) const;
-
-    /** Returns the @a iSegment description. */
-    QString description(int iSegment) const;
-
-    QSize sizeHint() const;
-
-    void setTitle(int iSegment, const QString &strTitle);
-    void setToolTip(int iSegment, const QString &strTip);
-    void setIcon(int iSegment, const QIcon& icon);
-    void setEnabled(int iSegment, bool fEnabled);
-
-    void setSelected(int iSegment);
-    void animateClick(int iSegment);
-    void onClicked(int iSegment);
-
-signals:
-    void clicked(int iSegment, bool fChecked = false);
-
-private:
-    NativeNSSegmentedControlRef nativeRef() const { return static_cast<NativeNSSegmentedControlRef>(cocoaView()); }
-};
-
-class UICocoaSearchField: public QMacCocoaViewContainer
-{
-    Q_OBJECT
-
-public:
-    UICocoaSearchField(QWidget* pParent);
-    ~UICocoaSearchField();
-
-    QSize sizeHint() const;
-
-    QString text() const;
-    void insert(const QString &strText);
-    void setToolTip(const QString &strTip);
-    void selectAll();
-
-    void markError();
-    void unmarkError();
-
-    void onTextChanged(const QString &strText);
-
-signals:
-    void textChanged(const QString& strText);
-
-private:
-    NativeNSSearchFieldRef nativeRef() const { return static_cast<NativeNSSearchFieldRef>(cocoaView()); }
-};
-
-#endif /* ___darwin_UICocoaSpecialControls_h__ */
-
Index: /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.mm
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.mm	(revision 71576)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.mm	(revision 71577)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2009-2017 Oracle Corporation
+ * Copyright (C) 2009-2018 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -16,242 +16,59 @@
  */
 
-/* VBox includes */
-#include "UICocoaSpecialControls.h"
-#include "VBoxUtils-darwin.h"
-#include "UIImageTools.h"
-#include <VBox/cdefs.h>
-
-/* System includes */
-#import <AppKit/NSApplication.h>
-#import <AppKit/NSBezierPath.h>
-#import <AppKit/NSButton.h>
-#import <AppKit/NSFont.h>
-#import <AppKit/NSImage.h>
-#import <AppKit/NSSegmentedControl.h>
-#import <AppKit/NSEvent.h>
-#import <AppKit/NSColor.h>
-#import <AppKit/NSSearchFieldCell.h>
-#import <AppKit/NSSearchField.h>
-#import <AppKit/NSSegmentedCell.h>
-
-/* Qt includes */
-#include <QAccessibleWidget>
-#include <QApplication>
-#include <QIcon>
-#include <QKeyEvent>
+/* Qt includes: */
 #include <QMacCocoaViewContainer>
 
-/* Other VBox includes: */
-#include <iprt/assert.h>
+/* GUI includes: */
+#include "VBoxUtils-darwin.h"
+#include "UICocoaSpecialControls.h"
 
-/* Forward declarations: */
-class UIAccessibilityInterfaceForUICocoaSegmentedButton;
+/* System includes: */
+#import <AppKit/NSButton.h>
 
 
-/*
- * Private interfaces
- */
-@interface UIButtonTargetPrivate: NSObject
+/** Private button-target interface. */
+@interface UIButtonTargetPrivate : NSObject
 {
-    UICocoaButton *mRealTarget;
+    UICocoaButton *m_pRealTarget;
 }
-/* The next method used to be called initWithObject, but Xcode 4.1 preview 5
-   cannot cope with that for some reason.  Hope this doesn't break anything... */
--(id)initWithObjectAndLionTrouble:(UICocoaButton*)object;
--(IBAction)clicked:(id)sender;
+// WORKAROUND:
+// The next method used to be called initWithObject, but Xcode 4.1 preview 5
+// cannot cope with that for some reason.  Hope this doesn't break anything.
+-(id)initWithObjectAndLionTrouble:(UICocoaButton*)pObject;
+-(IBAction)clicked:(id)pSender;
 @end
 
-@interface UISegmentedButtonTargetPrivate: NSObject
-{
-    UICocoaSegmentedButton *mRealTarget;
-}
--(id)initWithObject1:(UICocoaSegmentedButton*)object;
--(IBAction)segControlClicked:(id)sender;
-@end
 
-@interface UISearchFieldCellPrivate: NSSearchFieldCell
-{
-    NSColor *mBGColor;
-}
-- (void)setBackgroundColor:(NSColor*)aBGColor;
-@end
+/*********************************************************************************************************************************
+*   Class UIButtonTargetPrivate implementation.                                                                                  *
+*********************************************************************************************************************************/
 
-@interface UISearchFieldPrivate: NSSearchField
-{
-    UICocoaSearchField *mRealTarget;
-}
--(id)initWithObject2:(UICocoaSearchField*)object;
-@end
-
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
-@interface UISearchFieldDelegatePrivate: NSObject<NSTextFieldDelegate>
-#else
-@interface UISearchFieldDelegatePrivate: NSObject
-#endif
-{}
-@end
-
-/*
- * Implementation of the private interfaces
- */
 @implementation UIButtonTargetPrivate
--(id)initWithObjectAndLionTrouble:(UICocoaButton*)object
+-(id)initWithObjectAndLionTrouble:(UICocoaButton*)pObject
 {
     self = [super init];
 
-    mRealTarget = object;
+    m_pRealTarget = pObject;
 
     return self;
 }
 
--(IBAction)clicked:(id)sender
+-(IBAction)clicked:(id)pSender
 {
-    RT_NOREF(sender);
-    mRealTarget->onClicked();
-}
-@end
-
-@implementation UISegmentedButtonTargetPrivate
--(id)initWithObject1:(UICocoaSegmentedButton*)object
-{
-    self = [super init];
-
-    mRealTarget = object;
-
-    return self;
-}
-
--(IBAction)segControlClicked:(id)sender
-{
-    mRealTarget->onClicked([sender selectedSegment]);
-}
-@end
-
-@implementation UISearchFieldCellPrivate
--(id)init
-{
-    if ((self = [super init]))
-        mBGColor = Nil;
-    return self;
-}
-
-- (void)dealloc
-{
-    [mBGColor release];
-    [super dealloc];
-}
-
-- (void)setBackgroundColor:(NSColor*)aBGColor
-{
-    if (mBGColor != aBGColor)
-    {
-        [mBGColor release];
-        mBGColor = [aBGColor retain];
-    }
-}
-
-- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
-{
-    if (mBGColor != Nil)
-    {
-        [mBGColor setFill];
-        NSRect frame = cellFrame;
-        double radius = RT_MIN(NSWidth(frame), NSHeight(frame)) / 2.0;
-        [[NSBezierPath bezierPathWithRoundedRect:frame xRadius:radius yRadius:radius] fill];
-    }
-
-    [super drawInteriorWithFrame:cellFrame inView:controlView];
-}
-@end
-
-@implementation UISearchFieldPrivate
-+ (Class)cellClass
-{
-    return [UISearchFieldCellPrivate class];
-}
-
--(id)initWithObject2:(UICocoaSearchField*)object
-{
-    self = [super init];
-
-    mRealTarget = object;
-
-
-    return self;
-}
-
-- (void)keyUp:(NSEvent *)theEvent
-{
-    /* This here is a little bit hacky. Grab important keys & forward they to
-       the parent Qt widget. There a special key handling is done. */
-    NSString *str = [theEvent charactersIgnoringModifiers];
-    unichar ch = 0;
-
-    /* Get the pressed character */
-    if ([str length] > 0)
-        ch = [str characterAtIndex:0];
-
-    if (ch == NSCarriageReturnCharacter || ch == NSEnterCharacter)
-    {
-        QKeyEvent ke(QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier);
-        QApplication::sendEvent(mRealTarget, &ke);
-    }
-    else if (ch == 27) /* Escape */
-    {
-        QKeyEvent ke(QEvent::KeyPress, Qt::Key_Escape, Qt::NoModifier);
-        QApplication::sendEvent(mRealTarget, &ke);
-    }
-    else if (ch == NSF3FunctionKey)
-    {
-        QKeyEvent ke(QEvent::KeyPress, Qt::Key_F3, [theEvent modifierFlags] & NSShiftKeyMask ? Qt::ShiftModifier : Qt::NoModifier);
-        QApplication::sendEvent(mRealTarget, &ke);
-    }
-
-    [super keyUp:theEvent];
-}
-
-//{
-//    QWidget *w = QApplication::focusWidget();
-//    if (w)
-//        w->clearFocus();
-//}
-
-- (void)textDidChange:(NSNotification *)aNotification
-{
-    mRealTarget->onTextChanged(::darwinNSStringToQString([[aNotification object] string]));
-}
-@end
-
-@implementation UISearchFieldDelegatePrivate
--(BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector
-{
-    RT_NOREF(control, textView);
-//    NSLog(NSStringFromSelector(commandSelector));
-    /* Don't execute the selector for Enter & Escape. */
-    if (   commandSelector == @selector(insertNewline:)
-            || commandSelector == @selector(cancelOperation:))
-                return YES;
-    return NO;
+    Q_UNUSED(pSender);
+    m_pRealTarget->onClicked();
 }
 @end
 
 
-/*
- * Helper functions
- */
-NSRect darwinCenterRectVerticalTo(NSRect aRect, const NSRect& aToRect)
-{
-    aRect.origin.y = (aToRect.size.height - aRect.size.height) / 2.0;
-    return aRect;
-}
+/*********************************************************************************************************************************
+*   Class UICocoaButton implementation.                                                                                          *
+*********************************************************************************************************************************/
 
-/*
- * Public classes
- */
-UICocoaButton::UICocoaButton(QWidget *pParent, CocoaButtonType type)
+UICocoaButton::UICocoaButton(QWidget *pParent, CocoaButtonType enmType)
     : QMacCocoaViewContainer(0, pParent)
 {
     /* Prepare auto-release pool: */
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init];
 
     /* Prepare native button reference: */
@@ -260,5 +77,5 @@
 
     /* Configure button: */
-    switch (type)
+    switch (enmType)
     {
         case HelpButton:
@@ -317,5 +134,5 @@
 
     /* Cleanup auto-release pool: */
-    [pool release];
+    [pPool release];
 }
 
@@ -330,14 +147,14 @@
 }
 
-void UICocoaButton::setText(const QString& strText)
+void UICocoaButton::setText(const QString &strText)
 {
     QString s(strText);
-    /* Set it for accessibility reasons as alternative title */
+    /* Set it for accessibility reasons as alternative title: */
     [nativeRef() setAlternateTitle: ::darwinQStringToNSString(s.remove('&'))];
 }
 
-void UICocoaButton::setToolTip(const QString& strTip)
+void UICocoaButton::setToolTip(const QString &strToolTip)
 {
-    [nativeRef() setToolTip: ::darwinQStringToNSString(strTip)];
+    [nativeRef() setToolTip: ::darwinQStringToNSString(strToolTip)];
 }
 
@@ -347,404 +164,2 @@
 }
 
-
-/** QAccessibleInterface extension used as an accessibility interface for segmented-button segment. */
-class UIAccessibilityInterfaceForUICocoaSegmentedButtonSegment : public QAccessibleInterface
-{
-public:
-
-    /** Constructs an accessibility interface.
-      * @param  pParent  Brings the parent interface we are linked to.
-      * @param  iIndex   Brings the index of segment we are referring to. */
-    UIAccessibilityInterfaceForUICocoaSegmentedButtonSegment(UIAccessibilityInterfaceForUICocoaSegmentedButton *pParent, int iIndex)
-        : m_pParent(pParent)
-        , m_iIndex(iIndex)
-    {}
-
-    /** Returns whether the interface is valid. */
-    virtual bool isValid() const /* override */ { return true; }
-
-    /** Returns the wrapped object. */
-    virtual QObject *object() const /* override */ { return 0; }
-    /** Returns the parent. */
-    virtual QAccessibleInterface *parent() const /* override */;
-
-    /** Returns the number of children. */
-    virtual int childCount() const /* override */ { return 0; }
-    /** Returns the child with the passed @a iIndex. */
-    virtual QAccessibleInterface *child(int /* iIndex */) const /* override */ { return 0; }
-    /** Returns the child at position QPoint(@a x, @a y). */
-    virtual QAccessibleInterface *childAt(int /* x */, int /* y */) const /* override */ { return 0; }
-    /** Returns the index of the passed @a pChild. */
-    virtual int indexOfChild(const QAccessibleInterface * /* pChild */) const /* override */ { return -1; }
-
-    /** Returns the rect. */
-    virtual QRect rect() const /* override */;
-
-    /** Defines a @a strText for the passed @a enmTextRole. */
-    virtual void setText(QAccessible::Text /* enmTextRole */, const QString & /* strText */) /* override */ {}
-    /** Returns a text for the passed @a enmTextRole. */
-    virtual QString text(QAccessible::Text /* enmTextRole */) const /* override */;
-
-    /** Returns the role. */
-    virtual QAccessible::Role role() const /* override */ { return QAccessible::RadioButton; }
-    /** Returns the state. */
-    virtual QAccessible::State state() const /* override */;
-
-private:
-
-    /** Holds the parent interface we are linked to. */
-    UIAccessibilityInterfaceForUICocoaSegmentedButton *m_pParent;
-    /** Holds the index of segment we are referring to. */
-    const int m_iIndex;
-};
-
-
-/** QAccessibleWidget extension used as an accessibility interface for segmented-button. */
-class UIAccessibilityInterfaceForUICocoaSegmentedButton : public QAccessibleWidget
-{
-public:
-
-    /** Returns an accessibility interface for passed @a strClassname and @a pObject. */
-    static QAccessibleInterface *pFactory(const QString &strClassname, QObject *pObject)
-    {
-        /* Creating segmented-button accessibility interface: */
-        if (pObject && strClassname == QLatin1String("UICocoaSegmentedButton"))
-            return new UIAccessibilityInterfaceForUICocoaSegmentedButton(qobject_cast<QWidget*>(pObject));
-
-        /* Null by default: */
-        return 0;
-    }
-
-    /** Constructs an accessibility interface passing @a pWidget to the base-class. */
-    UIAccessibilityInterfaceForUICocoaSegmentedButton(QWidget *pWidget)
-        : QAccessibleWidget(pWidget, QAccessible::ToolBar)
-    {
-        /* Prepare: */
-        prepare();
-    }
-
-    /** Destructs an accessibility interface. */
-    ~UIAccessibilityInterfaceForUICocoaSegmentedButton()
-    {
-        /* Cleanup: */
-        cleanup();
-    }
-
-    /** Returns the number of children. */
-    virtual int childCount() const /* override */ { return m_children.size(); }
-    /** Returns the child with the passed @a iIndex. */
-    virtual QAccessibleInterface *child(int iIndex) const /* override */ { return m_children.at(iIndex); }
-
-    /** Returns corresponding segmented-button. */
-    UICocoaSegmentedButton *button() const { return qobject_cast<UICocoaSegmentedButton*>(widget()); }
-
-private:
-
-    /** Prepares all. */
-    void prepare()
-    {
-        /* Prepare the list of children interfaces: */
-        for (int i = 0; i < button()->count(); ++i)
-            m_children << new UIAccessibilityInterfaceForUICocoaSegmentedButtonSegment(this, i);
-    }
-
-    /** Cleanups all. */
-    void cleanup()
-    {
-        /* Cleanup the list of children interfaces: */
-        qDeleteAll(m_children);
-        m_children.clear();
-    }
-
-    /** Holds the list of children interfaces. */
-    QList<UIAccessibilityInterfaceForUICocoaSegmentedButtonSegment*> m_children;
-};
-
-
-QAccessibleInterface *UIAccessibilityInterfaceForUICocoaSegmentedButtonSegment::parent() const
-{
-    return m_pParent;
-}
-
-QRect UIAccessibilityInterfaceForUICocoaSegmentedButtonSegment::rect() const
-{
-    /// @todo Return the -=real=- segment rectangle.
-    const QRect myRect = m_pParent->rect();
-    return QRect(myRect.x() + myRect.width() / 2 * m_iIndex,
-                 myRect.y(), myRect.width() / 2, myRect.height());
-}
-
-QString UIAccessibilityInterfaceForUICocoaSegmentedButtonSegment::text(QAccessible::Text /* enmTextRole */) const
-{
-    /* Return the segment description: */
-    return m_pParent->button()->description(m_iIndex);
-}
-
-QAccessible::State UIAccessibilityInterfaceForUICocoaSegmentedButtonSegment::state() const
-{
-    /* Compose the segment state: */
-    QAccessible::State state;
-    state.checkable = true;
-    state.checked = m_pParent->button()->isSelected(m_iIndex);
-
-    /* Return the segment state: */
-    return state;
-}
-
-
-UICocoaSegmentedButton::UICocoaSegmentedButton(QWidget *pParent, int count, CocoaSegmentType type /* = RoundRectSegment */)
-    : QMacCocoaViewContainer(0, pParent)
-{
-    /* Install segmented-button accessibility interface factory: */
-    QAccessible::installFactory(UIAccessibilityInterfaceForUICocoaSegmentedButton::pFactory);
-
-    /* Prepare auto-release pool: */
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
-    /* Prepare native segmented-button reference: */
-    NativeNSSegmentedControlRef pNativeRef;
-    NSRect initFrame;
-
-    /* Configure segmented-button: */
-    pNativeRef = [[NSSegmentedControl alloc] init];
-    [pNativeRef setSegmentCount:count];
-    switch (type)
-    {
-        case RoundRectSegment:
-        {
-            [pNativeRef setSegmentStyle: NSSegmentStyleRoundRect];
-            [pNativeRef setFont: [NSFont controlContentFontOfSize:
-                [NSFont systemFontSizeForControlSize: NSSmallControlSize]]];
-            [[pNativeRef cell] setTrackingMode: NSSegmentSwitchTrackingMomentary];
-            break;
-        }
-        case TexturedRoundedSegment:
-        {
-            [pNativeRef setSegmentStyle: NSSegmentStyleTexturedRounded];
-            [pNativeRef setFont: [NSFont controlContentFontOfSize:
-                [NSFont systemFontSizeForControlSize: NSSmallControlSize]]];
-            break;
-        }
-    }
-
-    /* Calculate corresponding size: */
-    [pNativeRef sizeToFit];
-    initFrame = [pNativeRef frame];
-
-    /* Install click listener: */
-    UISegmentedButtonTargetPrivate *bt = [[UISegmentedButtonTargetPrivate alloc] initWithObject1:this];
-    [pNativeRef setTarget:bt];
-    [pNativeRef setAction:@selector(segControlClicked:)];
-
-    /* Put the button to the QCocoaViewContainer: */
-    setCocoaView(pNativeRef);
-    /* Release our reference, since our super class
-     * takes ownership and we don't need it anymore. */
-    [pNativeRef release];
-
-    /* Finally resize the widget: */
-    setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
-    setFixedSize(NSWidth(initFrame), NSHeight(initFrame));
-
-    /* Cleanup auto-release pool: */
-    [pool release];
-}
-
-int UICocoaSegmentedButton::count() const
-{
-    return [nativeRef() segmentCount];
-}
-
-bool UICocoaSegmentedButton::isSelected(int iSegment) const
-{
-    /* Return whether the segment is selected if segment index inside the bounds: */
-    if (iSegment >=0 && iSegment < count())
-        return [nativeRef() isSelectedForSegment: iSegment];
-
-    /* False by default: */
-    return false;
-}
-
-QString UICocoaSegmentedButton::description(int iSegment) const
-{
-    /* Return segment description if segment index inside the bounds: */
-    if (iSegment >=0 && iSegment < count())
-        return ::darwinNSStringToQString([nativeRef() labelForSegment: iSegment]);
-
-    /* Null-string by default: */
-    return QString();
-}
-
-QSize UICocoaSegmentedButton::sizeHint() const
-{
-    NSRect frame = [nativeRef() frame];
-    return QSize(frame.size.width, frame.size.height);
-}
-
-void UICocoaSegmentedButton::setTitle(int iSegment, const QString &strTitle)
-{
-    QString s(strTitle);
-    [nativeRef() setLabel: ::darwinQStringToNSString(s.remove('&')) forSegment: iSegment];
-    [nativeRef() sizeToFit];
-    NSRect frame = [nativeRef() frame];
-    setFixedSize(NSWidth(frame), NSHeight(frame));
-}
-
-void UICocoaSegmentedButton::setToolTip(int iSegment, const QString &strTip)
-{
-    [[nativeRef() cell] setToolTip: ::darwinQStringToNSString(strTip) forSegment: iSegment];
-}
-
-void UICocoaSegmentedButton::setIcon(int iSegment, const QIcon& icon)
-{
-    QImage image = toGray(icon.pixmap(icon.availableSizes().value(0, QSize(16, 16))).toImage());
-
-    NSImage *pNSimage = [::darwinToNSImageRef(&image) autorelease];
-    [nativeRef() setImage: pNSimage forSegment: iSegment];
-    [nativeRef() sizeToFit];
-    NSRect frame = [nativeRef() frame];
-    setFixedSize(NSWidth(frame), NSHeight(frame));
-}
-
-void UICocoaSegmentedButton::setEnabled(int iSegment, bool fEnabled)
-{
-    [[nativeRef() cell] setEnabled: fEnabled forSegment: iSegment];
-}
-
-void UICocoaSegmentedButton::setSelected(int iSegment)
-{
-    [nativeRef() setSelectedSegment: iSegment];
-}
-
-void UICocoaSegmentedButton::animateClick(int iSegment)
-{
-    [nativeRef() setSelectedSegment: iSegment];
-    [[nativeRef() cell] performClick: nativeRef()];
-}
-
-void UICocoaSegmentedButton::onClicked(int iSegment)
-{
-    emit clicked(iSegment, false);
-}
-
-
-/** QAccessibleWidget extension used as an accessibility interface for search-field. */
-class UIAccessibilityInterfaceForUICocoaSearchField : public QAccessibleWidget
-{
-public:
-
-    /** Returns an accessibility interface for passed @a strClassname and @a pObject. */
-    static QAccessibleInterface *pFactory(const QString &strClassname, QObject *pObject)
-    {
-        /* Creating segmented-button accessibility interface: */
-        if (pObject && strClassname == QLatin1String("UICocoaSearchField"))
-            return new UIAccessibilityInterfaceForUICocoaSearchField(qobject_cast<QWidget*>(pObject));
-
-        /* Null by default: */
-        return 0;
-    }
-
-    /** Constructs an accessibility interface passing @a pWidget to the base-class. */
-    UIAccessibilityInterfaceForUICocoaSearchField(QWidget *pWidget)
-        : QAccessibleWidget(pWidget, QAccessible::EditableText)
-    {
-        // For now this class doesn't implement interface casting.
-        // Which means there will be no editable text accessible
-        // in basic accessibility layer, only in advanced one.
-    }
-
-private:
-
-    /** Returns corresponding search-field. */
-    UICocoaSearchField *field() const { return qobject_cast<UICocoaSearchField*>(widget()); }
-};
-
-
-UICocoaSearchField::UICocoaSearchField(QWidget *pParent)
-    : QMacCocoaViewContainer(0, pParent)
-{
-    /* Install segmented-button accessibility interface factory: */
-    QAccessible::installFactory(UIAccessibilityInterfaceForUICocoaSearchField::pFactory);
-
-    /* Prepare auto-release pool: */
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
-    /* Prepare native search-field reference: */
-    NativeNSSearchFieldRef pNativeRef;
-    NSRect initFrame;
-
-    /* Configure search-field: */
-    pNativeRef = [[UISearchFieldPrivate alloc] initWithObject2: this];
-    [pNativeRef setFont: [NSFont controlContentFontOfSize:
-        [NSFont systemFontSizeForControlSize: NSMiniControlSize]]];
-    [[pNativeRef cell] setControlSize: NSMiniControlSize];
-    [pNativeRef sizeToFit];
-    initFrame = [pNativeRef frame];
-    initFrame.size.width = 180;
-    [pNativeRef setFrame: initFrame];
-
-    /* Use our own delegate: */
-    UISearchFieldDelegatePrivate *sfd = [[UISearchFieldDelegatePrivate alloc] init];
-    [pNativeRef setDelegate: sfd];
-
-    /* Put the button to the QCocoaViewContainer: */
-    setCocoaView(pNativeRef);
-    /* Release our reference, since our super class
-     * takes ownership and we don't need it anymore. */
-    [pNativeRef release];
-
-    /* Finally resize the widget: */
-    setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
-    setMinimumWidth(NSWidth(initFrame));
-    setFixedHeight(NSHeight(initFrame));
-    setFocusPolicy(Qt::StrongFocus);
-
-    /* Cleanup auto-release pool: */
-    [pool release];
-}
-
-UICocoaSearchField::~UICocoaSearchField()
-{
-}
-
-QSize UICocoaSearchField::sizeHint() const
-{
-    NSRect frame = [nativeRef() frame];
-    return QSize(frame.size.width, frame.size.height);
-}
-
-QString UICocoaSearchField::text() const
-{
-    return ::darwinNSStringToQString([nativeRef() stringValue]);
-}
-
-void UICocoaSearchField::insert(const QString &strText)
-{
-    [[nativeRef() currentEditor] setString: [[nativeRef() stringValue] stringByAppendingString: ::darwinQStringToNSString(strText)]];
-}
-
-void UICocoaSearchField::setToolTip(const QString &strTip)
-{
-    [nativeRef() setToolTip: ::darwinQStringToNSString(strTip)];
-}
-
-void UICocoaSearchField::selectAll()
-{
-    [nativeRef() selectText: nativeRef()];
-}
-
-void UICocoaSearchField::markError()
-{
-    [[nativeRef() cell] setBackgroundColor: [[NSColor redColor] colorWithAlphaComponent: 0.3]];
-}
-
-void UICocoaSearchField::unmarkError()
-{
-    [[nativeRef() cell] setBackgroundColor: nil];
-}
-
-void UICocoaSearchField::onTextChanged(const QString &strText)
-{
-    emit textChanged(strText);
-}
-
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.cpp	(revision 71576)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.cpp	(revision 71577)
@@ -1,9 +1,9 @@
 /* $Id$ */
 /** @file
- * VBox Qt GUI - VBoxSpecialButtons implementation.
+ * VBox Qt GUI - UISpecialControls implementation.
  */
 
 /*
- * Copyright (C) 2009-2017 Oracle Corporation
+ * Copyright (C) 2009-2018 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -20,10 +20,16 @@
 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
-/* VBox includes */
+/* Qt includes: */
+# include <QHBoxLayout>
+# ifndef VBOX_DARWIN_USE_NATIVE_CONTROLS
+#  include <QBitmap>
+#  include <QMouseEvent>
+#  include <QPainter>
+#  include <QSignalMapper>
+# endif
+
+/* GUI includes: */
 # include "UIIconPool.h"
 # include "UISpecialControls.h"
-
-/* Global includes */
-# include <QHBoxLayout>
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
@@ -32,100 +38,47 @@
 #ifdef VBOX_DARWIN_USE_NATIVE_CONTROLS
 
-/********************************************************************************
- *
- * A mini cancel button in the native Cocoa version.
- *
- ********************************************************************************/
+
+/*********************************************************************************************************************************
+*   Class UIMiniCancelButton implementation.                                                                                     *
+*********************************************************************************************************************************/
+
 UIMiniCancelButton::UIMiniCancelButton(QWidget *pParent /* = 0 */)
-  : QAbstractButton(pParent)
+    : QAbstractButton(pParent)
 {
     setShortcut(QKeySequence(Qt::Key_Escape));
     m_pButton = new UICocoaButton(this, UICocoaButton::CancelButton);
-    connect(m_pButton, SIGNAL(clicked()),
-            this, SIGNAL(clicked()));
+    connect(m_pButton, SIGNAL(clicked()), this, SIGNAL(clicked()));
     setFixedSize(m_pButton->size());
 }
 
-void UIMiniCancelButton::resizeEvent(QResizeEvent * /* pEvent */)
+void UIMiniCancelButton::resizeEvent(QResizeEvent *)
 {
     m_pButton->resize(size());
 }
 
-/********************************************************************************
- *
- * A rest button in the native Cocoa version.
- *
- ********************************************************************************/
-UIResetButton::UIResetButton(QWidget *pParent /* = 0 */)
-  : QAbstractButton(pParent)
+
+/*********************************************************************************************************************************
+*   Class UIHelpButton implementation.                                                                                           *
+*********************************************************************************************************************************/
+
+UIHelpButton::UIHelpButton(QWidget *pParent /* = 0 */)
+    : QPushButton(pParent)
 {
-    m_pButton = new UICocoaButton(this, UICocoaButton::ResetButton);
-    connect(m_pButton, SIGNAL(clicked()),
-            this, SIGNAL(clicked()));
+    setShortcut(QKeySequence(QKeySequence::HelpContents));
+    m_pButton = new UICocoaButton(this, UICocoaButton::HelpButton);
+    connect(m_pButton, SIGNAL(clicked()), this, SIGNAL(clicked()));
     setFixedSize(m_pButton->size());
 }
 
-void UIResetButton::resizeEvent(QResizeEvent * /* pEvent */)
-{
-    m_pButton->resize(size());
-}
 
-/********************************************************************************
- *
- * A help button in the native Cocoa version.
- *
- ********************************************************************************/
-UIHelpButton::UIHelpButton(QWidget *pParent /* = 0 */)
-  : QPushButton(pParent)
-{
-    setShortcut(QKeySequence(QKeySequence::HelpContents));
-    m_pButton = new UICocoaButton(this, UICocoaButton::HelpButton);
-    connect(m_pButton, SIGNAL(clicked()),
-            this, SIGNAL(clicked()));
-    setFixedSize(m_pButton->size());
-}
+#else /* !VBOX_DARWIN_USE_NATIVE_CONTROLS */
 
-/********************************************************************************
- *
- * A segmented button in the native Cocoa version.
- *
- ********************************************************************************/
-UIRoundRectSegmentedButton::UIRoundRectSegmentedButton(QWidget *pParent, int cCount)
-  : UICocoaSegmentedButton(pParent, cCount, UICocoaSegmentedButton::RoundRectSegment)
-{
-}
 
-UITexturedSegmentedButton::UITexturedSegmentedButton(QWidget *pParent, int cCount)
-  : UICocoaSegmentedButton(pParent, cCount, UICocoaSegmentedButton::TexturedRoundedSegment)
-{
-}
+/*********************************************************************************************************************************
+*   Class UIMiniCancelButton implementation.                                                                                     *
+*********************************************************************************************************************************/
 
-/********************************************************************************
- *
- * A search field in the native Cocoa version.
- *
- ********************************************************************************/
-UISearchField::UISearchField(QWidget *pParent /* = 0 */)
-  : UICocoaSearchField(pParent)
-{
-}
-
-#else /* VBOX_DARWIN_USE_NATIVE_CONTROLS */
-
-# ifndef VBOX_WITH_PRECOMPILED_HEADERS
-/* Qt includes */
-#  include <QPainter>
-#  include <QBitmap>
-#  include <QMouseEvent>
-#  include <QSignalMapper>
-# endif
-
-/********************************************************************************
- *
- * A mini cancel button for the other OS's.
- *
- ********************************************************************************/
 UIMiniCancelButton::UIMiniCancelButton(QWidget *pParent /* = 0 */)
-  : QIWithRetranslateUI<QIToolButton>(pParent)
+    : QIWithRetranslateUI<QIToolButton>(pParent)
 {
     setAutoRaise(true);
@@ -135,9 +88,9 @@
 }
 
-/********************************************************************************
- *
- * A help button for the other OS's.
- *
- ********************************************************************************/
+
+/*********************************************************************************************************************************
+*   Class UIHelpButton implementation.                                                                                           *
+*********************************************************************************************************************************/
+
 /* From: src/gui/styles/qmacstyle_mac.cpp */
 static const int PushButtonLeftOffset = 6;
@@ -149,5 +102,5 @@
     : QIWithRetranslateUI<QPushButton>(pParent)
 {
-#ifdef VBOX_WS_MAC
+# ifdef VBOX_WS_MAC
     m_pButtonPressed = false;
     m_pNormalPixmap = new QPixmap(":/help_button_normal_mac_22px.png");
@@ -159,6 +112,7 @@
                     m_size.width(),
                     m_size.height());
-#endif /* VBOX_WS_MAC */
-    /* Applying language settings */
+# endif /* VBOX_WS_MAC */
+
+    /* Apply language settings: */
     retranslateUi();
 }
@@ -166,4 +120,5 @@
 void UIHelpButton::initFrom(QPushButton *pOther)
 {
+    /* Copy settings from pOther: */
     setIcon(pOther->icon());
     setText(pOther->text());
@@ -172,5 +127,6 @@
     setAutoDefault(pOther->autoDefault());
     setDefault(pOther->isDefault());
-    /* Applying language settings */
+
+    /* Apply language settings: */
     retranslateUi();
 }
@@ -183,5 +139,5 @@
 }
 
-#ifdef VBOX_WS_MAC
+# ifdef VBOX_WS_MAC
 UIHelpButton::~UIHelpButton()
 {
@@ -197,5 +153,5 @@
 }
 
-void UIHelpButton::paintEvent(QPaintEvent * /* pEvent */)
+void UIHelpButton::paintEvent(QPaintEvent *)
 {
     QPainter painter(this);
@@ -203,9 +159,9 @@
 }
 
-bool UIHelpButton::hitButton(const QPoint &pos) const
+bool UIHelpButton::hitButton(const QPoint &position) const
 {
-    if (m_BRect.contains(pos))
-        return m_pMask->pixel(pos.x() - PushButtonLeftOffset,
-                              pos.y() - PushButtonTopOffset) == 0xff000000;
+    if (m_BRect.contains(position))
+        return m_pMask->pixel(position.x() - PushButtonLeftOffset,
+                              position.y() - PushButtonTopOffset) == 0xff000000;
     else
         return false;
@@ -227,5 +183,5 @@
 }
 
-void UIHelpButton::leaveEvent(QEvent * pEvent)
+void UIHelpButton::leaveEvent(QEvent *pEvent)
 {
     QPushButton::leaveEvent(pEvent);
@@ -233,113 +189,7 @@
     update();
 }
-#endif /* VBOX_WS_MAC */
+# endif /* VBOX_WS_MAC */
 
-/********************************************************************************
- *
- * A segmented button for the other OS's.
- *
- ********************************************************************************/
-UIRoundRectSegmentedButton::UIRoundRectSegmentedButton(QWidget *pParent, int aCount)
-  : QWidget(pParent)
-{
-    m_pSignalMapper = new QSignalMapper(this);
 
-    QHBoxLayout *layout = new QHBoxLayout(this);
-    layout->setContentsMargins(0, 0, 0, 0);
-    for (int i=0; i < aCount; ++i)
-    {
-        QIToolButton *button = new QIToolButton(this);
-        button->setAutoRaise(true);
-        button->setFocusPolicy(Qt::TabFocus);
-        button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
-        m_pButtons.append(button);
-        layout->addWidget(button);
-        connect(button, SIGNAL(clicked()),
-                m_pSignalMapper, SLOT(map()));
-        m_pSignalMapper->setMapping(button, i);
-    }
-    connect(m_pSignalMapper, SIGNAL(mapped(int)),
-            this, SIGNAL(clicked(int)));
+#endif /* !VBOX_DARWIN_USE_NATIVE_CONTROLS */
 
-}
-
-UIRoundRectSegmentedButton::~UIRoundRectSegmentedButton()
-{
-    delete m_pSignalMapper;
-    qDeleteAll(m_pButtons);
-}
-
-int UIRoundRectSegmentedButton::count() const
-{
-    return m_pButtons.size();
-}
-
-void UIRoundRectSegmentedButton::setTitle(int iSegment, const QString &aTitle)
-{
-    m_pButtons.at(iSegment)->setText(aTitle);
-}
-
-void UIRoundRectSegmentedButton::setToolTip(int iSegment, const QString &strTip)
-{
-    m_pButtons.at(iSegment)->setToolTip(strTip);
-}
-
-void UIRoundRectSegmentedButton::setIcon(int iSegment, const QIcon &icon)
-{
-    m_pButtons.at(iSegment)->setIcon(icon);
-}
-
-void UIRoundRectSegmentedButton::setEnabled(int iSegment, bool fEnabled)
-{
-    m_pButtons.at(iSegment)->setEnabled(fEnabled);
-}
-
-void UIRoundRectSegmentedButton::setSelected(int iSegment)
-{
-    m_pButtons.at(iSegment)->setChecked(true);
-}
-
-void UIRoundRectSegmentedButton::animateClick(int iSegment)
-{
-    m_pButtons.at(iSegment)->animateClick();
-}
-
-UITexturedSegmentedButton::UITexturedSegmentedButton(QWidget *pParent, int cCount)
-  : UIRoundRectSegmentedButton(pParent, cCount)
-{
-    for (int i=0; i < m_pButtons.size(); ++i)
-    {
-        m_pButtons.at(i)->setAutoExclusive(true);
-        m_pButtons.at(i)->setCheckable(true);
-    }
-}
-
-/********************************************************************************
- *
- * A search field  for the other OS's.
- *
- ********************************************************************************/
-UISearchField::UISearchField(QWidget *pParent)
-  : QLineEdit(pParent)
-{
-    m_baseBrush = palette().base();
-}
-
-void UISearchField::markError()
-{
-    QPalette pal = palette();
-    QColor c(Qt::red);
-    c.setAlphaF(0.3);
-    pal.setBrush(QPalette::Base, c);
-    setPalette(pal);
-}
-
-void UISearchField::unmarkError()
-{
-    QPalette pal = palette();
-    pal.setBrush(QPalette::Base, m_baseBrush);
-    setPalette(pal);
-}
-
-#endif /* VBOX_DARWIN_USE_NATIVE_CONTROLS */
-
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.h	(revision 71576)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.h	(revision 71577)
@@ -1,9 +1,9 @@
 /* $Id$ */
 /** @file
- * VBox Qt GUI - VBoxSpecialButtons declarations.
+ * VBox Qt GUI - UISpecialControls declarations.
  */
 
 /*
- * Copyright (C) 2009-2017 Oracle Corporation
+ * Copyright (C) 2009-2018 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -19,265 +19,167 @@
 #define ___VBoxSpecialControls_h__
 
-/* VBox includes */
+/* Qt includes: */
+#include <QPushButton>
+#ifndef VBOX_DARWIN_USE_NATIVE_CONTROLS
+# include <QLineEdit>
+#endif
+
+/* GUI includes: */
 #include "QIWithRetranslateUI.h"
+#ifdef VBOX_DARWIN_USE_NATIVE_CONTROLS
+# include "UICocoaSpecialControls.h"
+#else
+# include "QIToolButton.h"
+#endif
 
-/* Qt includes */
-#include <QPushButton>
+/* Forward declarations: */
+#ifdef VBOX_DARWIN_USE_NATIVE_CONTROLS
+class UICocoaButton;
+#endif
+
 
 #ifdef VBOX_DARWIN_USE_NATIVE_CONTROLS
 
-/* VBox includes */
-#include "UICocoaSpecialControls.h"
-
-/********************************************************************************
- *
- * A mini cancel button in the native Cocoa version.
- *
- ********************************************************************************/
-class UIMiniCancelButton: public QAbstractButton
+/** QAbstractButton subclass, used as mini cancel button. */
+class UIMiniCancelButton : public QAbstractButton
 {
     Q_OBJECT;
 
 public:
+
+    /** Constructs mini cancel-button passing @a pParent to the base-class. */
     UIMiniCancelButton(QWidget *pParent = 0);
 
+    /** Defines button @a strText. */
     void setText(const QString &strText) { m_pButton->setText(strText); }
-    void setToolTip(const QString &strTip) { m_pButton->setToolTip(strTip); }
+    /** Defines button @a strToolTip. */
+    void setToolTip(const QString &strToolTip) { m_pButton->setToolTip(strToolTip); }
+    /** Removes button border. */
     void removeBorder() {}
 
 protected:
-    void paintEvent(QPaintEvent * /* pEvent */) {}
-    void resizeEvent(QResizeEvent *pEvent);
+
+    /** Handles paint @a pEvent. */
+    virtual void paintEvent(QPaintEvent *pEvent) /* override */ { Q_UNUSED(pEvent); }
+    /** Handles resize @a pEvent. */
+    virtual void resizeEvent(QResizeEvent *pEvent) /* override */;
 
 private:
+
+    /** Holds the wrapped cocoa button instance. */
     UICocoaButton *m_pButton;
 };
 
-/********************************************************************************
- *
- * A reset button in the native Cocoa version.
- *
- ********************************************************************************/
-class UIResetButton: public QAbstractButton
+
+/** QAbstractButton subclass, used as mini cancel button. */
+class UIHelpButton : public QPushButton
 {
     Q_OBJECT;
 
 public:
-    UIResetButton(QWidget *pParent = 0);
 
-    void setText(const QString &strText) { m_pButton->setText(strText); }
-    void setToolTip(const QString &strTip) { m_pButton->setToolTip(strTip); }
-    void removeBorder() {}
+    /** Constructs help-button passing @a pParent to the base-class. */
+    UIHelpButton(QWidget *pParent = 0);
+
+    /** Defines button @a strToolTip. */
+    void setToolTip(const QString &strToolTip) { m_pButton->setToolTip(strToolTip); }
+
+    /** Inits this button from pOther. */
+    void initFrom(QPushButton *pOther) { Q_UNUSED(pOther); }
 
 protected:
-    void paintEvent(QPaintEvent * /* pEvent */) {}
-    void resizeEvent(QResizeEvent *pEvent);
+
+    /** Handles paint @a pEvent. */
+    virtual void paintEvent(QPaintEvent *pEvent) /* override */ { Q_UNUSED(pEvent); }
 
 private:
+
+    /** Holds the wrapped cocoa button instance. */
     UICocoaButton *m_pButton;
 };
 
-/********************************************************************************
- *
- * A help button in the native Cocoa version.
- *
- ********************************************************************************/
-class UIHelpButton: public QPushButton
+#else /* !VBOX_DARWIN_USE_NATIVE_CONTROLS */
+
+/** QAbstractButton subclass, used as mini cancel button. */
+class UIMiniCancelButton : public QIWithRetranslateUI<QIToolButton>
 {
     Q_OBJECT;
 
 public:
-    UIHelpButton(QWidget *pParent = 0);
 
-    void setToolTip(const QString &strTip) { m_pButton->setToolTip(strTip); }
-
-    void initFrom(QPushButton * /* pOther */) {}
+    /** Constructs mini cancel-button passing @a pParent to the base-class. */
+    UIMiniCancelButton(QWidget *pParent = 0);
 
 protected:
-    void paintEvent(QPaintEvent * /* pEvent */) {}
 
-private:
-    UICocoaButton *m_pButton;
+    /** Handles translation event. */
+    virtual void retranslateUi() /* override */ {};
 };
 
-/********************************************************************************
- *
- * A segmented button in the native Cocoa version.
- *
- ********************************************************************************/
-class UIRoundRectSegmentedButton: public UICocoaSegmentedButton
+
+/** QAbstractButton subclass, used as mini cancel button. */
+class UIHelpButton : public QIWithRetranslateUI<QPushButton>
 {
     Q_OBJECT;
 
 public:
-    UIRoundRectSegmentedButton(QWidget *pParent, int cCount);
-};
 
-class UITexturedSegmentedButton: public UICocoaSegmentedButton
-{
-    Q_OBJECT;
+    /** Constructs help-button passing @a pParent to the base-class. */
+    UIHelpButton(QWidget *pParent = 0);
 
-public:
-    UITexturedSegmentedButton(QWidget *pParent, int cCount);
-};
+# ifdef VBOX_WS_MAC
+    /** Destructs help-button. */
+    ~UIHelpButton();
 
-/********************************************************************************
- *
- * A search field in the native Cocoa version.
- *
- ********************************************************************************/
-class UISearchField: public UICocoaSearchField
-{
-    Q_OBJECT;
+    /** Returns size-hint. */
+    QSize sizeHint() const;
+# endif /* VBOX_WS_MAC */
 
-public:
-    UISearchField(QWidget *pParent);
-};
-
-#else /* VBOX_DARWIN_USE_NATIVE_CONTROLS */
-
-/* VBox includes */
-#include "QIToolButton.h"
-
-/* Qt includes */
-#include <QLineEdit>
-
-/* Qt forward declarations */
-class QSignalMapper;
-
-/********************************************************************************
- *
- * A mini cancel button for the other OS's.
- *
- ********************************************************************************/
-class UIMiniCancelButton: public QIWithRetranslateUI<QIToolButton>
-{
-    Q_OBJECT;
-
-public:
-    UIMiniCancelButton(QWidget *pParent = 0);
-
-protected:
-    void retranslateUi() {};
-};
-
-/********************************************************************************
- *
- * A reset button for the other OS's (same as the cancel button for now)
- *
- ********************************************************************************/
-class UIResetButton: public UIMiniCancelButton
-{
-    Q_OBJECT;
-
-public:
-    UIResetButton(QWidget *pParent = 0)
-      : UIMiniCancelButton(pParent) {}
-};
-
-/********************************************************************************
- *
- * A help button for the other OS's.
- *
- ********************************************************************************/
-class UIHelpButton: public QIWithRetranslateUI<QPushButton>
-{
-    Q_OBJECT;
-
-public:
-    UIHelpButton(QWidget *pParent = 0);
-#ifdef VBOX_WS_MAC
-    ~UIHelpButton();
-    QSize sizeHint() const;
-#endif /* VBOX_WS_MAC */
-
+    /** Inits this button from pOther. */
     void initFrom(QPushButton *pOther);
 
 protected:
+
+    /** Handles translation event. */
     void retranslateUi();
 
-#ifdef VBOX_WS_MAC
-    void paintEvent(QPaintEvent *pEvent);
+# ifdef VBOX_WS_MAC
+    /** Handles button hit as certain @a position. */
+    bool hitButton(const QPoint &position) const;
 
-    bool hitButton(const QPoint &pos) const;
+    /** Handles paint @a pEvent. */
+    virtual void paintEvent(QPaintEvent *pEvent) /* override */;
 
-    void mousePressEvent(QMouseEvent *pEvent);
-    void mouseReleaseEvent(QMouseEvent *pEvent);
-    void leaveEvent(QEvent *pEvent);
+    /** Handles mouse-press @a pEvent. */
+    virtual void mousePressEvent(QMouseEvent *pEvent) /* override */;
+    /** Handles mouse-release @a pEvent. */
+    virtual void mouseReleaseEvent(QMouseEvent *pEvent) /* override */;
+    /** Handles mouse-leave @a pEvent. */
+    virtual void leaveEvent(QEvent *pEvent) /* override */;
 
 private:
-    /* Private member vars */
+
+    /** Holds the pressed button instance. */
     bool m_pButtonPressed;
 
+    /** Holds the button size. */
     QSize m_size;
+
+    /** Holds the normal pixmap instance. */
     QPixmap *m_pNormalPixmap;
+    /** Holds the pressed pixmap instance. */
     QPixmap *m_pPressedPixmap;
+
+    /** Holds the button mask instance. */
     QImage *m_pMask;
+
+    /** Holds the button rect. */
     QRect m_BRect;
-#endif /* VBOX_WS_MAC */
+# endif /* VBOX_WS_MAC */
 };
 
-/********************************************************************************
- *
- * A segmented button for the other OS's.
- *
- ********************************************************************************/
-class UIRoundRectSegmentedButton: public QWidget
-{
-    Q_OBJECT;
+#endif /* !VBOX_DARWIN_USE_NATIVE_CONTROLS */
 
-public:
-    UIRoundRectSegmentedButton(QWidget *pParent, int aCount);
-    ~UIRoundRectSegmentedButton();
 
-    int count() const;
+#endif /* !___UISpecialControls_h___ */
 
-    void setTitle(int iSegment, const QString &aTitle);
-    void setToolTip(int iSegment, const QString &strTip);
-    void setIcon(int iSegment, const QIcon &icon);
-    void setEnabled(int iSegment, bool fEnabled);
-
-    void setSelected(int iSegment);
-    void animateClick(int iSegment);
-
-signals:
-    void clicked(int iSegment);
-
-protected:
-    /* Protected member vars */
-    QList<QIToolButton*> m_pButtons;
-    QSignalMapper *m_pSignalMapper;
-};
-
-class UITexturedSegmentedButton: public UIRoundRectSegmentedButton
-{
-    Q_OBJECT;
-
-public:
-    UITexturedSegmentedButton(QWidget *pParent, int cCount);
-};
-
-/********************************************************************************
- *
- * A search field  for the other OS's.
- *
- ********************************************************************************/
-class UISearchField: public QLineEdit
-{
-    Q_OBJECT;
-
-public:
-    UISearchField(QWidget *pParent);
-
-    void markError();
-    void unmarkError();
-
-private:
-    /* Private member vars */
-    QBrush m_baseBrush;
-};
-
-#endif /* VBOX_DARWIN_USE_NATIVE_CONTROLS */
-
-#endif /* ___VBoxSpecialControls_h__ */
-
