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 -------------
ADD_CUSTOM_TARGET( onlineHelp ADD_CUSTOM_TARGET( onlineHelp
ALL ALL
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
ALL
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 -------------
IF( CMAKE_GENERATOR MATCHES "Visual Studio" ) IF( CMAKE_GENERATOR MATCHES "Visual Studio" )
add_custom_target( binDirectoryConfiguration add_custom_target( binDirectoryConfiguration
......
<h1>OpenWalnut</h1>
Copyright 2009-2011 OpenWalnut community, BSV@Uni-Leipzig, and
CNCF@MPI-CBS. For more information see
<a href="http://www.openwalnut.org/copying">http://www.openwalnut.org/copying</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="http://www.gnu.org/licenses">http://www.gnu.org/licenses</a>&gt;.<br>
<h4>Contact</h4>
Website: <a href="http://www.openwalnut.org">http://www.openwalnut.org</a><br>
Email: <a href="mailto:contact@openwalnut.org">contact@openwalnut.org</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>
<br><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 ( http://www.openwalnut.org )\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 http://www.openwalnut.org/copying.\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 <http://www.gnu.org/licenses/>.\n"
"\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