Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/QtWidgets/qkeysequenceedit.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // Copyright (C) 2013 Ivan Komissarov.
0003 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0004 
0005 #ifndef QKEYSEQUENCEEDIT_H
0006 #define QKEYSEQUENCEEDIT_H
0007 
0008 #include <QtWidgets/qtwidgetsglobal.h>
0009 #include <QtWidgets/qwidget.h>
0010 
0011 QT_REQUIRE_CONFIG(keysequenceedit);
0012 
0013 QT_BEGIN_NAMESPACE
0014 
0015 class QKeySequenceEditPrivate;
0016 class Q_WIDGETS_EXPORT QKeySequenceEdit : public QWidget
0017 {
0018     Q_OBJECT
0019     Q_PROPERTY(QKeySequence keySequence READ keySequence WRITE setKeySequence
0020                NOTIFY keySequenceChanged USER true)
0021     Q_PROPERTY(bool clearButtonEnabled READ isClearButtonEnabled WRITE setClearButtonEnabled)
0022     Q_PROPERTY(qsizetype maximumSequenceLength READ maximumSequenceLength WRITE setMaximumSequenceLength)
0023     Q_PROPERTY(QList<QKeyCombination> finishingKeyCombinations READ finishingKeyCombinations WRITE setFinishingKeyCombinations)
0024 
0025 public:
0026     explicit QKeySequenceEdit(QWidget *parent = nullptr);
0027     explicit QKeySequenceEdit(const QKeySequence &keySequence, QWidget *parent = nullptr);
0028     ~QKeySequenceEdit();
0029 
0030     QKeySequence keySequence() const;
0031     qsizetype maximumSequenceLength() const;
0032 
0033     void setClearButtonEnabled(bool enable);
0034     bool isClearButtonEnabled() const;
0035 
0036     void setFinishingKeyCombinations(const QList<QKeyCombination> &finishingKeyCombinations);
0037     QList<QKeyCombination> finishingKeyCombinations() const;
0038 
0039 public Q_SLOTS:
0040     void setKeySequence(const QKeySequence &keySequence);
0041     void clear();
0042     void setMaximumSequenceLength(qsizetype count);
0043 
0044 Q_SIGNALS:
0045     void editingFinished();
0046     void keySequenceChanged(const QKeySequence &keySequence);
0047 
0048 protected:
0049     QKeySequenceEdit(QKeySequenceEditPrivate &d, QWidget *parent, Qt::WindowFlags f);
0050 
0051     bool event(QEvent *) override;
0052     void keyPressEvent(QKeyEvent *) override;
0053     void keyReleaseEvent(QKeyEvent *) override;
0054     void timerEvent(QTimerEvent *) override;
0055     void focusOutEvent(QFocusEvent *) override;
0056 
0057 private:
0058     Q_DISABLE_COPY(QKeySequenceEdit)
0059     Q_DECLARE_PRIVATE(QKeySequenceEdit)
0060 };
0061 
0062 QT_END_NAMESPACE
0063 
0064 #endif // QKEYSEQUENCEEDIT_H