~ubuntu-branches/ubuntu/trusty/virtualbox-ose/trusty

« back to all changes in this revision

Viewing changes to src/VBox/Frontends/VirtualBox/src/darwin/VBoxCocoaSpecialControls.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 */
 
33
ADD_COCOA_NATIVE_REF (NSButton);
 
34
ADD_COCOA_NATIVE_REF (NSSegmentedControl);
 
35
ADD_COCOA_NATIVE_REF (NSSearchField);
 
36
 
 
37
class VBoxCocoaButton: public QMacCocoaViewContainer
 
38
{
 
39
    Q_OBJECT;
 
40
 
 
41
public:
 
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
 
 
56
signals:
 
57
    void clicked (bool checked = false);
 
58
 
 
59
private:
 
60
    /* Private member vars */
 
61
    NativeNSButtonRef mNativeRef;
 
62
};
 
63
 
 
64
class VBoxCocoaSegmentedButton: public QMacCocoaViewContainer
 
65
{
 
66
    Q_OBJECT;
 
67
 
 
68
public:
 
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
 
 
82
signals:
 
83
    void clicked (int aSegment, bool aChecked = false);
 
84
 
 
85
private:
 
86
    /* Private member vars */
 
87
    NativeNSSegmentedControlRef mNativeRef;
 
88
};
 
89
 
 
90
class VBoxCocoaSearchField: public QMacCocoaViewContainer
 
91
{
 
92
    Q_OBJECT;
 
93
 
 
94
public:
 
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
 
 
108
signals:
 
109
    void textChanged (const QString& aText);
 
110
 
 
111
private:
 
112
    /* Private member vars */
 
113
    NativeNSSearchFieldRef mNativeRef;
 
114
};
 
115
 
 
116
#endif /* ___darwin_VBoxCocoaSpecialControls_h__ */
 
117