~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/corelib/global/qnamespace.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/****************************************************************************
2
2
**
3
3
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
 
4
** All rights reserved.
4
5
** Contact: Nokia Corporation (qt-info@nokia.com)
5
6
**
6
7
** This file is part of the QtCore module of the Qt Toolkit.
7
8
**
8
9
** $QT_BEGIN_LICENSE:LGPL$
9
 
** Commercial Usage
10
 
** Licensees holding valid Qt Commercial licenses may use this file in
11
 
** accordance with the Qt Commercial License Agreement provided with the
12
 
** Software or, alternatively, in accordance with the terms contained in
13
 
** a written agreement between you and Nokia.
 
10
** No Commercial Usage
 
11
** This file contains pre-release code and may not be distributed.
 
12
** You may use this file in accordance with the terms and conditions
 
13
** contained in the Technology Preview License Agreement accompanying
 
14
** this package.
14
15
**
15
16
** GNU Lesser General Public License Usage
16
17
** Alternatively, this file may be used under the terms of the GNU Lesser
20
21
** ensure the GNU Lesser General Public License version 2.1 requirements
21
22
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22
23
**
23
 
** In addition, as a special exception, Nokia gives you certain
24
 
** additional rights. These rights are described in the Nokia Qt LGPL
25
 
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
26
 
** package.
27
 
**
28
 
** GNU General Public License Usage
29
 
** Alternatively, this file may be used under the terms of the GNU
30
 
** General Public License version 3.0 as published by the Free Software
31
 
** Foundation and appearing in the file LICENSE.GPL included in the
32
 
** packaging of this file.  Please review the following information to
33
 
** ensure the GNU General Public License version 3.0 requirements will be
34
 
** met: http://www.gnu.org/copyleft/gpl.html.
35
 
**
36
 
** If you are unsure which license is appropriate for your use, please
37
 
** contact the sales department at http://www.qtsoftware.com/contact.
 
24
** In addition, as a special exception, Nokia gives you certain additional
 
25
** rights.  These rights are described in the Nokia Qt LGPL Exception
 
26
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 
27
**
 
28
** If you have questions regarding the use of this file, please contact
 
29
** Nokia at qt-info@nokia.com.
 
30
**
 
31
**
 
32
**
 
33
**
 
34
**
 
35
**
 
36
**
 
37
**
38
38
** $QT_END_LICENSE$
39
39
**
40
40
****************************************************************************/
44
44
 
45
45
#include <QtCore/qglobal.h>
46
46
 
 
47
#ifdef Q_OS_SYMBIAN
 
48
# include <e32def.h>
 
49
#endif
 
50
 
47
51
QT_BEGIN_HEADER
48
52
 
49
53
QT_BEGIN_NAMESPACE
87
91
    Q_FLAGS(MatchFlags)
88
92
    Q_FLAGS(KeyboardModifiers MouseButtons)
89
93
    Q_ENUMS(WindowType WindowState WindowModality WidgetAttribute ApplicationAttribute)
90
 
    Q_FLAGS(WindowFlags WindowStates)
 
94
    Q_ENUMS(InputMethodHint)
 
95
    Q_FLAGS(WindowFlags WindowStates InputMethodHints)
91
96
    Q_ENUMS(ConnectionType)
92
97
#endif // (defined(Q_MOC_RUN) || defined(QT_JAMBI_RUN))
93
98
 
188
193
#endif
189
194
    };
190
195
 
 
196
    enum TileRule {
 
197
        StretchTile,
 
198
        RepeatTile,
 
199
        RoundTile
 
200
    };
 
201
 
191
202
    // Text formatting flags for QPainter::drawText and QLabel.
192
203
    // The following two enums can be combined to one integer which
193
204
    // is passed as 'flags' to drawText and qt_format_text.
227
238
        TextHideMnemonic = 0x8000,
228
239
        TextJustificationForced = 0x10000,
229
240
        TextForceLeftToRight = 0x20000,
