Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
ab6bd054
Commit
ab6bd054
authored
Mar 09, 2011
by
Alexander Wiebel
Browse files
[CHANGE] store about dialog contents in HTML file
parent
e465b555
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
28 deletions
+37
-28
src/CMakeLists.txt
src/CMakeLists.txt
+8
-1
src/gui/qt4/OpenWalnutAbout.html
src/gui/qt4/OpenWalnutAbout.html
+22
-0
src/gui/qt4/WMainWindow.cpp
src/gui/qt4/WMainWindow.cpp
+7
-27
No files found.
src/CMakeLists.txt
View file @
ab6bd054
...
...
@@ -294,13 +294,20 @@ add_custom_target( fontsDirectoryConfiguration
)
#----------
online
help -------------
#----------
OpenWalnut
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"
)
#---------- 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 -------------
IF
(
CMAKE_GENERATOR MATCHES
"Visual Studio"
)
add_custom_target
(
binDirectoryConfiguration
...
...
src/gui/qt4/OpenWalnutAbout.html
0 → 100644
View file @
ab6bd054
<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
<
<a
href=
"http://www.gnu.org/licenses"
>
http://www.gnu.org/licenses
</a>
>
.
<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
src/gui/qt4/WMainWindow.cpp
View file @
ab6bd054
...
...
@@ -45,9 +45,9 @@
#include "../../common/WColor.h"
#include "../../common/WPreferences.h"
#include "../../common/WIOTools.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"
...
...
@@ -717,39 +717,19 @@ void WMainWindow::openAboutQtDialog()
{
QMessageBox
::
aboutQt
(
this
,
"About Qt"
);
}
void
WMainWindow
::
openAboutDialog
()
{
QMessageBox
::
about
(
this
,
"About OpenWalnut"
,
"OpenWalnut ( http://www.openwalnut.org )
\n\n
"
"Copyright 2009-2010 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS. "
"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."
);
std
::
string
filename
(
WPathHelper
::
getAppPath
().
file_string
()
+
"/../share/OpenWalnut/OpenWalnutAbout.html"
);
std
::
string
content
=
wiotools
::
getStringFromFile
(
filename
);
QMessageBox
::
about
(
this
,
"About OpenWalnut"
,
content
.
c_str
()
);
}
void
WMainWindow
::
openOpenWalnutHelpDialog
()
{
std
::
string
filename
(
WPathHelper
::
getAppPath
().
file_string
()
+
"/../share/OpenWalnut/OpenWalnutHelp.html"
);
std
::
ifstream
input
(
filename
.
c_str
()
);
if
(
!
input
.
is_open
()
)
{
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
()
);
std
::
string
content
=
wiotools
::
getStringFromFile
(
filename
);
QMessageBox
::
information
(
this
,
"OpenWalnut Help"
,
content
.
c_str
()
);
}
void
WMainWindow
::
setPresetViewLeft
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment