Commit df3c78aa authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[CHANGE #530] Put the help into a window with webview. This makes it more comfortable.

parent 949862c6
......@@ -7,7 +7,8 @@ INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} )
# Libraries for linking:
SET( QT_LIBS ${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTOPENGL_LIBRARY} )
${QT_QTOPENGL_LIBRARY}
${QT_QTWEBKIT_LIBRARY} )
# add here all classes that inherit from QObject
SET(GUI_QT4_MOC_HDRS
......
......@@ -37,6 +37,8 @@
#include <QtGui/QMenu>
#include <QtGui/QMenuBar>
#include <QtGui/QMessageBox>
#include <QtGui/QTextEdit>
#include <QtWebKit/QWebView>
#include <QtGui/QShortcut>
#include <QtGui/QSlider>
#include <QtGui/QVBoxLayout>
......@@ -735,7 +737,20 @@ void WMainWindow::openOpenWalnutHelpDialog()
{
std::string filename( WPathHelper::getAppPath().file_string() + "/../share/OpenWalnut/OpenWalnutHelp.html" );
std::string content = wiotools::getStringFromFile( filename );
QMessageBox::information( this, "OpenWalnut Help", content.c_str() );
QWidget* window = new QWidget( this, Qt::Window );
// specify intial layout
QVBoxLayout *layout = new QVBoxLayout( window );
window->setLayout(layout);
window->resize( 500, 500 );
window->show();
QWebView *view = new QWebView( this );
view->setHtml( content.c_str() );
view->show();
layout->addWidget( view );
}
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