Commit 0af52f23 authored by Alexander Wiebel's avatar Alexander Wiebel

[CHANGE] the online help available using "F1" is now separated in an html...

[CHANGE] the online help available using "F1" is now separated in an html file. Thus it can also be used on the website and edited in a simpler way. For "F1" it is read at runtime from the share/OpenWalnut directory. A new make target to copy it there has also been added.
parent 351d048c
......@@ -300,6 +300,14 @@ add_custom_target( fontsDirectoryConfiguration
COMMAND ${CMAKE_COMMAND} -D OW_SOURCE_DIR:STRING=${PROJECT_SOURCE_DIR} -D SHARED_FILES_RELATIVE:PATH=${SHARED_FILES_RELATIVE} -P ${PROJECT_SOURCE_DIR}/../tools/CMakeModules/CopyFonts.cmake
COMMENT "Put all fonts to the right place."
)
#---------- online help -------------
ADD_CUSTOM_TARGET( onlineHelp
ALL
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/gui/qt4/OpenWalnutHelp.html ${PROJECT_BINARY_DIR}/share/OpenWalnut
COMMENT "Copy online help"
)
#---------- shell scripts -------------
IF( CMAKE_GENERATOR MATCHES "Visual Studio" )
......
<h3>Navigation in Main View</h3>
<table>
<tr><td><b><i>Mouse Button&nbsp;&nbsp;</i></b></td><td><b><i>Action</i></b></td></tr>
<tr><td>Left</td><td>Rotate</td></tr>
<tr><td>Middle</td><td>Pan</td></tr>
<tr><td>Right</td><td>Pick, move ROI box or move slice</td></tr>
<tr><td>Right + Shift</td><td>Resize ROI box</td></tr>
<tr><td>Wheel</td><td>Zoom</td></tr>
<tr><td><b><i>Key</i></b></td><td><b><i>Action</i></b></td></tr>
<tr><td>+</td><td>Zoom in</td></tr>
<tr><td>-</td><td>Zoom out</td></tr>
<tr><td>[space]</td><td>Reset view</td></tr>
</table>
<h3>Navigation in EEG View</h3>
<table>
<tr><td><b><i>Mouse Button</i></b></td><td><b><i>Action</i></b></td></tr>
<tr><td>Left</td><td>Mark event position</td></tr>
<tr><td>Middle</td><td>Pan</td></tr>
<tr><td>Right</td><td>Zoom in time</td></tr>
<tr><td>Wheel</td><td>Scale voltage</td></tr>
<tr><td>Wheel + Right</td><td>Change spacing between graphs</td></tr>
<tr><td>Wheel + Left</td><td>Change sensitivity of the coloring of the head surface</td></tr>
</table>
<h3>Program-wide Keyboard Shortcuts</h3>
<table>
<tr><td><b><i>Key</i></b></td><td><b><i>Action</i></b></td></tr>
<tr><td>Ctrl + q</td><td>Quit</td></tr>
<tr><td>Esc</td><td>Resets main view</td></tr>
<tr><td>F1</td><td>Opens this help window</td></tr>
</table>
\ No newline at end of file
......@@ -46,6 +46,8 @@
#include "../../common/WColor.h"
#include "../../common/WPreferences.h"
#include "../../common/WProjectFileIO.h"
#include "../../common/WPathHelper.h"
#include "../../common/exceptions/WFileNotFound.h"
#include "../../dataHandler/WDataSetFibers.h"
#include "../../dataHandler/WDataSetSingle.h"
#include "../../dataHandler/WEEG2.h"
......@@ -732,37 +734,25 @@ void WMainWindow::openAboutDialog()
void WMainWindow::openOpenWalnutHelpDialog()
{
QMessageBox::information( this, "OpenWalnut Help",
"<h3>Navigation in Main View</h3>"
"<table>"
"<tr><td><b><i>Mouse Button&nbsp;&nbsp;</i></b></td><td><b><i>Action</i></b></td></tr>"
"<tr><td>Left</td><td>Rotate</td></tr>"
"<tr><td>Middle</td><td>Pan</td></tr>"
"<tr><td>Right</td><td>Pick, move ROI box or move slice</td></tr>"
"<tr><td>Right + Shift</td><td>Resize ROI box</td></tr>"
"<tr><td>Wheel</td><td>Zoom</td></tr>"
"<tr><td><b><i>Key</i></b></td><td><b><i>Action</i></b></td></tr>"
"<tr><td>+</td><td>Zoom in</td></tr>"
"<tr><td>-</td><td>Zoom out</td></tr>"
"<tr><td>[space]</td><td>Reset view</td></tr>"
"</table>"
"<h3>Navigation in EEG View</h3>"
"<table>"
"<tr><td><b><i>Mouse Button</i></b></td><td><b><i>Action</i></b></td></tr>"
"<tr><td>Left</td><td>Mark event position</td></tr>"
"<tr><td>Middle</td><td>Pan</td></tr>"
"<tr><td>Right</td><td>Zoom in time</td></tr>"
"<tr><td>Wheel</td><td>Scale voltage</td></tr>"
"<tr><td>Wheel + Right</td><td>Change spacing between graphs</td></tr>"
"<tr><td>Wheel + Left</td><td>Change sensitivity of the coloring of the head surface</td></tr>"
"</table>"
"<h3>Program-wide Keyboard Shortcuts</h3>"
"<table>"
"<tr><td><b><i>Key</i></b></td><td><b><i>Action</i></b></td></tr>"
"<tr><td>Ctrl + q</td><td>Quit</td></tr>"
"<tr><td>Esc</td><td>Resets main view</td></tr>"
"<tr><td>F1</td><td>Opens this help window</td></tr>"
"</table>" );
//read the file
//std::string filename( WPathHelper::getAppPath().file_string() + "/../../../src/gui/qt4/OpenWalnutHelp.html" );
std::string filename( WPathHelper::getAppPath().file_string() + "/../share/OpenWalnut/OpenWalnutHelp.html" );
std::ifstream input( filename.c_str() );
if ( !input.is_open() )
{
std::cout<< filename << std::endl;
throw WFileNotFound( std::string( "The project file \"" ) + filename +
std::string( "\" does not exist." ) );
}
std::string buf;
std::string line;
while( std::getline( input, line ) )
{
buf += line;
}
QMessageBox::information( this, "OpenWalnut Help", buf.c_str() );
}
void WMainWindow::setPresetViewLeft()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment