Skip to content
Permalink
Browse files

Port away from KHTML

Summary:
- use resources for included HTML files
- replace KHTML part with QTextBrowser
- open links to external websites (i.e. Wikipedia) via external web browser
- remove code for downloading and converting Wikipedia page downloads
- change all external links to https
- remove KHTML dependency

Reviewers: yurchor, vkrause

Reviewed By: yurchor, vkrause

Subscribers: vkrause, yurchor, kde-edu

Tags: #kde_edu

Maniphest Tasks: T11573

Differential Revision: https://phabricator.kde.org/D23862
  • Loading branch information
cordlandwehr committed Sep 11, 2019
1 parent 07f5c13 commit 654d5fd3472d5e39a0c19102b98800f0fdc09294
Showing with 85 additions and 237 deletions.
  1. +6 −4 CMakeLists.txt
  2. +7 −3 step/CMakeLists.txt
  3. +2 −2 step/data/CMakeLists.txt
  4. +0 −7 step/data/{objinfo → objectinfo}/CMakeLists.txt
  5. 0 step/data/{objinfo/Anchor.html → objectinfo/anchor.html}
  6. 0 step/data/{objinfo/Box.html → objectinfo/box.html}
  7. 0 step/data/{objinfo/ChargedParticle.html → objectinfo/chargedparticle.html}
  8. +1 −1 step/data/{objinfo/CoulombForce.html → objectinfo/coulombforce.html}
  9. 0 step/data/{objinfo/Disk.html → objectinfo/disk.html}
  10. +1 −1 step/data/{objinfo/Gas.html → objectinfo/gas.html}
  11. +1 −1 step/data/{objinfo/GasLJForce.html → objectinfo/gasljforce.html}
  12. 0 step/data/{objinfo/GasParticle.html → objectinfo/gasparticle.html}
  13. +1 −1 step/data/{objinfo/GravitationForce.html → objectinfo/gravitationforce.html}
  14. 0 step/data/{objinfo/LinearMotor.html → objectinfo/linearmotor.html}
  15. 0 step/data/{objinfo/Meter.html → objectinfo/meter.html}
  16. 0 step/data/{objinfo/Note.html → objectinfo/note.html}
  17. 0 step/data/{objinfo/Particle.html → objectinfo/particle.html}
  18. 0 step/data/{objinfo/Pin.html → objectinfo/pin.html}
  19. 0 step/data/{objinfo/Polygon.html → objectinfo/polygon.html}
  20. 0 step/data/{objinfo/Spring.html → objectinfo/spring.html}
  21. +1 −1 step/data/{objinfo/WeightForce.html → objectinfo/weightforce.html}
  22. 0 step/data/{objinfo/World.html → objectinfo/world.html}
  23. +22 −0 step/data/resources.qrc
  24. +40 −209 step/infobrowser.cc
  25. +3 −7 step/infobrowser.h