230
 
        TextForceRightToLeft = 0x40000
 
241
        TextForceRightToLeft = 0x40000,
 
242
        TextLongestVariant = 0x80000
231
243
 
232
244
#if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN)
233
245
        ,SingleLine = TextSingleLine,
485
497
        WA_WState_WindowOpacitySet = 119, // internal
486
498
        WA_TranslucentBackground = 120,
487
499
 
 
500
        WA_AcceptTouchEvents = 121,
 
501
        WA_WState_AcceptedTouchBeginEvent = 122,
 
502
        WA_TouchPadAcceptSingleTouchEvents = 123,
 
503
 
488
504
        // Add new attributes before this line
489
505
        WA_AttributeCount
490
506
    };
497
513
        AA_NativeWindows = 3,
498
514
        AA_DontCreateNativeWidgetSiblings = 4,
499
515
        AA_MacPluginApplication = 5,
 
516
        AA_DontUseNativeMenuBar = 6,
 
517
        AA_MacDontSwapCtrlAndMeta = 7,
500
518
 
501
519
        // Add new attributes before this line
502
520
        AA_AttributeCount
1319
1337
        DirectConnection,
1320
1338
        QueuedConnection,
1321
1339
        AutoCompatConnection,
1322
 
        BlockingQueuedConnection
 
1340
        BlockingQueuedConnection,
 
1341
        UniqueConnection =  0x80
1323
1342
    };
1324
1343
 
1325
1344
    enum ShortcutContext {
1390
1409
        ImFont,
1391
1410
        ImCursorPosition,
1392
1411
        ImSurroundingText,
1393
 
        ImCurrentSelection
1394
 
    };
 
1412
        ImCurrentSelection,
 
1413
        ImMaximumTextLength,
 
1414
        ImAnchorPosition
 
1415
    };
 
1416
 
 
1417
    enum InputMethodHint {
 
1418
        ImhNone = 0x0,
 
1419
        ImhHiddenText = 0x1,
 
1420
        ImhNoAutoUppercase = 0x2,
 
1421
        ImhPreferNumbers = 0x4,
 
1422
        ImhPreferUppercase = 0x8,
 
1423
        ImhPreferLowercase = 0x10,
 
1424
        ImhNoPredictiveText = 0x20,
 
1425
 
 
1426
        ImhDigitsOnly = 0x10000,
 
1427
        ImhFormattedNumbersOnly = 0x20000,
 
1428
        ImhUppercaseOnly = 0x40000,
 
1429
        ImhLowercaseOnly = 0x80000,
 
1430
        ImhDialableCharactersOnly = 0x100000,
 
1431
        ImhEmailCharactersOnly = 0x200000,
 
1432
        ImhUrlCharactersOnly = 0x400000,
 
1433
 
 
1434
        ImhExclusiveInputMask = 0xffff0000
 
1435
    };
 
1436
    Q_DECLARE_FLAGS(InputMethodHints, InputMethodHint)
1395
1437
 
1396
1438
    enum ToolButtonStyle {
1397
1439
        ToolButtonIconOnly,
1398
1440
        ToolButtonTextOnly,
1399
1441
        ToolButtonTextBesideIcon,
1400
 
        ToolButtonTextUnderIcon
 
1442
        ToolButtonTextUnderIcon,
 
1443
        ToolButtonFollowStyle
1401
1444
    };
1402
1445
 
1403
1446
    enum LayoutDirection {
1405
1448
        RightToLeft
1406
1449
    };
1407
1450
 
 
1451
    enum AnchorPoint {
 
1452
        AnchorLeft = 0,
 
1453
        AnchorHorizontalCenter,
 
1454
        AnchorRight,
 
1455
        AnchorTop,
 
1456
        AnchorVerticalCenter,
 
1457
        AnchorBottom
 
1458
    };
 
1459
 
 
1460
 
 
1461
 
1408
1462
    enum DropAction {
1409
1463
        CopyAction = 0x1,
1410
1464
        MoveAction = 0x2,
1485
1539
    typedef unsigned long HANDLE;
1486
1540
#elif defined(Q_WS_QWS)
1487
1541
    typedef void * HANDLE;
 
1542
#elif defined(Q_OS_SYMBIAN)
 
1543
    typedef unsigned long int HANDLE; // equivalent to TUint32
1488
1544
#endif
1489
1545
    typedef WindowFlags WFlags;
1490
1546
 
1533
1589
        BottomLeftSection,
1534
1590
        TitleBarArea    // For move
1535
1591
    };
 
1592
 
 
1593
    enum Initialization {
 
1594
        Uninitialized
 
1595
    };
 
1596
 
 
1597
    enum CoordinateSystem {
 
1598
        DeviceCoordinates,
 
1599
        LogicalCoordinates
 
1600
    };
 
1601
 
 
1602
    enum TouchPointState {
 
1603
        TouchPointPressed    = 0x01,
 
1604
        TouchPointMoved      = 0x02,
 
1605
        TouchPointStationary = 0x04,
 
1606
        TouchPointReleased   = 0x08,
 
1607
        TouchPointStateMask  = 0x0f,
 
1608
 
 
1609
        TouchPointPrimary    = 0x10
 
1610
    };
 
1611
    Q_DECLARE_FLAGS(TouchPointStates, TouchPointState)
 
1612
 
 
1613
    enum GestureState
 
1614
    {
 
1615
        NoGesture,
 
1616
        GestureStarted  = 1,
 
1617
        GestureUpdated  = 2,
 
1618
        GestureFinished = 3,
 
1619
        GestureCanceled = 4
 
1620
    };
 
1621
 
 
1622
    enum GestureType
 
1623
    {
 
1624
        TapGesture        = 1,
 
1625
        TapAndHoldGesture = 2,
 
1626
        PanGesture        = 3,
 
1627
        PinchGesture      = 4,
 
1628
        SwipeGesture      = 5,
 
1629
 
 
1630
        CustomGesture     = 0x0100,
 
1631
 
 
1632
        LastGestureType   = ~0u
 
1633
    };
 
1634
 
 
1635
    enum GestureContext
 
1636
    {
 
1637
        WidgetGesture = WidgetShortcut,
 
1638
        WidgetWithChildrenGesture = WidgetWithChildrenShortcut,
 
1639
    };
 
1640
 
 
1641
    enum NavigationMode
 
1642
    {
 
1643
        NavigationModeNone,
 
1644
        NavigationModeKeypadTabOrder,
 
1645
        NavigationModeKeypadDirectional,
 
1646
        NavigationModeCursorAuto,
 
1647
        NavigationModeCursorForceVisible
 
1648
    };
 
1649
 
 
1650
    enum RenderHint {
 
1651
        QualityHint,
 
1652
        PerformanceHint
 
1653
    };
1536
1654
}
1537
1655
#ifdef Q_MOC_RUN
1538
1656
 ;
1539
1657
#endif
1540
1658
 
1541
 
 
1542
1659
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::MouseButtons)
1543
1660
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::Orientations)
1544
1661
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::KeyboardModifiers)
1552
1669
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ItemFlags)
1553
1670
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::MatchFlags)
1554
1671
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::TextInteractionFlags)
 
1672
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::InputMethodHints)
 
1673
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::TouchPointStates)
1555
1674
 
1556
1675
typedef bool (*qInternalCallback)(void **);
1557
1676
 
1567
1686
        Pbuffer       = 0x06,    // GL pbuffer
1568
1687
        FramebufferObject = 0x07, // GL framebuffer object
1569
1688
        CustomRaster  = 0x08,
1570
 
        MacQuartz     = 0x09
 
1689
        MacQuartz     = 0x09,
 
1690
        PaintBuffer   = 0x0a,
 
1691
        OpenGL        = 0x0b
1571
1692
    };
1572
1693
    enum RelayoutType {
1573
1694
        RelayoutNormal,