forked from qt-creator/qt-creator
Add uppercase and lowercase selection actions to the text editor.
Merge-request: 256 Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
This commit is contained in:
committed by
Thorbjørn Lindeijer
parent
ed8dd0b031
commit
b316970101
@@ -93,6 +93,10 @@ TextEditorActionHandler::TextEditorActionHandler(const char *context,
|
||||
m_copyLineUpAction(0),
|
||||
m_copyLineDownAction(0),
|
||||
m_joinLinesAction(0),
|
||||
m_insertLineAboveAction(0),
|
||||
m_insertLineBelowAction(0),
|
||||
m_upperCaseSelectionAction(0),
|
||||
m_lowerCaseSelectionAction(0),
|
||||
m_optionalActions(optionalActions),
|
||||
m_currentEditor(0),
|
||||
m_contextId(context),
|
||||
@@ -306,6 +310,16 @@ void TextEditorActionHandler::createActions()
|
||||
command->setDefaultKeySequence(QKeySequence(tr("Ctrl+Return")));
|
||||
connect(m_insertLineBelowAction, SIGNAL(triggered()), this, SLOT(insertLineBelow()));
|
||||
|
||||
m_upperCaseSelectionAction = new QAction(tr("Uppercase Selection"), this);
|
||||
command = am->registerAction(m_upperCaseSelectionAction, Constants::UPPERCASE_SELECTION, m_contextId, true);
|
||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+Shift+U")));
|
||||
connect(m_upperCaseSelectionAction, SIGNAL(triggered()), this, SLOT(uppercaseSelection()));
|
||||
|
||||
m_lowerCaseSelectionAction = new QAction(tr("Lowercase Selection"), this);
|
||||
command = am->registerAction(m_lowerCaseSelectionAction, Constants::LOWERCASE_SELECTION, m_contextId, true);
|
||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+U")));
|
||||
connect(m_lowerCaseSelectionAction, SIGNAL(triggered()), this, SLOT(lowercaseSelection()));
|
||||
|
||||
QAction *a = 0;
|
||||
a = new QAction(tr("Goto Line Start"), this);
|
||||
command = am->registerAction(a, Constants::GOTO_LINE_START, m_contextId, true);
|
||||
@@ -532,6 +546,8 @@ FUNCTION(moveLineDown)
|
||||
FUNCTION(copyLineUp)
|
||||
FUNCTION(copyLineDown)
|
||||
FUNCTION(joinLines)
|
||||
FUNCTION(uppercaseSelection)
|
||||
FUNCTION(lowercaseSelection)
|
||||
FUNCTION(insertLineAbove)
|
||||
FUNCTION(insertLineBelow)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user