Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/kernel/qaction.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtGui module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
     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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6868
    6969    Q_ENUMS(MenuRole)
    70     Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable)
     70    Q_ENUMS(SoftKeyRole)
     71    Q_ENUMS(Priority)
     72    Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable NOTIFY changed)
    7173    Q_PROPERTY(bool checked READ isChecked WRITE setChecked DESIGNABLE isCheckable NOTIFY toggled)
    72     Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled)
    73     Q_PROPERTY(QIcon icon READ icon WRITE setIcon)
    74     Q_PROPERTY(QString text READ text WRITE setText)
    75     Q_PROPERTY(QString iconText READ iconText WRITE setIconText)
    76     Q_PROPERTY(QString toolTip READ toolTip WRITE setToolTip)
    77     Q_PROPERTY(QString statusTip READ statusTip WRITE setStatusTip)
    78     Q_PROPERTY(QString whatsThis READ whatsThis WRITE setWhatsThis)
    79     Q_PROPERTY(QFont font READ font WRITE setFont)
     74    Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY changed)
     75    Q_PROPERTY(QIcon icon READ icon WRITE setIcon NOTIFY changed)
     76    Q_PROPERTY(QString text READ text WRITE setText NOTIFY changed)
     77    Q_PROPERTY(QString iconText READ iconText WRITE setIconText NOTIFY changed)
     78    Q_PROPERTY(QString toolTip READ toolTip WRITE setToolTip NOTIFY changed)
     79    Q_PROPERTY(QString statusTip READ statusTip WRITE setStatusTip NOTIFY changed)
     80    Q_PROPERTY(QString whatsThis READ whatsThis WRITE setWhatsThis NOTIFY changed)
     81    Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY changed)
    8082#ifndef QT_NO_SHORTCUT
    81     Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut)
    82     Q_PROPERTY(Qt::ShortcutContext shortcutContext READ shortcutContext WRITE setShortcutContext)
    83     Q_PROPERTY(bool autoRepeat READ autoRepeat WRITE setAutoRepeat)
    84 #endif
    85     Q_PROPERTY(bool visible READ isVisible WRITE setVisible)
    86     Q_PROPERTY(MenuRole menuRole READ menuRole WRITE setMenuRole)
    87     Q_PROPERTY(bool iconVisibleInMenu READ isIconVisibleInMenu WRITE setIconVisibleInMenu)
     83    Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut NOTIFY changed)
     84    Q_PROPERTY(Qt::ShortcutContext shortcutContext READ shortcutContext WRITE setShortcutContext NOTIFY changed)
     85    Q_PROPERTY(bool autoRepeat READ autoRepeat WRITE setAutoRepeat NOTIFY changed)
     86#endif
     87    Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY changed)
     88    Q_PROPERTY(MenuRole menuRole READ menuRole WRITE setMenuRole NOTIFY changed)
     89    Q_PROPERTY(SoftKeyRole softKeyRole READ softKeyRole WRITE setSoftKeyRole NOTIFY changed)
     90    Q_PROPERTY(bool iconVisibleInMenu READ isIconVisibleInMenu WRITE setIconVisibleInMenu NOTIFY changed)
     91    Q_PROPERTY(Priority priority READ priority WRITE setPriority)
    8892
    8993public:
    9094    enum MenuRole { NoRole, TextHeuristicRole, ApplicationSpecificRole, AboutQtRole,
    9195                    AboutRole, PreferencesRole, QuitRole };
     96    enum SoftKeyRole {
     97                    NoSoftKey, PositiveSoftKey, NegativeSoftKey, SelectSoftKey };
     98    enum Priority { LowPriority = 0,
     99                    NormalPriority = 128,
     100                    HighPriority = 256};
    92101    explicit QAction(QObject* parent);
    93102    QAction(const QString &text, QObject* parent);
     
    124133    QString whatsThis() const;
    125134
     135    void setPriority(Priority priority);
     136    Priority priority() const;
     137
    126138#ifndef QT_NO_MENU
    127139    QMenu *menu() const;
     
    168180    void setMenuRole(MenuRole menuRole);
    169181    MenuRole menuRole() const;
     182
     183    void setSoftKeyRole(SoftKeyRole softKeyRole);
     184    SoftKeyRole softKeyRole() const;
    170185
    171186    void setIconVisibleInMenu(bool visible);
Note: See TracChangeset for help on using the changeset viewer.