@@ -32,32 +32,34 @@ find_package(Qt5 5.2 REQUIRED NO_MODULE COMPONENTS

find_package(KF5 REQUIRED COMPONENTS
Crash
KHtml
Config
I18n
IconThemes
KIO
NewStuff
Plotting
TextWidgets
)
find_package(Eigen3 3.2.2 REQUIRED)
find_package(GSL)
find_package(Qalculate)

set_package_properties(EIGEN3 PROPERTIES
DESCRIPTION "Eigen3"
DESCRIPTION "Eigen3"
URL "http://eigen.tuxfamily.org"
TYPE OPTIONAL
PURPOSE "Required to build step")

set_package_properties(QALCULATE PROPERTIES
# REQUIRED_VERSION "0.9.5"
DESCRIPTION "Qalculate"
DESCRIPTION "Qalculate"
URL "http://qalculate.sourceforge.net/"
TYPE OPTIONAL
PURPOSE "Unit conversion support in Step")

set_package_properties(GSL PROPERTIES
# REQUIRED_VERSION "1.8"
DESCRIPTION "GSL"
DESCRIPTION "GSL"
URL "http://eigen.tuxfamily.org"
TYPE OPTIONAL
PURPOSE "Provides a GSL-powered solver for Step")
@@ -60,8 +60,9 @@ if(STEP_WITH_QALCULATE)
add_definitions (-fexceptions)
endif(STEP_WITH_QALCULATE)

ki18n_wrap_ui( step_SRCS ${step_UIS} )
kconfig_add_kcfg_files( step_SRCS ${step_KCFGS} )
qt5_add_resources(step_SRCS data/resources.qrc)
ki18n_wrap_ui(step_SRCS ${step_UIS})
kconfig_add_kcfg_files(step_SRCS ${step_KCFGS})

include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
@@ -73,8 +74,11 @@ add_executable(step ${step_SRCS})
target_link_libraries(step
stepcore
KF5::Crash
KF5::I18n
KF5::IconThemes
KF5::KHtml
KF5::KIOCore
KF5::KIOWidgets
KF5::TextWidgets
KF5::Plotting
KF5::NewStuff
Qt5::OpenGL
@@ -21,7 +21,7 @@ if(STEP_BUILD_TRANSLATIONS)
set(_addToAll ALL)
list(REMOVE_AT _args 0)
endif("${_tmp}" STREQUAL "ALL")

list(GET _args 0 _tmp)
if("${_tmp}" STREQUAL "INSTALL_DESTINATION")
list(GET _args 1 _installDest )
@@ -65,7 +65,7 @@ if(STEP_BUILD_TRANSLATIONS)

endif(STEP_BUILD_TRANSLATIONS)

add_subdirectory(objinfo)
add_subdirectory(objectinfo)
add_subdirectory(examples)
add_subdirectory(tutorials)

@@ -7,11 +7,4 @@ if(STEP_BUILD_TRANSLATIONS)
"--context='%(filename)s:%(tag)s' --tag-regex='^(?:title|body|p|h[1-6])$$' --recursive --strip"
ALL INSTALL_DESTINATION ${KDE_INSTALL_DATADIR}/step/objinfo
${INFO_HTML_FILES})

else(STEP_BUILD_TRANSLATIONS)

install(FILES
${INFO_HTML_FILES}
DESTINATION ${KDE_INSTALL_DATADIR}/step/objinfo)

endif(STEP_BUILD_TRANSLATIONS)
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -9,6 +9,6 @@
<p>Coulomb force is a force of interaction between charged particles.</p>
<p><b>Coulomb's law</b></p>
<li>The magnitude of the electrostatic force between two point electric charges is directly proportional to the product of the magnitudes of each of the charges and inversely proportional to the square of the distance between the two charges.</li>
<p>For more details, please refer to the <a href="http://en.wikipedia.org/wiki/Coulomb%27s_law">Coulomb Force</a>.</p>
<p>For more details, please refer to the <a href="https://en.wikipedia.org/wiki/Coulomb%27s_law">Coulomb Force</a>.</p>
</body>
</html>
File renamed without changes.
@@ -7,6 +7,6 @@
</head>
<body>
<p>A gas is a collection of <a href="objinfo:GasParticle">gasoline particles</a>. Associated with the gas is a <a href="objinfo:GasLJForce">force</a>. To add gas particles rightclick the gas and click on "Create particles".</p>
<p>For details about the math used to calculate the forces, please refer to the <a href="http://en.wikipedia.org/wiki/Lennard-Jones_potential">Lennard-Jones potential</a>.</p>
<p>For details about the math used to calculate the forces, please refer to the <a href="https://en.wikipedia.org/wiki/Lennard-Jones_potential">Lennard-Jones potential</a>.</p>
</body>
</html>
@@ -6,7 +6,7 @@
<title>Force</title>
</head>
<body>
<p>This force simulates the <a href="http://en.wikipedia.org/wiki/Lennard-Jones_potential">Lennard-Jones potential</a>. There are three parameters for this force:</p>
<p>This force simulates the <a href="https://en.wikipedia.org/wiki/Lennard-Jones_potential">Lennard-Jones potential</a>. There are three parameters for this force:</p>
<ul>
<li><b>depth:</b> The minimum value of the Lennard-Jones potential wall</li>
<li><b>rmin:</b> The distance from the origin to the minimum of the potential</li>
File renamed without changes.
@@ -11,6 +11,6 @@
<li>Every body in the universe attracts every other body with a force, which is proportional to the product of the masses of the bodies and inversely proportional to square of the distance between them.</li>
<p><b>General relativity</b></p>
<li>In general relativity gravitation is explained on the basis of curvature of space-time.</li>
<p>For more details, please refer to the <a href="http://en.wikipedia.org/wiki/Gravitation">Gravitation Force</a>.</p>
<p>For more details, please refer to the <a href="https://en.wikipedia.org/wiki/Gravitation">Gravitation Force</a>.</p>
</body>
</html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -10,6 +10,6 @@
<p>Weight is a vector quantity. It is often denoted by W and given by the relation W = mg.</p>
<li>Where, <b>m</b> is the mass of the body</li>
<li>and <b>g</b> is the acceleration due to gravity.</li>
<p>For more details, please refer to the <a href="http://en.wikipedia.org/wiki/Weight">Weight Force</a>.</p>
<p>For more details, please refer to the <a href="https://en.wikipedia.org/wiki/Weight">Weight Force</a>.</p>
</body>
</html>
File renamed without changes.
@@ -0,0 +1,22 @@
<RCC>
<qresource>
<file>objectinfo/anchor.html</file>
<file>objectinfo/box.html</file>
<file>objectinfo/chargedparticle.html</file>
<file>objectinfo/coulombforce.html</file>
<file>objectinfo/disk.html</file>
<file>objectinfo/gas.html</file>
<file>objectinfo/gasljforce.html</file>
<file>objectinfo/gasparticle.html</file>
<file>objectinfo/gravitationforce.html</file>
<file>objectinfo/linearmotor.html</file>
<file>objectinfo/meter.html</file>
<file>objectinfo/note.html</file>
<file>objectinfo/particle.html</file>
<file>objectinfo/pin.html</file>
<file>objectinfo/polygon.html</file>
<file>objectinfo/spring.html</file>
<file>objectinfo/weightforce.html</file>
<file>objectinfo/world.html</file>
</qresource>
</RCC>

0 comments on commit 654d5fd

Please sign in to comment.
You can’t perform that action at this time.