3
* VBox frontends: Qt GUI ("VirtualBox"):
4
* VBoxCocoaSpecialControls class declaration
8
* Copyright (C) 2009 Sun Microsystems, Inc.
10
* This file is part of VirtualBox Open Source Edition (OSE), as
11
* available from http://www.virtualbox.org. This file is free software;
12
* you can redistribute it and/or modify it under the terms of the GNU
13
* General Public License (GPL) as published by the Free Software
14
* Foundation, in version 2 as it comes in the "COPYING" file of the
15
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19
* Clara, CA 95054 USA or visit http://www.sun.com if you need
20
* additional information or have any questions.
23
#ifndef ___darwin_VBoxCocoaSpecialControls_h__
24
#define ___darwin_VBoxCocoaSpecialControls_h__
27
#include "VBoxCocoaHelper.h"
30
#include <QMacCocoaViewContainer>
32
/* Add typedefs for Cocoa types */
33
ADD_COCOA_NATIVE_REF (NSButton);
34
ADD_COCOA_NATIVE_REF (NSSegmentedControl);
35
ADD_COCOA_NATIVE_REF (NSSearchField);
37
class VBoxCocoaButton: public QMacCocoaViewContainer
48
VBoxCocoaButton (CocoaButtonType aType, QWidget *aParent = 0);
49
QSize sizeHint() const;
51
void setText (const QString& aText);
52
void setToolTip (const QString& aTip);
57
void clicked (bool checked = false);
60
/* Private member vars */
61
NativeNSButtonRef mNativeRef;
64
class VBoxCocoaSegmentedButton: public QMacCocoaViewContainer
69
VBoxCocoaSegmentedButton (int aCount, QWidget *aParent = 0);
70
QSize sizeHint() const;
72
void setTitle (int aSegment, const QString &aTitle);
74
void setToolTip (int aSegment, const QString &aTip);
76
void setEnabled (int aSegment, bool fEnabled);
78
void animateClick (int aSegment);
80
void onClicked (int aSegment);
83
void clicked (int aSegment, bool aChecked = false);
86
/* Private member vars */
87
NativeNSSegmentedControlRef mNativeRef;
90
class VBoxCocoaSearchField: public QMacCocoaViewContainer
95
VBoxCocoaSearchField (QWidget* aParent = 0);
96
QSize sizeHint() const;
99
void insert (const QString &aText);
100
void setToolTip (const QString &aTip);
106
void onTextChanged (const QString &aText);
109
void textChanged (const QString& aText);
112
/* Private member vars */
113
NativeNSSearchFieldRef mNativeRef;
116
#endif /* ___darwin_VBoxCocoaSpecialControls_h__ */