Skip to content

Commit

Permalink
Add shortcut to evalAll
Browse files Browse the repository at this point in the history
  • Loading branch information
hkiel committed Mar 15, 2017
1 parent dbe3b3f commit 49979e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions OMNotebook/OMNotebookGUI/notebook.cpp
Expand Up @@ -1481,6 +1481,7 @@ void NotebookWindow::createInsertMenu()
evalallAction = new QAction(tr("Evaluate all cells"), this);
evalallAction->setStatusTip(tr("Evaluate all cells in the document"));
evalallAction->setIcon(QIcon(":/Resources/toolbarIcons/evalall.png"));
evalallAction->setShortcut( QKeySequence("Ctrl+R") );
connect(evalallAction, SIGNAL(triggered()), this, SLOT(evalall()));
toolBar->addAction(evalallAction);

Expand Down
6 changes: 3 additions & 3 deletions OMNotebook/OMNotebookGUI/printervisitor.cpp
Expand Up @@ -72,8 +72,8 @@ namespace IAEX
* \class PrinterVisitor
* \date 2005-12-19
*
* \brief creates a new QTextDocument that contaions the documents
* enthier text
* \brief creates a new QTextDocument that contains the documents
* entire text
*/

/*!
Expand Down Expand Up @@ -395,7 +395,7 @@ namespace IAEX
cursor.insertTable( 1, 1, tableFormatInput );

OMPlot::Plot *pPlot = node->mpPlotWindow->getPlot();
// calculate height for widht while preserving aspect ratio.
// calculate height for width while preserving aspect ratio.
int width, height;
if (pPlot->size().width() > 600) {
width = 600;
Expand Down
2 changes: 1 addition & 1 deletion OMNotebookHelp.onb
Expand Up @@ -286,7 +286,7 @@ p, li { white-space: pre-wrap; }
<td style="border: none;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Times New Roman'; font-size:12pt; font-weight:600; color:#000000;">* Links</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> - By clicking on a link, OMNotebook will open the document that is referred to in the link.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Times New Roman'; font-size:12pt; font-weight:600; color:#000000;">* Update link</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> - All links are stored with relative file path. Therefore OMNotebook has functions that automatically updating links if a document is resaved in another folder. Every time a document is saved, OMNotebook checks if the document is saved in the same folder as the last time. If the folder has changed, the links are updated.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;">* </span><span style=" font-family:'Times New Roman'; font-size:12pt; font-weight:600; color:#000000;">Evaluate several cells</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> - Several inputcells can be evaluated at the same time by selecting them in the tree view and then pressing the key combination </span><span style=" font-family:'Courier New'; font-size:12pt; color:#000000;">Shift+Enter</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> or </span><span style=" font-family:'Courier New'; font-size:12pt; color:#000000;">Shift+Return</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;">. The cells are evaluated in the same order as they have been selected. If a groupcell is selected all inputcells in that groupcell are evaluated, in the order they are located in the groupcell.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;">* </span><span style=" font-family:'Times New Roman'; font-size:12pt; font-weight:600; color:#000000;">Evaluate several cells</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> - Several inputcells can be evaluated at the same time by selecting them in the tree view and then pressing the key combination </span><span style=" font-family:'Courier New'; font-size:12pt; color:#000000;">Shift+Enter</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> or </span><span style=" font-family:'Courier New'; font-size:12pt; color:#000000;">Shift+Return</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;">. The cells are evaluated in the same order as they have been selected. If a groupcell is selected all inputcells in that groupcell are evaluated, in the order they are located in the groupcell. All cells in the document can be evaluated by pressing </span><span style=" font-family:'Courier New'; font-size:12pt; color:#000000;">Ctrl+R</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;">.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Times New Roman'; font-size:12pt; font-weight:600; color:#000000;">* Command completion</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> - Inputcells have command completion support, which checks if users are typing a command (or any keyword defined in the file commands.xml) and finish the command. If a user types the first two or three letters in a command, the command completion function fills in the rest. To use command completion, press the key combination </span><span style=" font-family:'Courier New'; font-size:12pt; color:#000000;">Ctrl+Space</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> or </span><span style=" font-family:'Courier New'; font-size:12pt; color:#000000;">Shift+Tab</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;">. The first command that matches the letters will then appear. Holding down </span><span style=" font-family:'Courier New'; font-size:12pt; color:#000000;">Shift</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> and pressing </span><span style=" font-family:'Courier New'; font-size:12pt; color:#000000;">Tab</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> (alternative holding down </span><span style=" font-family:'Courier New'; font-size:12pt; color:#000000;">Ctrl</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> and pressing </span><span style=" font-family:'Courier New'; font-size:12pt; color:#000000;">Space</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;">) again displays the second command that matches. Repeated request to use command completion will loop through all commands that match the letters written. When a command is displayed by the command completion functionality any field inside the command that should be edited by users is automatically selected. Some command have several of these fields and by pressing the key combination Ctrl+Tab, the next field is selected.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> </span><span style=" font-family:'Times New Roman'; font-size:12pt; font-weight:600; color:#ff0000;">> Active Command completion:</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> </span><span style=" font-family:'Times New Roman'; font-size:12pt; font-weight:600; color:#0000ff;">Ctrl+Space / Shift+Tab</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> </span><span style=" font-family:'Times New Roman'; font-size:12pt; font-weight:600; color:#ff0000;">> Next command:</span><span style=" font-family:'Times New Roman'; font-size:12pt; color:#000000;"> </span><span style=" font-family:'Times New Roman'; font-size:12pt; font-weight:600; color:#0000ff;">Ctrl+Space / Shift+Tab</span></p>
Expand Down

0 comments on commit 49979e2

Please sign in to comment.