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

[CHANGE] store about dialog contents in HTML file

parent e465b555
...@@ -294,13 +294,20 @@ add_custom_target( fontsDirectoryConfiguration ...@@ -294,13 +294,20 @@ add_custom_target( fontsDirectoryConfiguration
) )
#---------- online help ------------- #---------- OpenWalnut help -------------
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/gui/qt4/OpenWalnutHelp.html ${PROJECT_BINARY_DIR}/share/OpenWalnut COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/gui/qt4/OpenWalnutHelp.html ${PROJECT_BINARY_DIR}/share/OpenWalnut
COMMENT "Copy online help" COMMENT "Copy online help"
) )
#---------- About OpenWalnut -------------
ADD_CUSTOM_TARGET( aboutOpenWalnut
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/gui/qt4/OpenWalnutAbout.html ${PROJECT_BINARY_DIR}/share/OpenWalnut
COMMENT "Copy about page"
#---------- shell scripts ------------- #---------- shell scripts -------------
add_custom_target( binDirectoryConfiguration add_custom_target( binDirectoryConfiguration
Copyright 2009-2011 OpenWalnut community, BSV@Uni-Leipzig, and
CNCF@MPI-CBS. For more information see
<a href=""></a>.<br><br>
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under the terms of the GNU Lesser General Public License.
You should have received a copy of the GNU Lesser General Public License
along with OpenWalnut. If not, see
&lt;<a href=""></a>&gt;.<br>
Website: <a href=""></a><br>
Email: <a href=""></a>
<h4>Contributors up to version 1.2:</h4>
<i>(in alphabetical order, current administrators in bold font)</i><br>
Dirk Albrecht, <b>Sebastian Eichelbaum</b>, Robert Frohl, <b>Mathias Goldau</b>, Christian Heine,
Mario Hlawitschka, Sebastian Kiunke, Robin Ledig, Cornelius Mueller,
Andre Reichenbach, <b>Ralph Schurade</b>, Marcus Stuber, <b>Alexander Wiebel</b>.<br>
<i>Thank you for using OpenWalnut!</i>
\ No newline at end of file
...@@ -45,9 +45,9 @@ ...@@ -45,9 +45,9 @@
#include "../../common/WColor.h" #include "../../common/WColor.h"
#include "../../common/WPreferences.h" #include "../../common/WPreferences.h"
#include "../../common/WIOTools.h"
#include "../../common/WProjectFileIO.h" #include "../../common/WProjectFileIO.h"
#include "../../common/WPathHelper.h" #include "../../common/WPathHelper.h"
#include "../../common/exceptions/WFileNotFound.h"
#include "../../dataHandler/WDataSetFibers.h" #include "../../dataHandler/WDataSetFibers.h"
#include "../../dataHandler/WDataSetSingle.h" #include "../../dataHandler/WDataSetSingle.h"
#include "../../dataHandler/WEEG2.h" #include "../../dataHandler/WEEG2.h"
...@@ -717,39 +717,19 @@ void WMainWindow::openAboutQtDialog() ...@@ -717,39 +717,19 @@ void WMainWindow::openAboutQtDialog()
{ {
QMessageBox::aboutQt( this, "About Qt" ); QMessageBox::aboutQt( this, "About Qt" );
} }
void WMainWindow::openAboutDialog() void WMainWindow::openAboutDialog()
{ {
QMessageBox::about( this, "About OpenWalnut", std::string filename( WPathHelper::getAppPath().file_string() + "/../share/OpenWalnut/OpenWalnutAbout.html" );
"OpenWalnut ( )\n\n" std::string content = wiotools::getStringFromFile( filename );
"Copyright 2009-2010 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS. " QMessageBox::about( this, "About OpenWalnut", content.c_str() );
"For more information see\n\n"
"This program comes with ABSOLUTELY NO WARRANTY. "
"This is free software, and you are welcome to redistribute it "
"under the terms of the GNU Lesser General Public License. "
"You should have received a copy of the GNU Lesser General Public License "
"along with OpenWalnut. If not, see <>.\n"
"Thank you for using OpenWalnut." );
} }
void WMainWindow::openOpenWalnutHelpDialog() void WMainWindow::openOpenWalnutHelpDialog()
{ {
std::string filename( WPathHelper::getAppPath().file_string() + "/../share/OpenWalnut/OpenWalnutHelp.html" ); std::string filename( WPathHelper::getAppPath().file_string() + "/../share/OpenWalnut/OpenWalnutHelp.html" );
std::ifstream input( filename.c_str() ); std::string content = wiotools::getStringFromFile( filename );
if ( !input.is_open() ) QMessageBox::information( this, "OpenWalnut Help", content.c_str() );
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() 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