Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qkeysequence_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QKEYSEQUENCE_P_H
6#define QKEYSEQUENCE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
14// file may change from version to version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtGui/private/qtguiglobal_p.h>
20#include "qkeysequence.h"
21
22#include <algorithm>
23
25
26QT_BEGIN_NAMESPACE
27
28struct QKeyBinding
29{
30 QKeySequence::StandardKey standardKey;
31 uchar priority;
32 QKeyCombination shortcut;
33 uint platform;
34};
35
37{
38public:
39 static constexpr int MaxKeyCount = 4 ; // also used in QKeySequenceEdit
40 constexpr QKeySequencePrivate() : ref(1), key{} {}
42 {
43 std::copy(copy.key, copy.key + MaxKeyCount,
44 QT_MAKE_CHECKED_ARRAY_ITERATOR(key, MaxKeyCount));
45 }
48 static QString encodeString(QKeyCombination keyCombination, QKeySequence::SequenceFormat format);
49 // used in dbusmenu
50 Q_GUI_EXPORT static QString keyName(Qt::Key key, QKeySequence::SequenceFormat format);
51 static QKeyCombination decodeString(QString accel, QKeySequence::SequenceFormat format);
52};
53
54QT_END_NAMESPACE
55
56#endif //QKEYSEQUENCE_P_H
\inmodule QtCore\reentrant
Definition qdatastream.h:50
int key[MaxKeyCount]
constexpr QKeySequencePrivate()
static QString encodeString(QKeyCombination keyCombination, QKeySequence::SequenceFormat format)
static constexpr int MaxKeyCount
static QKeyCombination decodeString(QString accel, QKeySequence::SequenceFormat format)
QKeySequencePrivate(const QKeySequencePrivate &copy)
The QKeySequence class encapsulates a key sequence as used by shortcuts.
Combined button and popup list for selecting options.
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition qdir.cpp:2582
int key
Q_DECLARE_TYPEINFO(QModifKeyName, Q_RELOCATABLE_TYPE)
static Q_CONSTINIT bool qt_sequence_no_mnemonics
static constexpr int numKeyNames
const char name[25]
QT_REQUIRE_CONFIG(shortcut)
QDebug Q_GUI_EXPORT & operator<<(QDebug &s, const QVectorPath &path)
QModifKeyName(int q, QChar n)
QModifKeyName(int q, const QString &n)