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

📄 qkeysequence.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
字号:
'\" t.TH QKeySequence 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQKeySequence \- Encapsulates a key sequence as used by accelerators.SH SYNOPSIS\fC#include <qkeysequence.h>\fR.PPInherits Qt..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQKeySequence\fR ()".br.ti -1c.BI "\fBQKeySequence\fR ( const QString & key )".br.ti -1c.BI "\fBQKeySequence\fR ( int key )".br.ti -1c.BI "\fBQKeySequence\fR ( int k1, int k2, int k3 = 0, int k4 = 0 )".br.ti -1c.BI "\fBQKeySequence\fR ( const QKeySequence & keysequence )".br.ti -1c.BI "\fB~QKeySequence\fR ()".br.ti -1c.BI "uint \fBcount\fR () const".br.ti -1c.BI "bool \fBisEmpty\fR () const".br.ti -1c.BI "Qt::SequenceMatch \fBmatches\fR ( const QKeySequence & seq ) const".br.ti -1c.BI "\fBoperator QString\fR () const".br.ti -1c.BI "operator int () const  \fI(obsolete)\fR".br.ti -1c.BI "int \fBoperator[]\fR ( uint index ) const".br.ti -1c.BI "QKeySequence & \fBoperator=\fR ( const QKeySequence & keysequence )".br.ti -1c.BI "bool \fBoperator==\fR ( const QKeySequence & keysequence ) const".br.ti -1c.BI "bool \fBoperator!=\fR ( const QKeySequence & keysequence ) const".br.in -1c.SH RELATED FUNCTION DOCUMENTATION.in +1c.ti -1c.BI "QDataStream & \fBoperator<<\fR ( QDataStream & s, const QKeySequence & keysequence )".br.ti -1c.BI "QDataStream & \fBoperator>>\fR ( QDataStream & s, QKeySequence & keysequence )".br.in -1c.SH DESCRIPTIONThe QKeySequence class encapsulates a key sequence as used by accelerators..PPA key sequence consists of up to four keyboard codes, each optionally combined with modifiers, e.g. SHIFT, CTRL, ALT, META, or UNICODE_ACCEL. For example, \fCCTRL + Key_P\fR might be a sequence used as a shortcut for printing a document. The key codes are listed in qnamespace.h. As an alternative, use UNICODE_ACCEL with the unicode code point of the character. For example, \fCUNICODE_ACCEL + 'A'\fR gives the same key sequence as Key_A..PPKey sequences can be constructed either from an integer key code, or from a human readable translatable string such as" Ctrl+X,Alt+Space". A key sequence can be cast to a QString to obtain a human readable translated version of the sequence. Translations are done in the "QAccel" context..PPSee also QAccel and Miscellaneous Classes..SH MEMBER FUNCTION DOCUMENTATION.SH "QKeySequence::QKeySequence ()"Constructs an empty key sequence..SH "QKeySequence::QKeySequence ( const QString & key )"Creates a key sequence from the string \fIkey\fR. For example" Ctrl+O" gives CTRL+UNICODE_ACCEL+'O'. The strings "Ctrl"," Shift", "Alt" and "Meta" are recognized, as well as their translated equivalents in the "QAccel" context (using QObject::tr())..PPMultiple key codes (up to four) may be entered by separating them with commas, e.g. "Alt+X,Ctrl+S,Q"..PPThis contructor is typically used with tr(), so that accelerator keys can be replaced in translations:.PP.nf.br        QPopupMenu *file = new QPopupMenu( this );.br        file->insertItem( tr("&Open..."), this, SLOT(open()),.br                          QKeySequence( tr("Ctrl+O", "File|Open") ) );.br.fi.PPNote the \fC"File|Open"\fR translator comment. It is by no means necessary, but it provides some context for the human translator..SH "QKeySequence::QKeySequence ( int key )"Constructs a key sequence that has a single \fIkey\fR..PPThe key codes are listed in qnamespace.h and can be combined with modifiers, e.g. with SHIFT, CTRL, ALT, META or UNICODE_ACCEL..SH "QKeySequence::QKeySequence ( int k1, int k2, int k3 = 0, int k4 = 0 )"Constructs a key sequence with up to 4 keys \fIk1\fR, \fIk2\fR, \fIk3\fR and \fIk4\fR..PPThe key codes are listed in qnamespace.h and can be combined with modifiers, e.g. with SHIFT, CTRL, ALT, META or UNICODE_ACCEL..SH "QKeySequence::QKeySequence ( const QKeySequence & keysequence )"Copy constructor. Makes a copy of \fIkeysequence\fR..SH "QKeySequence::~QKeySequence ()"Destroys the key sequence..SH "uint QKeySequence::count () const"Returns the number of keys in the key sequence. The maximum is 4..SH "bool QKeySequence::isEmpty () const"Returns TRUE if the key sequence is empty; otherwise returns FALSE..SH "Qt::SequenceMatch QKeySequence::matches ( const QKeySequence & seq ) const"Matches the sequence with \fIseq\fR. Returns Qt::Identical if successful, Qt::PartialMatch for matching but incomplete \fIseq\fR, and Qt::NoMatch if the sequences have nothing in common. Returns Qt::NoMatch if \fIseq\fR is shorter..SH "QKeySequence::operator QString () const"Creates an accelerator string for the key sequence. For instance CTRL+Key_O gives "Ctrl+O". If the key sequence has multiple key codes they are returned comma-separated, e.g." Alt+X, Ctrl+Y, Z". The strings, "Ctrl", "Shift", etc. are translated (using QObject::tr()) in the "QAccel" scope. If the key sequence has no keys, QString::null is returned..SH "QKeySequence::operator int () const"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..PPFor backward compatibility: returns the first keycode as integer. If the key sequence is empty, 0 is returned..SH "bool QKeySequence::operator!= ( const QKeySequence & keysequence ) const"Returns TRUE if \fIkeysequence\fR is not equal to this key sequence; otherwise returns FALSE..SH "QKeySequence & QKeySequence::operator= ( const QKeySequence & keysequence )"Assignment operator. Assigns \fIkeysequence\fR to this object..SH "bool QKeySequence::operator== ( const QKeySequence & keysequence ) const"Returns TRUE if \fIkeysequence\fR is equal to this key sequence; otherwise returns FALSE..SH "int QKeySequence::operator[] ( uint index ) const"Returns a reference to the element at position \fIindex\fR in the key sequence. This can only be used to read an element..SH RELATED FUNCTION DOCUMENTATION.SH "QDataStream & operator<< ( QDataStream & s, const QKeySequence & keysequence )"Writes the key sequence \fIkeysequence\fR to the stream \fIs\fR..PPSee also Format of the QDataStream operators..SH "QDataStream & operator>> ( QDataStream & s, QKeySequence & keysequence )"Reads a key sequence from the stream \fIs\fR into the key sequence \fIkeysequence\fR..PPSee also Format of the QDataStream operators..SH "SEE ALSO".BR http://doc.trolltech.com/qkeysequence.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qkeysequence.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

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