summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qkeysequence_p.h
blob: 8b98e3778a53a2c446177eb192e50fca847e05a4 (plain)
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
// Copyright (C) 2016 The Qt Company Ltd.// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only#ifndef QKEYSEQUENCE_P_H#define QKEYSEQUENCE_P_H//// W A R N I N G// -------------//// This file is not part of the Qt API. It exists for the convenience// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header// file may change from version to version without notice, or even be removed.//// We mean it.//#include <QtGui/private/qtguiglobal_p.h>#include"qkeysequence.h"#include <algorithm>QT_REQUIRE_CONFIG(shortcut); QT_BEGIN_NAMESPACE struct QKeyBinding {QKeySequence::StandardKey standardKey; uchar priority; QKeyCombination shortcut; uint platform;};class QKeySequencePrivate {public:staticconstexprint MaxKeyCount =4;// also used in QKeySequenceEditconstexprQKeySequencePrivate() :ref(1), key{} {}inlineQKeySequencePrivate(const QKeySequencePrivate &copy) :ref(1){std::copy(copy.key, copy.key + MaxKeyCount,QT_MAKE_CHECKED_ARRAY_ITERATOR(key, MaxKeyCount));} QAtomicInt ref;int key[MaxKeyCount];static QString encodeString(QKeyCombination keyCombination,QKeySequence::SequenceFormat format);// used in dbusmenu Q_GUI_EXPORT static QString keyName(Qt::Key key,QKeySequence::SequenceFormat format);static QKeyCombination decodeString(QString accel,QKeySequence::SequenceFormat format);}; QT_END_NAMESPACE #endif//QKEYSEQUENCE_P_H
close