VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/include/VBoxCocoaSpecialControls.h@ 24493

Last change on this file since 24493 was 24182, checked in by vboxsync, 15 years ago

FE/Qt4: Relayout the progress dialog a bit & make the ETA text more user friendly.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * VBoxCocoaSpecialControls class declaration
5 */
6
7/*
8 * Copyright (C) 2009 Sun Microsystems, Inc.
9 *
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.
17 *
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.
21 */
22
23#ifndef ___darwin_VBoxCocoaSpecialControls_h__
24#define ___darwin_VBoxCocoaSpecialControls_h__
25
26/* VBox includes */
27#include "VBoxCocoaHelper.h"
28
29/* Qt includes */
30#include <QMacCocoaViewContainer>
31
32/* Add typedefs for Cocoa types */
33ADD_COCOA_NATIVE_REF (NSButton);
34ADD_COCOA_NATIVE_REF (NSSegmentedControl);
35ADD_COCOA_NATIVE_REF (NSSearchField);
36
37class VBoxCocoaButton: public QMacCocoaViewContainer
38{
39 Q_OBJECT;
40
41public:
42 enum CocoaButtonType
43 {
44 HelpButton,
45 CancelButton
46 };
47
48 VBoxCocoaButton (CocoaButtonType aType, QWidget *aParent = 0);
49 QSize sizeHint() const;
50
51 void setText (const QString& aText);
52 void setToolTip (const QString& aTip);
53
54 void onClicked();
55
56signals:
57 void clicked (bool checked = false);
58
59private:
60 /* Private member vars */
61 NativeNSButtonRef mNativeRef;
62};
63
64class VBoxCocoaSegmentedButton: public QMacCocoaViewContainer
65{
66 Q_OBJECT;
67
68public:
69 VBoxCocoaSegmentedButton (int aCount, QWidget *aParent = 0);
70 QSize sizeHint() const;
71
72 void setTitle (int aSegment, const QString &aTitle);
73
74 void setToolTip (int aSegment, const QString &aTip);
75
76 void setEnabled (int aSegment, bool fEnabled);
77
78 void animateClick (int aSegment);
79
80 void onClicked (int aSegment);
81
82signals:
83 void clicked (int aSegment, bool aChecked = false);
84
85private:
86 /* Private member vars */
87 NativeNSSegmentedControlRef mNativeRef;
88};
89
90class VBoxCocoaSearchField: public QMacCocoaViewContainer
91{
92 Q_OBJECT;
93
94public:
95 VBoxCocoaSearchField (QWidget* aParent = 0);
96 QSize sizeHint() const;
97
98 QString text() const;
99 void insert (const QString &aText);
100 void setToolTip (const QString &aTip);
101 void selectAll();
102
103 void markError();
104 void unmarkError();
105
106 void onTextChanged (const QString &aText);
107
108signals:
109 void textChanged (const QString& aText);
110
111private:
112 /* Private member vars */
113 NativeNSSearchFieldRef mNativeRef;
114};
115
116#endif /* ___darwin_VBoxCocoaSpecialControls_h__ */
117
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette