QScintilla
2.14.1
|
#include <qscicommand.h>
Public Types | |
enum | Command { LineDown = QsciScintillaBase::SCI_LINEDOWN, LineDownExtend = QsciScintillaBase::SCI_LINEDOWNEXTEND, LineDownRectExtend = QsciScintillaBase::SCI_LINEDOWNRECTEXTEND, LineScrollDown = QsciScintillaBase::SCI_LINESCROLLDOWN, LineUp = QsciScintillaBase::SCI_LINEUP, LineUpExtend = QsciScintillaBase::SCI_LINEUPEXTEND, LineUpRectExtend = QsciScintillaBase::SCI_LINEUPRECTEXTEND, LineScrollUp = QsciScintillaBase::SCI_LINESCROLLUP, ScrollToStart = QsciScintillaBase::SCI_SCROLLTOSTART, ScrollToEnd = QsciScintillaBase::SCI_SCROLLTOEND, VerticalCentreCaret = QsciScintillaBase::SCI_VERTICALCENTRECARET, ParaDown = QsciScintillaBase::SCI_PARADOWN, ParaDownExtend = QsciScintillaBase::SCI_PARADOWNEXTEND, ParaUp = QsciScintillaBase::SCI_PARAUP, ParaUpExtend = QsciScintillaBase::SCI_PARAUPEXTEND, CharLeft = QsciScintillaBase::SCI_CHARLEFT, CharLeftExtend = QsciScintillaBase::SCI_CHARLEFTEXTEND, CharLeftRectExtend = QsciScintillaBase::SCI_CHARLEFTRECTEXTEND, CharRight = QsciScintillaBase::SCI_CHARRIGHT, CharRightExtend = QsciScintillaBase::SCI_CHARRIGHTEXTEND, CharRightRectExtend = QsciScintillaBase::SCI_CHARRIGHTRECTEXTEND, WordLeft = QsciScintillaBase::SCI_WORDLEFT, WordLeftExtend = QsciScintillaBase::SCI_WORDLEFTEXTEND, WordRight = QsciScintillaBase::SCI_WORDRIGHT, WordRightExtend = QsciScintillaBase::SCI_WORDRIGHTEXTEND, WordLeftEnd = QsciScintillaBase::SCI_WORDLEFTEND, WordLeftEndExtend = QsciScintillaBase::SCI_WORDLEFTENDEXTEND, WordRightEnd = QsciScintillaBase::SCI_WORDRIGHTEND, WordRightEndExtend = QsciScintillaBase::SCI_WORDRIGHTENDEXTEND, WordPartLeft = QsciScintillaBase::SCI_WORDPARTLEFT, WordPartLeftExtend = QsciScintillaBase::SCI_WORDPARTLEFTEXTEND, WordPartRight = QsciScintillaBase::SCI_WORDPARTRIGHT, WordPartRightExtend = QsciScintillaBase::SCI_WORDPARTRIGHTEXTEND, Home = QsciScintillaBase::SCI_HOME, HomeExtend = QsciScintillaBase::SCI_HOMEEXTEND, HomeRectExtend = QsciScintillaBase::SCI_HOMERECTEXTEND, HomeDisplay = QsciScintillaBase::SCI_HOMEDISPLAY, HomeDisplayExtend = QsciScintillaBase::SCI_HOMEDISPLAYEXTEND, HomeWrap = QsciScintillaBase::SCI_HOMEWRAP, HomeWrapExtend = QsciScintillaBase::SCI_HOMEWRAPEXTEND, VCHome = QsciScintillaBase::SCI_VCHOME, VCHomeExtend = QsciScintillaBase::SCI_VCHOMEEXTEND, VCHomeRectExtend = QsciScintillaBase::SCI_VCHOMERECTEXTEND, VCHomeWrap = QsciScintillaBase::SCI_VCHOMEWRAP, VCHomeWrapExtend = QsciScintillaBase::SCI_VCHOMEWRAPEXTEND, LineEnd = QsciScintillaBase::SCI_LINEEND, LineEndExtend = QsciScintillaBase::SCI_LINEENDEXTEND, LineEndRectExtend = QsciScintillaBase::SCI_LINEENDRECTEXTEND, LineEndDisplay = QsciScintillaBase::SCI_LINEENDDISPLAY, LineEndDisplayExtend = QsciScintillaBase::SCI_LINEENDDISPLAYEXTEND, LineEndWrap = QsciScintillaBase::SCI_LINEENDWRAP, LineEndWrapExtend = QsciScintillaBase::SCI_LINEENDWRAPEXTEND, DocumentStart = QsciScintillaBase::SCI_DOCUMENTSTART, DocumentStartExtend = QsciScintillaBase::SCI_DOCUMENTSTARTEXTEND, DocumentEnd = QsciScintillaBase::SCI_DOCUMENTEND, DocumentEndExtend = QsciScintillaBase::SCI_DOCUMENTENDEXTEND, PageUp = QsciScintillaBase::SCI_PAGEUP, PageUpExtend = QsciScintillaBase::SCI_PAGEUPEXTEND, PageUpRectExtend = QsciScintillaBase::SCI_PAGEUPRECTEXTEND, PageDown = QsciScintillaBase::SCI_PAGEDOWN, PageDownExtend = QsciScintillaBase::SCI_PAGEDOWNEXTEND, PageDownRectExtend = QsciScintillaBase::SCI_PAGEDOWNRECTEXTEND, StutteredPageUp = QsciScintillaBase::SCI_STUTTEREDPAGEUP, StutteredPageUpExtend = QsciScintillaBase::SCI_STUTTEREDPAGEUPEXTEND, StutteredPageDown = QsciScintillaBase::SCI_STUTTEREDPAGEDOWN, StutteredPageDownExtend = QsciScintillaBase::SCI_STUTTEREDPAGEDOWNEXTEND, Delete = QsciScintillaBase::SCI_CLEAR, DeleteBack = QsciScintillaBase::SCI_DELETEBACK, DeleteBackNotLine = QsciScintillaBase::SCI_DELETEBACKNOTLINE, DeleteWordLeft = QsciScintillaBase::SCI_DELWORDLEFT, DeleteWordRight = QsciScintillaBase::SCI_DELWORDRIGHT, DeleteWordRightEnd = QsciScintillaBase::SCI_DELWORDRIGHTEND, DeleteLineLeft = QsciScintillaBase::SCI_DELLINELEFT, DeleteLineRight = QsciScintillaBase::SCI_DELLINERIGHT, LineDelete = QsciScintillaBase::SCI_LINEDELETE, LineCut = QsciScintillaBase::SCI_LINECUT, LineCopy = QsciScintillaBase::SCI_LINECOPY, LineTranspose = QsciScintillaBase::SCI_LINETRANSPOSE, LineDuplicate = QsciScintillaBase::SCI_LINEDUPLICATE, SelectAll = QsciScintillaBase::SCI_SELECTALL, MoveSelectedLinesUp = QsciScintillaBase::SCI_MOVESELECTEDLINESUP, MoveSelectedLinesDown = QsciScintillaBase::SCI_MOVESELECTEDLINESDOWN, SelectionDuplicate = QsciScintillaBase::SCI_SELECTIONDUPLICATE, SelectionLowerCase = QsciScintillaBase::SCI_LOWERCASE, SelectionUpperCase = QsciScintillaBase::SCI_UPPERCASE, SelectionCut = QsciScintillaBase::SCI_CUT, SelectionCopy = QsciScintillaBase::SCI_COPY, Paste = QsciScintillaBase::SCI_PASTE, EditToggleOvertype = QsciScintillaBase::SCI_EDITTOGGLEOVERTYPE, Newline = QsciScintillaBase::SCI_NEWLINE, Formfeed = QsciScintillaBase::SCI_FORMFEED, Tab = QsciScintillaBase::SCI_TAB, Backtab = QsciScintillaBase::SCI_BACKTAB, Cancel = QsciScintillaBase::SCI_CANCEL, Undo = QsciScintillaBase::SCI_UNDO, Redo = QsciScintillaBase::SCI_REDO, ZoomIn = QsciScintillaBase::SCI_ZOOMIN, ZoomOut = QsciScintillaBase::SCI_ZOOMOUT, ReverseLines = QsciScintillaBase::SCI_LINEREVERSE } |
Public Member Functions | |
Command | command () const |
void | execute () |
void | setKey (int key) |
void | setAlternateKey (int altkey) |
int | key () const |
int | alternateKey () const |
QString | description () const |
Static Public Member Functions | |
static bool | validKey (int key) |
The QsciCommand class represents an internal editor command that may have one or two keys bound to it.
Methods are provided to change the keys bound to the command and to remove a key binding. Each command has a user friendly description of the command for use in key mapping dialogs.
enum QsciCommand::Command |
This enum defines the different commands that can be assigned to a key.
void QsciCommand::setKey | ( | int | key | ) |
Binds the key key to the command. If key is 0 then the key binding is removed. If key is invalid then the key binding is unchanged. Valid keys are any visible or control character or any of Qt::Key_Down
, Qt::Key_Up
, Qt::Key_Left
, Qt::Key_Right
, Qt::Key_Home
, Qt::Key_End
, Qt::Key_PageUp
, Qt::Key_PageDown
, Qt::Key_Delete
, Qt::Key_Insert
, Qt::Key_Escape
, Qt::Key_Backspace
, Qt::Key_Tab
, Qt::Key_Backtab
, Qt::Key_Return
, Qt::Key_Enter
, Qt::Key_Super_L
, Qt::Key_Super_R
or Qt::Key_Menu
. Keys may be modified with any combination of Qt::ShiftModifier
, Qt::ControlModifier
, Qt::AltModifier
and Qt::MetaModifier
.
void QsciCommand::setAlternateKey | ( | int | altkey | ) |
Binds the alternate key altkey to the command. If key is 0 then the alternate key binding is removed.
|
inline |
The key that is currently bound to the command is returned.
|
inline |
The alternate key that is currently bound to the command is returned.