⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qkeysequence.h

📁 qt-x11-opensource-src-4.1.4.tar.gz源码
💻 H
字号:
/******************************************************************************** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.**** This file is part of the QtGui module of the Qt Toolkit.**** This file may be used under the terms of the GNU General Public** License version 2.0 as published by the Free Software Foundation** and appearing in the file LICENSE.GPL included in the packaging of** this file.  Please review the following information to ensure GNU** General Public Licensing requirements will be met:** http://www.trolltech.com/products/qt/opensource.html**** If you are unsure which license is appropriate for your use, please** review the following information:** http://www.trolltech.com/products/qt/licensing.html or contact the** sales department at sales@trolltech.com.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#ifndef QKEYSEQUENCE_H#define QKEYSEQUENCE_H#include <QtCore/qnamespace.h>#include <QtCore/qstring.h>QT_BEGIN_HEADERQT_MODULE(Gui)#ifndef QT_NO_SHORTCUT/*****************************************************************************  QKeySequence stream functions *****************************************************************************/#ifndef QT_NO_DATASTREAMclass QKeySequence;Q_GUI_EXPORT QDataStream &operator<<(QDataStream &in, const QKeySequence &ks);Q_GUI_EXPORT QDataStream &operator>>(QDataStream &out, QKeySequence &ks);#endifclass QVariant;class QKeySequencePrivate;class Q_GUI_EXPORT QKeySequence{public:    QKeySequence();    QKeySequence(const QString &key);    QKeySequence(int k1, int k2 = 0, int k3 = 0, int k4 = 0);    QKeySequence(const QKeySequence &ks);    ~QKeySequence();    uint count() const;    bool isEmpty() const;    enum SequenceMatch {        NoMatch,        PartialMatch,        ExactMatch#ifdef QT3_SUPPORT        , Identical = ExactMatch#endif    };    enum SequenceFormat {        NativeText,        PortableText    };    QString toString(SequenceFormat format = PortableText) const;    static QKeySequence fromString(const QString &str, SequenceFormat format = PortableText);    SequenceMatch matches(const QKeySequence &seq) const;    static QKeySequence mnemonic(const QString &text);    // ### Qt 5: kill 'operator QString' - it's evil (ask Trenton or Jasmin if you need more reasons)    operator QString() const;    operator QVariant() const;    operator int() const;    int operator[](uint i) const;    QKeySequence &operator=(const QKeySequence &other);    bool operator==(const QKeySequence &other) const;    inline bool operator!= (const QKeySequence &other) const    { return !(*this == other); }    bool operator< (const QKeySequence &ks) const;    inline bool operator> (const QKeySequence &other) const    { return other < *this; }    inline bool operator<= (const QKeySequence &other) const    { return !(other < *this); }    inline bool operator>= (const QKeySequence &other) const    { return !(*this < other); }    bool isDetached() const;private:    static int decodeString(const QString &ks);    static QString encodeString(int key);    int assign(const QString &str);    void setKey(int key, int index);    QKeySequencePrivate *d;    friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &in, const QKeySequence &ks);    friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &in, QKeySequence &ks);    friend class Q3AccelManager;    friend class QShortcutMap;    friend class QShortcut;};Q_DECLARE_TYPEINFO(QKeySequence, Q_MOVABLE_TYPE);Q_DECLARE_SHARED(QKeySequence)#ifndef QT_NO_DEBUG_STREAMQ_GUI_EXPORT QDebug operator<<(QDebug, const QKeySequence &);#endif#elseclass Q_GUI_EXPORT QKeySequence{public:    QKeySequence() {}    QKeySequence(int) {}};#endif // QT_NO_SHORTCUTQT_END_HEADER#endif // QKEYSEQUENCE_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -