diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8c342f8c0406df3d096b041aaf3438b167a6f936..6bc30a6546e8f40714e0a8d72314a5cf44b36852 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,4 +49,4 @@ make-linux: after_script: - - echo "End CI" # todo: run report script + - echo "End CI" # todo: run report script \ No newline at end of file diff --git a/AUTHORS b/AUTHORS index 98b4a91eca9aa804678df723ba5fe676df033376..37ee30dc427842bc7f0cfed08dd436a6b5fcf224 100644 --- a/AUTHORS +++ b/AUTHORS @@ -19,11 +19,12 @@ Nick Sohre (University of Minnesota) Yao Xiao JPSeditor contributors: -(Date: 16.08.2017) +(Date: 03.09.2017) Erik Andresen Mohcine Chraibi Nick Sohre (University of Minnesota) Maximilian Osterkamp (BUW) Aaron Schumacher (BUW) +Tao Zhong diff --git a/CHANGELOG.md b/CHANGELOG.md index 306046985d438584c81c7faa4a8f9d11534ca2b7..768153e921ddd257fd0d9063990aecd24804146d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,24 @@ # Change Log All notable changes to this project will be documented in this file. +## v0.8.4 [05.10.2018] +## Added +- In menu bar, under "Edit" you will find "Clear Rooms and Doors button" to clear all defined rooms and doors. + +- Define points of a line using keyboard on status bar. + +## Changed +- A new tidily icons are added. + +## Bugs fixed +- Fixed a crash when deleting rooms. + +- Fixed a problem when width of lines change after highlighting. + +- Fixed a problem when room is deleted bug caption is still there. + +- Fixed a problem when captions are overlapped. + ## v0.8.3 [16.05.2018] ### Added - Now user can type x and y to define endpoint for line and Hline. !7 diff --git a/CMakeLists.txt b/CMakeLists.txt index 4761ed34e48dbec135d0357bd4a26cb29eed0178..47f4a1e13428941bf35f43e9662a89dc9c48d6e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,13 +2,13 @@ # automatically, set the CMAKE_PREFIX_PATH environment variable. # For example: "export CMAKE_PREFIX_PATH=/usr/local/trolltech/qt4.3.5" # Specify the path to qmake with QT_QMAKE_EXECUTABLE -# +# # Available flags (-D): #================ # 1. CMAKE_BUILD_TYPE=Release (default Debug) # 2. DESIRED_QT_VERSION=5 (default 4) # example: >> cmake -DDESIRED_QT_VERSION=5 -DCMAKE_PREFIX_PATH=~/Qt/5.5/clang_64 .. -# Flags for VS: -G "Visual Studio ..." -DCMAKE_PREFIX_PATH=... -DCMAKE_C_FLAGS="-mwindows" +# Flags for VS: -G "Visual Studio ..." -DCMAKE_PREFIX_PATH=... -DCMAKE_C_FLAGS="-mwindows" cmake_minimum_required(VERSION 2.8.9) IF (POLICY CMP0048) # in CMake 3.0.0+ @@ -19,7 +19,7 @@ IF (POLICY CMP0043) # in CMake 3.0.0+ ENDIF (POLICY CMP0043) IF (POLICY CMP0020) CMAKE_POLICY (SET CMP0020 OLD) # keep old POLICY (2.8.10 and lower) The OLD behavior for this policy is not to link executables to -ENDIF (POLICY CMP0020) #qtmain.lib automatically when they link to the QtCore IMPORTEDtarget +ENDIF (POLICY CMP0020) #qtmain.lib automatically when they link to the QtCore IMPORTEDtarget IF (POLICY CMP0025) cmake_policy(SET CMP0025 NEW) #fixes error No known features for CXX compiler (on mac) @@ -34,7 +34,7 @@ set(README_FILE "${CMAKE_SOURCE_DIR}/README.md") set(CMAKE_COLOR_MAKEFILE ON) set(JPSEDITOR_MAJOR_VERSION 0) set(JPSEDITOR_MINOR_VERSION 8) -set(JPSEDITOR_PATCH_VERSION 2) +set(JPSEDITOR_PATCH_VERSION 4) set(JPSEDITOR_VERSION ${JPSEDITOR_MAJOR_VERSION}.${JPSEDITOR_MINOR_VERSION}.${JPSEDITOR_PATCH_VERSION}) @@ -46,10 +46,10 @@ message( STATUS "Generating ................................... ${PROJECT_NAME} # ------------------------- Begin Generic CMake Variable Logging ------------------ -# the compiler used for C files +# the compiler used for C files # message( STATUS "CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER} ) -# the compiler used for C++ files +# the compiler used for C++ files # message( STATUS "CMAKE_CXX_COMPILER: " ${CMAKE_CXX_COMPILER} ) # ------------------------- End of Generic CMake Variable Logging ------------------ @@ -76,7 +76,7 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) if(APPLE AND CMAKE_INSTALL_PREFIX MATCHES "/usr/local") - set(CMAKE_INSTALL_PREFIX "/Applications") + set(CMAKE_INSTALL_PREFIX "/Applications") endif() message(STATUS "${PROJECT_NAME} will be installed to ${CMAKE_INSTALL_PREFIX}") @@ -99,47 +99,47 @@ endif() set( SRCS src/mainWindow.cpp - src/main.cpp + src/main.cpp src/GraphicView.cpp src/graphicscene.cpp src/roomwidget.cpp src/rooms.cpp - src/datamanager.cpp - src/jpscrossing.cpp - src/jpsLineItem.cpp + src/datamanager.cpp + src/jpscrossing.cpp + src/jpsLineItem.cpp src/jpsexit.cpp - src/jpsobstacle.cpp + src/jpsobstacle.cpp src/jpslandmark.cpp src/widgetlandmark.cpp src/widgetsettings.cpp src/jpsconnection.cpp - src/jpsregion.cpp + src/jpsregion.cpp dxflib/src/dl_writer_ascii.cpp dxflib/src/dl_dxf.cpp src/UndoFramework/action.cpp src/UndoFramework/actionstack.cpp src/UndoFramework/lineaction.cpp - src/AutomaticRoomIdentification/roomdefinition.cpp + src/AutomaticRoomIdentification/roomdefinition.cpp src/AutomaticRoomIdentification/roomidentification.cpp - ) + ) # all header files that should be treated with moc set( HDR src/dtrace.h - src/mainWindow.h + src/mainWindow.h src/GraphicView.h src/graphicscene.h src/roomwidget.h src/rooms.h - src/datamanager.h - src/jpscrossing.h - src/jpsLineItem.h - src/jpsexit.h + src/datamanager.h + src/jpscrossing.h + src/jpsLineItem.h + src/jpsexit.h src/jpsobstacle.h src/jpslandmark.h src/widgetlandmark.h src/widgetsettings.h src/jpsconnection.h - src/jpsregion.h + src/jpsregion.h dxflib/src/dl_writer_ascii.h dxflib/src/dl_writer.h dxflib/src/dl_global.h @@ -154,11 +154,11 @@ set( HDR src/UndoFramework/action.h src/UndoFramework/actionstack.h src/UndoFramework/lineaction.h - src/AutomaticRoomIdentification/roomID.h - src/AutomaticRoomIdentification/roomdefinition.h - src/AutomaticRoomIdentification/roomidentification.h + src/AutomaticRoomIdentification/roomID.h + src/AutomaticRoomIdentification/roomdefinition.h + src/AutomaticRoomIdentification/roomidentification.h src/dtrace.h - + ) # *.ui files @@ -171,7 +171,7 @@ set( UIS # and finally a resource file set( RCS - forms/Ressource.qrc + Resources/resources.qrc ) @@ -224,7 +224,7 @@ if("${DESIRED_QT_VERSION}" STREQUAL "5") set(QT5_INSTALLED TRUE) # MESSAGE(STATUS "Found Qt version: ${Qt5Core_VERSION_STRING}") elseif("${DESIRED_QT_VERSION}" STREQUAL "4") - + # QT4_INSTALLED is set to TRUE if qt4 is found and # QT3_INSTALLED is set to TRUE if qt3 is found. FIND_PACKAGE(Qt COMPONENTS QtXml QT_USE_QTNETWORK QtXmlPatterns REQUIRED) @@ -262,15 +262,15 @@ if(${QT4_INSTALLED}) ADD_EXECUTABLE( jpseditor MACOSX_BUNDLE WIN32 ${SRCS} ${MOC_HDRS} - ${UI_HDRS} + ${UI_HDRS} ${RCS} ) TARGET_LINK_LIBRARIES( jpseditor ${QT_LIBRARIES}) elseif( ${QT5_INSTALLED}) message(STATUS "Working with Qt5") # http://www.kdab.com/using-cmake-with-qt-5/ - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}" ) - + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}" ) + qt5_wrap_ui( UI_HDRS ${UIS} ) qt5_add_resources( RCS ${RCS} ) #qt5_use_package(JPSeditor Widgets) @@ -278,14 +278,14 @@ elseif( ${QT5_INSTALLED}) ADD_EXECUTABLE( jpseditor MACOSX_BUNDLE WIN32 ${SRCS} ${MOC_HDRS} - ${UI_HDRS} + ${UI_HDRS} ${RCS} ) qt5_use_modules(jpseditor Widgets) target_link_libraries(jpseditor ${Qt5Widgets_LIBRARIES}) else() message(FATAL_ERROR "QT NOT BE FOUND - ABORT") -endif() +endif() IF(APPLE) SET(MACOSX_BUNDLE_ICON_FILE jupedsim.icns) @@ -316,19 +316,19 @@ if(CMAKE_COMPILER_IS_GNUCXX) message( STATUS "Using compiler ................................ g++ (${CMAKE_CXX_COMPILER_VERSION}") endif(CMAKE_COMPILER_IS_GNUCXX) -if(CMAKE_BUILD_TYPE MATCHES Debug) - +if(CMAKE_BUILD_TYPE MATCHES Debug) + set(CMAKE_CXX_LDFLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTRACE_LOGGING") message(STATUS "Debug flags: " ${CMAKE_CXX_FLAGS} " " ${CMAKE_CXX_FLAGS_DEBUG} ) - message(STATUS "Debug flags ..................................." ${CMAKE_CXX_FLAGS} " " ${CMAKE_CXX_FLAGS_DEBUG} ) + message(STATUS "Debug flags ..................................." ${CMAKE_CXX_FLAGS} " " ${CMAKE_CXX_FLAGS_DEBUG} ) else(CMAKE_BUILD_TYPE MATCHES Debug) message(STATUS "Release flags ................................." ${CMAKE_CXX_FLAGS} " , " ${CMAKE_CXX_FLAGS_RELEASE} ) endif(CMAKE_BUILD_TYPE MATCHES Debug) # PGI ++ Flags if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --c++11 -Minform=inform") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --c++11 -Minform=inform") endif() #-------------------------------------------------------------------------------- # Now the installation stuff below @@ -339,7 +339,7 @@ SET(APPS "\${CMAKE_INSTALL_PREFIX}/bin/jpseditor") IF(APPLE) SET(plugin_dest_dir jpseditor.app/Contents/MacOS) SET(qtconf_dest_dir jpseditor.app/Contents/Resources) - SET(APPS "\${CMAKE_INSTALL_PREFIX}/jpseditor.app") + SET(APPS "\${CMAKE_INSTALL_PREFIX}/jpseditor.app") ENDIF(APPLE) IF(WIN32) @@ -393,7 +393,7 @@ endif() # over. # if(APPLE) -INSTALL(CODE " +INSTALL(CODE " file(GLOB_RECURSE QTPLUGINS \"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\") image @@ -455,7 +455,7 @@ elseif(APPLE) # todo test this for apple #set(CPACK_DMG_DS_STORE "${ICONS_DIR}/DMGDSStore") #set(CPACK_DMG_BACKGROUND_IMAGE "${ICONS_DIR}/DMGBackground.png") elseif(UNIX) - # tested with success in + # tested with success in # Linux dhcppc5 3.2.0-4-686-pae #1 SMP Debian 3.2.68-1+deb7u2 i686 GNU/Linux set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") SET(CPACK_GENERATOR "DEB") @@ -505,4 +505,3 @@ endif() # install_qt5_executable("${EXECUTABLE}" "qsqlite") # endif() # endif() - diff --git a/forms/Delete.png b/Resources/Icons/Delete.png similarity index 100% rename from forms/Delete.png rename to Resources/Icons/Delete.png diff --git a/forms/DeleteAll.png b/Resources/Icons/DeleteAll.png similarity index 100% rename from forms/DeleteAll.png rename to Resources/Icons/DeleteAll.png diff --git a/forms/DeleteC.png b/Resources/Icons/DeleteC.png similarity index 100% rename from forms/DeleteC.png rename to Resources/Icons/DeleteC.png diff --git a/forms/Door.png b/Resources/Icons/Door.png similarity index 100% rename from forms/Door.png rename to Resources/Icons/Door.png diff --git a/forms/DoorC.png b/Resources/Icons/DoorC.png similarity index 100% rename from forms/DoorC.png rename to Resources/Icons/DoorC.png diff --git a/forms/Exit.png b/Resources/Icons/Exit.png similarity index 100% rename from forms/Exit.png rename to Resources/Icons/Exit.png diff --git a/forms/ExitC.png b/Resources/Icons/ExitC.png similarity index 100% rename from forms/ExitC.png rename to Resources/Icons/ExitC.png diff --git a/forms/GridC.png b/Resources/Icons/GridC.png similarity index 100% rename from forms/GridC.png rename to Resources/Icons/GridC.png diff --git a/forms/Pers1.png b/Resources/Icons/Pers1.png similarity index 100% rename from forms/Pers1.png rename to Resources/Icons/Pers1.png diff --git a/forms/Pers2.png b/Resources/Icons/Pers2.png similarity index 100% rename from forms/Pers2.png rename to Resources/Icons/Pers2.png diff --git a/forms/Pers3.png b/Resources/Icons/Pers3.png similarity index 100% rename from forms/Pers3.png rename to Resources/Icons/Pers3.png diff --git a/forms/Pers4.png b/Resources/Icons/Pers4.png similarity index 100% rename from forms/Pers4.png rename to Resources/Icons/Pers4.png diff --git a/forms/Pers5.png b/Resources/Icons/Pers5.png similarity index 100% rename from forms/Pers5.png rename to Resources/Icons/Pers5.png diff --git a/forms/Pers6.png b/Resources/Icons/Pers6.png similarity index 100% rename from forms/Pers6.png rename to Resources/Icons/Pers6.png diff --git a/forms/Pers7.png b/Resources/Icons/Pers7.png similarity index 100% rename from forms/Pers7.png rename to Resources/Icons/Pers7.png diff --git a/forms/Pers8.png b/Resources/Icons/Pers8.png similarity index 100% rename from forms/Pers8.png rename to Resources/Icons/Pers8.png diff --git a/forms/Person.png b/Resources/Icons/Person.png similarity index 100% rename from forms/Person.png rename to Resources/Icons/Person.png diff --git a/forms/PersonC.png b/Resources/Icons/PersonC.png similarity index 100% rename from forms/PersonC.png rename to Resources/Icons/PersonC.png diff --git a/forms/Redo-Icon.png b/Resources/Icons/Redo-Icon.png similarity index 100% rename from forms/Redo-Icon.png rename to Resources/Icons/Redo-Icon.png diff --git a/forms/Room.png b/Resources/Icons/Room.png similarity index 100% rename from forms/Room.png rename to Resources/Icons/Room.png diff --git a/forms/Step.png b/Resources/Icons/Step.png similarity index 100% rename from forms/Step.png rename to Resources/Icons/Step.png diff --git a/forms/StepC.png b/Resources/Icons/StepC.png similarity index 100% rename from forms/StepC.png rename to Resources/Icons/StepC.png diff --git a/forms/Trans.png b/Resources/Icons/Trans.png similarity index 100% rename from forms/Trans.png rename to Resources/Icons/Trans.png diff --git a/forms/TransC.png b/Resources/Icons/TransC.png similarity index 100% rename from forms/TransC.png rename to Resources/Icons/TransC.png diff --git a/forms/Undo-icon.png b/Resources/Icons/Undo-icon.png similarity index 100% rename from forms/Undo-icon.png rename to Resources/Icons/Undo-icon.png diff --git a/forms/Wall.png b/Resources/Icons/Wall.png similarity index 100% rename from forms/Wall.png rename to Resources/Icons/Wall.png diff --git a/forms/WallC.png b/Resources/Icons/WallC.png similarity index 100% rename from forms/WallC.png rename to Resources/Icons/WallC.png diff --git a/forms/anglesnap.PNG b/Resources/Icons/anglesnap.png similarity index 100% rename from forms/anglesnap.PNG rename to Resources/Icons/anglesnap.png diff --git a/forms/autoRoom.png b/Resources/Icons/autoRoom.png similarity index 100% rename from forms/autoRoom.png rename to Resources/Icons/autoRoom.png diff --git a/forms/basicCursor.png b/Resources/Icons/basicCursor.png similarity index 100% rename from forms/basicCursor.png rename to Resources/Icons/basicCursor.png diff --git a/Resources/Icons/door-open.svg b/Resources/Icons/door-open.svg new file mode 100644 index 0000000000000000000000000000000000000000..e7b8890ffa16977f4a373a5587f6f260dd09998a --- /dev/null +++ b/Resources/Icons/door-open.svg @@ -0,0 +1,5 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M624 448h-80V113.45C544 86.19 522.47 64 496 64H384v64h96v384h144c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM312.24 1.01l-192 49.74C105.99 54.44 96 67.7 96 82.92V448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h336V33.18c0-21.58-19.56-37.41-39.76-32.17zM264 288c-13.25 0-24-14.33-24-32s10.75-32 24-32 24 14.33 24 32-10.75 32-24 32z"/></svg> +<!-- +Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com +License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) +--> \ No newline at end of file diff --git a/Resources/Icons/eraser.svg b/Resources/Icons/eraser.svg new file mode 100644 index 0000000000000000000000000000000000000000..6f7ef3f0d6527f6c49fbf4c8cbadd3fd2af90848 --- /dev/null +++ b/Resources/Icons/eraser.svg @@ -0,0 +1,5 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"/></svg> +<!-- +Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com +License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) +--> \ No newline at end of file diff --git a/Resources/Icons/file-import.svg b/Resources/Icons/file-import.svg new file mode 100644 index 0000000000000000000000000000000000000000..a2484f6a0e601029db0a1d89f289a6d1bbeb25a6 --- /dev/null +++ b/Resources/Icons/file-import.svg @@ -0,0 +1,5 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M16 288c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h112v-64H16zm336-152V0H152c-13.3 0-24 10.7-24 24v264h127.99v-65.18c0-14.28 17.29-21.41 27.36-11.27l95.7 96.43c6.6 6.65 6.6 17.39 0 24.04l-95.7 96.42c-10.06 10.14-27.36 3.01-27.36-11.27V352H128v136c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H376c-13.2 0-24-10.8-24-24zm153-31L407.1 7c-4.5-4.5-10.6-7-17-7H384v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"/></svg> +<!-- +Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com +License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) +--> \ No newline at end of file diff --git a/forms/filesave.png b/Resources/Icons/filesave.png similarity index 100% rename from forms/filesave.png rename to Resources/Icons/filesave.png diff --git a/forms/filesaveas.png b/Resources/Icons/filesaveas.png similarity index 100% rename from forms/filesaveas.png rename to Resources/Icons/filesaveas.png diff --git a/Resources/Icons/flag.svg b/Resources/Icons/flag.svg new file mode 100644 index 0000000000000000000000000000000000000000..a8b1edec64382d9d545a34a1f7862dc20ae03b60 --- /dev/null +++ b/Resources/Icons/flag.svg @@ -0,0 +1,5 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M336.174 80c-49.132 0-93.305-32-161.913-32-31.301 0-58.303 6.482-80.721 15.168a48.04 48.04 0 0 0 2.142-20.727C93.067 19.575 74.167 1.594 51.201.104 23.242-1.71 0 20.431 0 48c0 17.764 9.657 33.262 24 41.562V496c0 8.837 7.163 16 16 16h16c8.837 0 16-7.163 16-16v-83.443C109.869 395.28 143.259 384 199.826 384c49.132 0 93.305 32 161.913 32 58.479 0 101.972-22.617 128.548-39.981C503.846 367.161 512 352.051 512 335.855V95.937c0-34.459-35.264-57.768-66.904-44.117C409.193 67.309 371.641 80 336.174 80zM464 336c-21.783 15.412-60.824 32-102.261 32-59.945 0-102.002-32-161.913-32-43.361 0-96.379 9.403-127.826 24V128c21.784-15.412 60.824-32 102.261-32 59.945 0 102.002 32 161.913 32 43.271 0 96.32-17.366 127.826-32v240z"/></svg> +<!-- +Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com +License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) +--> \ No newline at end of file diff --git a/Resources/Icons/folder-open.svg b/Resources/Icons/folder-open.svg new file mode 100644 index 0000000000000000000000000000000000000000..f55a8eedc2b4ee4426ad903478e9cd811c1f15d1 --- /dev/null +++ b/Resources/Icons/folder-open.svg @@ -0,0 +1,5 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M527.943 224H480v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h400a48.001 48.001 0 0 0 40.704-22.56l79.942-128c19.948-31.917-3.038-73.44-40.703-73.44zM54 112h134.118l64 64H426a6 6 0 0 1 6 6v42H152a48 48 0 0 0-41.098 23.202L48 351.449V117.993A5.993 5.993 0 0 1 54 112zm394 288H72l77.234-128H528l-80 128z"/></svg> +<!-- +Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com +License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) +--> \ No newline at end of file diff --git a/Resources/Icons/grid.png b/Resources/Icons/grid.png new file mode 100644 index 0000000000000000000000000000000000000000..1b7a5f6cac7086ae9268c91571420f03f78c0c47 Binary files /dev/null and b/Resources/Icons/grid.png differ diff --git a/Resources/Icons/hand-pointer.svg b/Resources/Icons/hand-pointer.svg new file mode 100644 index 0000000000000000000000000000000000000000..769895084b1dd4a1319b7f91867b74124925fe48 --- /dev/null +++ b/Resources/Icons/hand-pointer.svg @@ -0,0 +1,5 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M358.182 179.361c-19.493-24.768-52.679-31.945-79.872-19.098-15.127-15.687-36.182-22.487-56.595-19.629V67c0-36.944-29.736-67-66.286-67S89.143 30.056 89.143 67v161.129c-19.909-7.41-43.272-5.094-62.083 8.872-29.355 21.795-35.793 63.333-14.55 93.152l109.699 154.001C134.632 501.59 154.741 512 176 512h178.286c30.802 0 57.574-21.5 64.557-51.797l27.429-118.999A67.873 67.873 0 0 0 448 326v-84c0-46.844-46.625-79.273-89.818-62.639zM80.985 279.697l27.126 38.079c8.995 12.626 29.031 6.287 29.031-9.283V67c0-25.12 36.571-25.16 36.571 0v175c0 8.836 7.163 16 16 16h6.857c8.837 0 16-7.164 16-16v-35c0-25.12 36.571-25.16 36.571 0v35c0 8.836 7.163 16 16 16H272c8.837 0 16-7.164 16-16v-21c0-25.12 36.571-25.16 36.571 0v21c0 8.836 7.163 16 16 16h6.857c8.837 0 16-7.164 16-16 0-25.121 36.571-25.16 36.571 0v84c0 1.488-.169 2.977-.502 4.423l-27.43 119.001c-1.978 8.582-9.29 14.576-17.782 14.576H176c-5.769 0-11.263-2.878-14.697-7.697l-109.712-154c-14.406-20.223 14.994-42.818 29.394-22.606zM176.143 400v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.733 0-14-7.163-14-16zm75.428 0v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.732 0-14-7.163-14-16zM327 400v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.732 0-14-7.163-14-16z"/></svg> +<!-- +Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com +License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) +--> \ No newline at end of file diff --git a/Resources/Icons/hline.png b/Resources/Icons/hline.png new file mode 100644 index 0000000000000000000000000000000000000000..b99ced1da0ac3ab2e491942bd69d8bc50e8319c9 Binary files /dev/null and b/Resources/Icons/hline.png differ diff --git a/forms/jupedsim.png b/Resources/Icons/jupedsim.png similarity index 100% rename from forms/jupedsim.png rename to Resources/Icons/jupedsim.png diff --git a/Resources/Icons/landmark.svg b/Resources/Icons/landmark.svg new file mode 100644 index 0000000000000000000000000000000000000000..3c6d8d86260e4eecda45c814d33366984b7619ab --- /dev/null +++ b/Resources/Icons/landmark.svg @@ -0,0 +1,5 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M501.62 92.11L267.24 2.04a31.958 31.958 0 0 0-22.47 0L10.38 92.11A16.001 16.001 0 0 0 0 107.09V144c0 8.84 7.16 16 16 16h480c8.84 0 16-7.16 16-16v-36.91c0-6.67-4.14-12.64-10.38-14.98zM64 192v160H48c-8.84 0-16 7.16-16 16v48h448v-48c0-8.84-7.16-16-16-16h-16V192h-64v160h-96V192h-64v160h-96V192H64zm432 256H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h480c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z"/></svg> +<!-- +Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com +License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) +--> \ No newline at end of file diff --git a/forms/man-gimp1.png b/Resources/Icons/man-gimp1.png similarity index 100% rename from forms/man-gimp1.png rename to Resources/Icons/man-gimp1.png diff --git a/Resources/Icons/minus-square.svg b/Resources/Icons/minus-square.svg new file mode 100644 index 0000000000000000000000000000000000000000..396a22ab921724f7ae05fbb2effa2fb9c48efab9 --- /dev/null +++ b/Resources/Icons/minus-square.svg @@ -0,0 +1,5 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M108 284c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h232c6.6 0 12 5.4 12 12v32c0 6.6-5.4 12-12 12H108zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"/></svg> +<!-- +Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com +License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) +--> \ No newline at end of file diff --git a/forms/new.png b/Resources/Icons/new.png similarity index 100% rename from forms/new.png rename to Resources/Icons/new.png diff --git a/forms/open.png b/Resources/Icons/open.png similarity index 100% rename from forms/open.png rename to Resources/Icons/open.png diff --git a/Resources/Icons/plus.svg b/Resources/Icons/plus.svg new file mode 100644 index 0000000000000000000000000000000000000000..afe5d634d37781b130cda1946f7780a52811fd4b --- /dev/null +++ b/Resources/Icons/plus.svg @@ -0,0 +1,5 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"/></svg> +<!-- +Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com +License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) +--> \ No newline at end of file diff --git a/Resources/Icons/redo.svg b/Resources/Icons/redo.svg new file mode 100644 index 0000000000000000000000000000000000000000..a1fa47f345bbc7dfbec61bc8584b94459b81464a --- /dev/null +++ b/Resources/Icons/redo.svg @@ -0,0 +1,5 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512.333 512"><path d="M500.333 0h-47.411c-6.853 0-12.314 5.729-11.986 12.574l3.966 82.759C399.416 41.899 331.672 8 256.001 8 119.34 8 7.899 119.526 8 256.187 8.101 393.068 119.096 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-33.971-33.971c-4.466-4.466-11.64-4.717-16.38-.543C341.308 415.448 300.606 432 256 432c-97.267 0-176-78.716-176-176 0-97.267 78.716-176 176-176 60.892 0 114.506 30.858 146.099 77.8l-101.525-4.865c-6.845-.328-12.574 5.133-12.574 11.986v47.411c0 6.627 5.373 12 12 12h200.333c6.627 0 12-5.373 12-12V12c0-6.627-5.373-12-12-12z"/></svg> +<!-- +Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com +License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) +--> \ No newline at end of file diff --git a/Resources/Icons/rooms.png b/Resources/Icons/rooms.png new file mode 100644 index 0000000000000000000000000000000000000000..aa4461a8cee2e375a0748469ef2b42012ae4b14d Binary files /dev/null and b/Resources/Icons/rooms.png differ diff --git a/Resources/Icons/rotate.png b/Resources/Icons/rotate.png new file mode 100644 index 0000000000000000000000000000000000000000..720c8c277cb3ac42c393f80eca31390f3f184486 Binary files /dev/null and b/Resources/Icons/rotate.png differ diff --git a/Resources/Icons/save.svg b/Resources/Icons/save.svg new file mode 100644 index 0000000000000000000000000000000000000000..f742ffb46fe0970979ff98ba7ac48d3ae0649756 --- /dev/null +++ b/Resources/Icons/save.svg @@ -0,0 +1,5 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM272 80v80H144V80h128zm122 352H54a6 6 0 0 1-6-6V86a6 6 0 0 1 6-6h42v104c0 13.255 10.745 24 24 24h176c13.255 0 24-10.745 24-24V83.882l78.243 78.243a6 6 0 0 1 1.757 4.243V426a6 6 0 0 1-6 6zM224 232c-48.523 0-88 39.477-88 88s39.477 88 88 88 88-39.477 88-88-39.477-88-88-88zm0 128c-22.056 0-40-17.944-40-40s17.944-40 40-40 40 17.944 40 40-17.944 40-40 40z"/></svg> +<!-- +Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com +License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) +--> \ No newline at end of file diff --git a/forms/snap.png b/Resources/Icons/snap.png similarity index 100% rename from forms/snap.png rename to Resources/Icons/snap.png diff --git a/Resources/Icons/snaping.png b/Resources/Icons/snaping.png new file mode 100644 index 0000000000000000000000000000000000000000..d17f4b1fae751126527652ce25236e26fc075e03 Binary files /dev/null and b/Resources/Icons/snaping.png differ diff --git a/forms/statue.jpg b/Resources/Icons/statue.jpg similarity index 100% rename from forms/statue.jpg rename to Resources/Icons/statue.jpg diff --git a/forms/statue_specs.jpg b/Resources/Icons/statue_specs.jpg similarity index 100% rename from forms/statue_specs.jpg rename to Resources/Icons/statue_specs.jpg diff --git a/Resources/Icons/trash-alt.svg b/Resources/Icons/trash-alt.svg new file mode 100644 index 0000000000000000000000000000000000000000..c5e4405e1db5deb86c58788aab110fa1c25c6166 --- /dev/null +++ b/Resources/Icons/trash-alt.svg @@ -0,0 +1,5 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M192 188v216c0 6.627-5.373 12-12 12h-24c-6.627 0-12-5.373-12-12V188c0-6.627 5.373-12 12-12h24c6.627 0 12 5.373 12 12zm100-12h-24c-6.627 0-12 5.373-12 12v216c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12V188c0-6.627-5.373-12-12-12zm132-96c13.255 0 24 10.745 24 24v12c0 6.627-5.373 12-12 12h-20v336c0 26.51-21.49 48-48 48H80c-26.51 0-48-21.49-48-48V128H12c-6.627 0-12-5.373-12-12v-12c0-13.255 10.745-24 24-24h74.411l34.018-56.696A48 48 0 0 1 173.589 0h100.823a48 48 0 0 1 41.16 23.304L349.589 80H424zm-269.611 0h139.223L276.16 50.913A6 6 0 0 0 271.015 48h-94.028a6 6 0 0 0-5.145 2.913L154.389 80zM368 128H80v330a6 6 0 0 0 6 6h276a6 6 0 0 0 6-6V128z"/></svg> +<!-- +Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com +License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) +--> \ No newline at end of file diff --git a/Resources/Icons/undo.svg b/Resources/Icons/undo.svg new file mode 100644 index 0000000000000000000000000000000000000000..4d47b7323b44484080d370ad62018cdb8a4c7297 --- /dev/null +++ b/Resources/Icons/undo.svg @@ -0,0 +1,5 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"/></svg> +<!-- +Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com +License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) +--> \ No newline at end of file diff --git a/Resources/Icons/wall.svg b/Resources/Icons/wall.svg new file mode 100644 index 0000000000000000000000000000000000000000..4462952fbd9ffbcc1b45ba4e5e7bc229d471d75b --- /dev/null +++ b/Resources/Icons/wall.svg @@ -0,0 +1 @@ +<?xml version="1.0" ?><svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><title/><g data-name="15-Wall" id="_15-Wall"><path d="M29,0H3A3,3,0,0,0,0,3V29a3,3,0,0,0,3,3H29a3,3,0,0,0,3-3V3A3,3,0,0,0,29,0ZM2,3A1,1,0,0,1,3,2H15V7H2ZM22,9v6H10V9ZM2,9H8v6H2Zm0,8H15v6H2ZM8,30H3a1,1,0,0,1-1-1V25H8Zm14,0H10V25H22Zm8-1a1,1,0,0,1-1,1H24V25h6Zm0-6H17V17H30Zm0-8H24V9h6Zm0-8H17V2H29a1,1,0,0,1,1,1Z"/></g></svg> \ No newline at end of file diff --git a/forms/zoom_in.png b/Resources/Icons/zoom_in.png similarity index 100% rename from forms/zoom_in.png rename to Resources/Icons/zoom_in.png diff --git a/forms/zoom_out.png b/Resources/Icons/zoom_out.png similarity index 100% rename from forms/zoom_out.png rename to Resources/Icons/zoom_out.png diff --git a/Resources/resources.qrc b/Resources/resources.qrc new file mode 100644 index 0000000000000000000000000000000000000000..e45c0b82276344c6b699f422fa1ee9824e7e9f60 --- /dev/null +++ b/Resources/resources.qrc @@ -0,0 +1,61 @@ +<RCC> + <qresource prefix="/inAppIcons"> + <file>Icons/anglesnap.png</file> + <file>Icons/autoRoom.png</file> + <file>Icons/basicCursor.png</file> + <file>Icons/Delete.png</file> + <file>Icons/DeleteAll.png</file> + <file>Icons/DeleteC.png</file> + <file>Icons/Door.png</file> + <file>Icons/DoorC.png</file> + <file>Icons/Exit.png</file> + <file>Icons/ExitC.png</file> + <file>Icons/filesave.png</file> + <file>Icons/filesaveas.png</file> + <file>Icons/jupedsim.png</file> + <file>Icons/man-gimp1.png</file> + <file>Icons/new.png</file> + <file>Icons/open.png</file> + <file>Icons/Pers1.png</file> + <file>Icons/Pers2.png</file> + <file>Icons/Pers3.png</file> + <file>Icons/Pers4.png</file> + <file>Icons/Pers5.png</file> + <file>Icons/Pers6.png</file> + <file>Icons/Pers7.png</file> + <file>Icons/Pers8.png</file> + <file>Icons/Person.png</file> + <file>Icons/PersonC.png</file> + <file>Icons/Redo-Icon.png</file> + <file>Icons/Room.png</file> + <file>Icons/snap.png</file> + <file>Icons/statue_specs.jpg</file> + <file>Icons/statue.jpg</file> + <file>Icons/Step.png</file> + <file>Icons/StepC.png</file> + <file>Icons/Trans.png</file> + <file>Icons/TransC.png</file> + <file>Icons/Undo-icon.png</file> + <file>Icons/Wall.png</file> + <file>Icons/zoom_in.png</file> + <file>Icons/zoom_out.png</file> + <file>Icons/folder-open.svg</file> + <file>Icons/save.svg</file> + <file>Icons/redo.svg</file> + <file>Icons/undo.svg</file> + <file>Icons/trash-alt.svg</file> + <file>Icons/door-open.svg</file> + <file>Icons/hline.png</file> + <file>Icons/wall.svg</file> + <file>Icons/hand-pointer.svg</file> + <file>Icons/eraser.svg</file> + <file>Icons/flag.svg</file> + <file>Icons/grid.png</file> + <file>Icons/minus-square.svg</file> + <file>Icons/rooms.png</file> + <file>Icons/snaping.png</file> + <file>Icons/rotate.png</file> + <file>Icons/plus.svg</file> + <file>Icons/landmark.svg</file> + </qresource> +</RCC> diff --git a/forms/Grid.png b/forms/Grid.png deleted file mode 100644 index d0672058c5ecc0f61fff2b6bb9bafc3a9ffa9cae..0000000000000000000000000000000000000000 Binary files a/forms/Grid.png and /dev/null differ diff --git a/forms/HLine.png b/forms/HLine.png deleted file mode 100644 index 81b9f3dce14be3bb072beb30858f16af605a42ff..0000000000000000000000000000000000000000 Binary files a/forms/HLine.png and /dev/null differ diff --git a/forms/Ressource.qrc b/forms/Ressource.qrc deleted file mode 100644 index eec2b118cae406d5d127bcdeccfc184d37af946f..0000000000000000000000000000000000000000 --- a/forms/Ressource.qrc +++ /dev/null @@ -1,47 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>Delete.png</file> - <file>DeleteAll.png</file> - <file>DeleteC.png</file> - <file>Door.png</file> - <file>DoorC.png</file> - <file>Exit.png</file> - <file>ExitC.png</file> - <file>Person.png</file> - <file>PersonC.png</file> - <file>Wall.png</file> - <file>WallC.png</file> - <file>Grid.png</file> - <file>GridC.png</file> - <file>man-gimp1.png</file> - <file>new.png</file> - <file>open.png</file> - <file>Pers1.png</file> - <file>Pers2.png</file> - <file>Pers3.png</file> - <file>Pers4.png</file> - <file>Pers5.png</file> - <file>Pers6.png</file> - <file>Pers7.png</file> - <file>Pers8.png</file> - <file>zoom_in.png</file> - <file>zoom_out.png</file> - <file>Step.png</file> - <file>StepC.png</file> - <file>filesave.png</file> - <file>filesaveas.png</file> - <file>Trans.png</file> - <file>TransC.png</file> - <file>snap.png</file> - <file>basicCursor.png</file> - <file>Room.png</file> - <file>autoRoom.png</file> - <file>jupedsim.png</file> - <file>statue.jpg</file> - <file>statue_specs.jpg</file> - <file>anglesnap.PNG</file> - <file>Undo-icon.png</file> - <file>Redo-Icon.png</file> - <file>HLine.png</file> - </qresource> -</RCC> diff --git a/forms/mainwindow.ui b/forms/mainwindow.ui index f74e07f46a0fcfc7442bf737a5cd17b47ae1a2ff..119a6475ce94a69c892a7261e7a66f5509af791c 100644 --- a/forms/mainwindow.ui +++ b/forms/mainwindow.ui @@ -14,7 +14,7 @@ <string>JPSeditor</string> </property> <property name="windowIcon"> - <iconset resource="Ressource.qrc"> + <iconset> <normaloff>:/jupedsim.png</normaloff>:/jupedsim.png</iconset> </property> <widget class="QWidget" name="centralwidget"/> @@ -31,13 +31,14 @@ <property name="title"> <string>File</string> </property> + <addaction name="action_ffnen_cogmap"/> <addaction name="action_ffnen_xml"/> <addaction name="action_ffnen"/> - <addaction name="action_ffnen_cogmap"/> <addaction name="actionSpeichern"/> <addaction name="actionSpeichern_dxf"/> <addaction name="actionSpeichern_cogmap"/> <addaction name="separator"/> + <addaction name="action_ber"/> <addaction name="actionSettings"/> <addaction name="separator"/> <addaction name="actionBeenden"/> @@ -46,45 +47,56 @@ <property name="title"> <string>Help</string> </property> - <addaction name="action_ber"/> + <addaction name="actionOnline_Help"/> </widget> <widget class="QMenu" name="menuTools"> <property name="title"> <string>Tools</string> </property> - <addaction name="actionSelect_Mode"/> + <addaction name="actionRoom"/> + <addaction name="actionAuto_Definition"/> + <addaction name="actionGather_data"/> + <addaction name="actionLandmarkWidget"/> + </widget> + <widget class="QMenu" name="menuView"> + <property name="title"> + <string>View</string> + </property> + <addaction name="actiongridmode"/> + <addaction name="actionShow_Point_of_Origin"/> + <addaction name="actionRotate_90_deg_clockwise"/> + <addaction name="separator"/> + <addaction name="actionanglesnap"/> + <addaction name="actionObjectsnap"/> + </widget> + <widget class="QMenu" name="menuEdit"> + <property name="title"> + <string>Edit</string> + </property> <addaction name="separator"/> <addaction name="actionUndo"/> <addaction name="actionRedo"/> <addaction name="actionCopy"/> <addaction name="actionScale"/> <addaction name="separator"/> - <addaction name="actionWall"/> - <addaction name="actionDoor"/> - <addaction name="actionHLine"/> - <addaction name="separator"/> - <addaction name="actiongridmode"/> - <addaction name="actionObjectsnap"/> - <addaction name="actionanglesnap"/> <addaction name="actionDelete_lines"/> <addaction name="actionDelete_single_line"/> - <addaction name="separator"/> - <addaction name="actionRoom"/> - <addaction name="actionAuto_Definition"/> - <addaction name="actionLandmark"/> - <addaction name="actionLandmarkWidget"/> - <addaction name="actionGather_data"/> + <addaction name="actionClear_all_Rooms_and_Doors"/> </widget> - <widget class="QMenu" name="menuView"> + <widget class="QMenu" name="menuDraw"> <property name="title"> - <string>View</string> + <string>Draw</string> </property> - <addaction name="actionRotate_90_deg_clockwise"/> - <addaction name="actionShow_Point_of_Origin"/> + <addaction name="actionWall"/> + <addaction name="actionDoor"/> + <addaction name="actionHLine"/> + <addaction name="actionLandmark"/> </widget> <addaction name="menuDatei"/> - <addaction name="menuTools"/> + <addaction name="menuEdit"/> + <addaction name="menuDraw"/> <addaction name="menuView"/> + <addaction name="menuTools"/> <addaction name="menuHilfe"/> </widget> <widget class="QStatusBar" name="statusbar"/> @@ -99,34 +111,25 @@ <bool>false</bool> </attribute> <addaction name="actionSelect_Mode"/> - <addaction name="separator"/> <addaction name="actionUndo"/> <addaction name="actionRedo"/> + <addaction name="actionDelete_single_line"/> + <addaction name="actionClear_all_Rooms_and_Doors"/> <addaction name="separator"/> <addaction name="actionWall"/> <addaction name="actionDoor"/> <addaction name="actionHLine"/> + <addaction name="actionLandmark"/> <addaction name="separator"/> <addaction name="actiongridmode"/> - <addaction name="separator"/> <addaction name="actionObjectsnap"/> <addaction name="separator"/> - <addaction name="actionanglesnap"/> - <addaction name="separator"/> - <addaction name="actionDelete_lines"/> - <addaction name="separator"/> - <addaction name="actionDelete_single_line"/> - <addaction name="separator"/> <addaction name="actionRoom"/> - <addaction name="actionAuto_Definition"/> - <addaction name="separator"/> - <addaction name="actionLandmarkWidget"/> - <addaction name="actionLandmark"/> </widget> <action name="action_ffnen"> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/open.png</normaloff>:/open.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/folder-open.svg</normaloff>:/inAppIcons/Icons/folder-open.svg</iconset> </property> <property name="text"> <string>Load DXF</string> @@ -137,11 +140,14 @@ <property name="shortcut"> <string>Ctrl+Alt+O</string> </property> + <property name="iconVisibleInMenu"> + <bool>true</bool> + </property> </action> <action name="actionSpeichern"> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/filesave.png</normaloff>:/filesave.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/save.svg</normaloff>:/inAppIcons/Icons/save.svg</iconset> </property> <property name="text"> <string>Save as XML</string> @@ -149,13 +155,13 @@ <property name="toolTip"> <string>Save as XML</string> </property> - <property name="shortcut"> - <string>Ctrl+S</string> + <property name="iconVisibleInMenu"> + <bool>true</bool> </property> </action> <action name="actionBeenden"> <property name="icon"> - <iconset resource="Ressource.qrc"> + <iconset> <normaloff>:/man-gimp1.png</normaloff>:/man-gimp1.png</iconset> </property> <property name="text"> @@ -175,29 +181,29 @@ <property name="toolTip"> <string>About</string> </property> - <property name="shortcut"> - <string>F1</string> + <property name="iconVisibleInMenu"> + <bool>true</bool> </property> </action> <action name="actiongridmode"> - <property name="checkable"> - <bool>true</bool> - </property> <property name="enabled"> <bool>true</bool> </property> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/Grid.png</normaloff>:/Grid.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/grid.png</normaloff>:/inAppIcons/Icons/grid.png</iconset> </property> <property name="text"> - <string>Gridmode</string> + <string>Show Grid</string> </property> <property name="toolTip"> <string>Gridmode</string> </property> <property name="shortcut"> - <string>Ctrl+G</string> + <string>Meta+G</string> + </property> + <property name="iconVisibleInMenu"> + <bool>true</bool> </property> </action> <action name="actionWall"> @@ -208,29 +214,26 @@ <bool>true</bool> </property> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/Wall.png</normaloff>:/Wall.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/wall.svg</normaloff>:/inAppIcons/Icons/wall.svg</iconset> </property> <property name="text"> <string>Wall</string> </property> <property name="shortcut"> - <string>W</string> + <string>Meta+W</string> </property> <property name="iconVisibleInMenu"> <bool>true</bool> </property> </action> <action name="actionObjectsnap"> - <property name="checkable"> - <bool>true</bool> - </property> <property name="enabled"> <bool>true</bool> </property> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/snap.png</normaloff>:/snap.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/snaping.png</normaloff>:/inAppIcons/Icons/snaping.png</iconset> </property> <property name="text"> <string>Object snap</string> @@ -239,19 +242,22 @@ <string>Object snap</string> </property> <property name="shortcut"> - <string>O</string> + <string>Meta+O</string> + </property> + <property name="iconVisibleInMenu"> + <bool>true</bool> </property> </action> <action name="actionDelete_lines"> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/DeleteAll.png</normaloff>:/DeleteAll.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/minus-square.svg</normaloff>:/inAppIcons/Icons/minus-square.svg</iconset> </property> <property name="text"> <string>Delete all</string> </property> - <property name="shortcut"> - <string>Ctrl+Del</string> + <property name="iconVisibleInMenu"> + <bool>true</bool> </property> </action> <action name="actionDelete_single_line"> @@ -259,8 +265,8 @@ <bool>true</bool> </property> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/Delete.png</normaloff>:/Delete.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/trash-alt.svg</normaloff>:/inAppIcons/Icons/trash-alt.svg</iconset> </property> <property name="text"> <string>Delete selected lines</string> @@ -269,7 +275,10 @@ <string>Delete selected lines</string> </property> <property name="shortcut"> - <string>Del</string> + <string>Ctrl+Backspace</string> + </property> + <property name="iconVisibleInMenu"> + <bool>true</bool> </property> </action> <action name="actionDoor"> @@ -280,8 +289,8 @@ <bool>true</bool> </property> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/Door.png</normaloff>:/Door.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/door-open.svg</normaloff>:/inAppIcons/Icons/door-open.svg</iconset> </property> <property name="text"> <string>Door</string> @@ -290,7 +299,7 @@ <string>Door</string> </property> <property name="shortcut"> - <string>D</string> + <string>Meta+D</string> </property> <property name="iconVisibleInMenu"> <bool>true</bool> @@ -304,7 +313,7 @@ <bool>true</bool> </property> <property name="icon"> - <iconset resource="Ressource.qrc"> + <iconset> <normaloff>:/Exit.png</normaloff>:/Exit.png</iconset> </property> <property name="text"> @@ -313,9 +322,6 @@ <property name="toolTip"> <string>Exit</string> </property> - <property name="shortcut"> - <string>E</string> - </property> <property name="iconVisibleInMenu"> <bool>true</bool> </property> @@ -328,20 +334,20 @@ <bool>true</bool> </property> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/Room.png</normaloff>:/Room.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/rooms.png</normaloff>:/inAppIcons/Icons/rooms.png</iconset> </property> <property name="text"> - <string>Rooms</string> + <string>Define Rooms</string> </property> <property name="toolTip"> <string>Define Room</string> </property> <property name="shortcut"> - <string>R</string> + <string>Meta+R</string> </property> <property name="iconVisibleInMenu"> - <bool>true</bool> + <bool>false</bool> </property> </action> <action name="actionSelect_Mode"> @@ -355,8 +361,8 @@ <bool>true</bool> </property> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/basicCursor.png</normaloff>:/basicCursor.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/hand-pointer.svg</normaloff>:/inAppIcons/Icons/hand-pointer.svg</iconset> </property> <property name="text"> <string>Select Mode</string> @@ -364,17 +370,14 @@ <property name="toolTip"> <string>Select Mode</string> </property> - <property name="shortcut"> - <string>Esc</string> - </property> <property name="iconVisibleInMenu"> <bool>true</bool> </property> </action> <action name="actionSpeichern_dxf"> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/filesave.png</normaloff>:/filesave.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/save.svg</normaloff>:/inAppIcons/Icons/save.svg</iconset> </property> <property name="text"> <string>Save as DXF</string> @@ -382,14 +385,14 @@ <property name="toolTip"> <string>Save as DXF</string> </property> - <property name="shortcut"> - <string>Ctrl+Alt+S</string> + <property name="iconVisibleInMenu"> + <bool>true</bool> </property> </action> <action name="action_ffnen_xml"> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/open.png</normaloff>:/open.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/folder-open.svg</normaloff>:/inAppIcons/Icons/folder-open.svg</iconset> </property> <property name="text"> <string>Load XML</string> @@ -400,13 +403,23 @@ <property name="shortcut"> <string>Ctrl+O</string> </property> + <property name="iconVisibleInMenu"> + <bool>true</bool> + </property> </action> <action name="actionRotate_90_deg_clockwise"> + <property name="icon"> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/rotate.png</normaloff>:/inAppIcons/Icons/rotate.png</iconset> + </property> <property name="text"> <string>Rotate (90 deg clockwise)</string> </property> <property name="shortcut"> - <string>Ctrl+R</string> + <string>Meta+R</string> + </property> + <property name="iconVisibleInMenu"> + <bool>true</bool> </property> </action> <action name="actionLandmark"> @@ -414,11 +427,11 @@ <bool>true</bool> </property> <property name="enabled"> - <bool>false</bool> + <bool>true</bool> </property> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/statue.jpg</normaloff>:/statue.jpg</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/landmark.svg</normaloff>:/inAppIcons/Icons/landmark.svg</iconset> </property> <property name="text"> <string>Landmark</string> @@ -426,29 +439,31 @@ <property name="toolTip"> <string>Landmark</string> </property> + <property name="shortcut"> + <string>Meta+L</string> + </property> <property name="visible"> - <bool>false</bool> + <bool>true</bool> </property> - </action> - <action name="actionLandmarkWidget"> - <property name="checkable"> + <property name="iconVisibleInMenu"> <bool>true</bool> </property> + </action> + <action name="actionLandmarkWidget"> <property name="enabled"> - <bool>false</bool> - </property> - <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/statue_specs.jpg</normaloff>:/statue_specs.jpg</iconset> + <bool>true</bool> </property> <property name="text"> - <string>LandmarkSpecs</string> + <string>Edit Landmark </string> </property> <property name="toolTip"> <string>LandmarkSpecs</string> </property> + <property name="shortcut"> + <string>Meta+Shift+L</string> + </property> <property name="visible"> - <bool>false</bool> + <bool>true</bool> </property> </action> <action name="actionanglesnap"> @@ -459,8 +474,8 @@ <bool>true</bool> </property> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/anglesnap.PNG</normaloff>:/anglesnap.PNG</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/plus.svg</normaloff>:/inAppIcons/Icons/plus.svg</iconset> </property> <property name="text"> <string>Orthomode</string> @@ -469,7 +484,10 @@ <string>Orthomode</string> </property> <property name="shortcut"> - <string>Ctrl+H</string> + <string>Meta+S</string> + </property> + <property name="iconVisibleInMenu"> + <bool>true</bool> </property> </action> <action name="actionSettings"> @@ -488,7 +506,7 @@ </action> <action name="action_ffnen_CogMap"> <property name="icon"> - <iconset resource="Ressource.qrc"> + <iconset> <normaloff>:/open.png</normaloff>:/open.png</iconset> </property> <property name="text"> @@ -504,17 +522,27 @@ </property> </action> <action name="actionShow_Point_of_Origin"> + <property name="icon"> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/flag.svg</normaloff>:/inAppIcons/Icons/flag.svg</iconset> + </property> <property name="text"> <string>Show Point of Origin</string> </property> + <property name="shortcut"> + <string>Meta+O</string> + </property> + <property name="iconVisibleInMenu"> + <bool>true</bool> + </property> </action> <action name="actionUndo"> <property name="enabled"> <bool>true</bool> </property> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/Undo-icon.png</normaloff>:/Undo-icon.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/undo.svg</normaloff>:/inAppIcons/Icons/undo.svg</iconset> </property> <property name="text"> <string>Undo</string> @@ -528,11 +556,14 @@ <property name="visible"> <bool>true</bool> </property> + <property name="iconVisibleInMenu"> + <bool>true</bool> + </property> </action> <action name="actionRedo"> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/Redo-Icon.png</normaloff>:/Redo-Icon.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/redo.svg</normaloff>:/inAppIcons/Icons/redo.svg</iconset> </property> <property name="text"> <string>Redo</string> @@ -541,7 +572,10 @@ <string>Redo PaintEvent</string> </property> <property name="shortcut"> - <string/> + <string>Ctrl+Shift+Z</string> + </property> + <property name="iconVisibleInMenu"> + <bool>true</bool> </property> </action> <action name="actionHLine"> @@ -552,8 +586,8 @@ <bool>true</bool> </property> <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/HLine.png</normaloff>:/HLine.png</iconset> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/hline.png</normaloff>:/inAppIcons/Icons/hline.png</iconset> </property> <property name="text"> <string>HLine</string> @@ -562,7 +596,7 @@ <string>HLine</string> </property> <property name="shortcut"> - <string>H</string> + <string>Meta+H</string> </property> <property name="iconVisibleInMenu"> <bool>true</bool> @@ -573,7 +607,7 @@ <bool>false</bool> </property> <property name="icon"> - <iconset resource="Ressource.qrc"> + <iconset> <normaloff>:/filesave.png</normaloff>:/filesave.png</iconset> </property> <property name="text"> @@ -591,7 +625,7 @@ <bool>false</bool> </property> <property name="icon"> - <iconset resource="Ressource.qrc"> + <iconset> <normaloff>:/open.png</normaloff>:/open.png</iconset> </property> <property name="text"> @@ -603,6 +637,9 @@ <property name="visible"> <bool>false</bool> </property> + <property name="iconVisibleInMenu"> + <bool>true</bool> + </property> </action> <action name="actionCopy"> <property name="text"> @@ -618,10 +655,6 @@ </property> </action> <action name="actionAuto_Definition"> - <property name="icon"> - <iconset resource="Ressource.qrc"> - <normaloff>:/autoRoom.png</normaloff>:/autoRoom.png</iconset> - </property> <property name="text"> <string>Auto Definition</string> </property> @@ -634,9 +667,26 @@ <bool>true</bool> </property> </action> + <action name="actionClear_all_Rooms_and_Doors"> + <property name="icon"> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/eraser.svg</normaloff>:/inAppIcons/Icons/eraser.svg</iconset> + </property> + <property name="text"> + <string>Clear all Rooms and Doors</string> + </property> + <property name="iconVisibleInMenu"> + <bool>true</bool> + </property> + </action> + <action name="actionOnline_Help"> + <property name="text"> + <string>Online Help</string> + </property> + </action> </widget> <resources> - <include location="Ressource.qrc"/> + <include location="../Resources/resources.qrc"/> </resources> <connections/> </ui> diff --git a/jpseditor.pro b/jpseditor.pro index 816ba776184f0afdfed73cf1c39911f5041e264f..2140f3b3857f3e0039371bbc53cda64791cdad7a 100644 --- a/jpseditor.pro +++ b/jpseditor.pro @@ -13,19 +13,19 @@ # You should have received a copy of the GNU Lesser General Public License # along with JuPedSim. If not, see <http://www.gnu.org/licenses/>. # - # copyright <2009-2014> Forschungszentrum Juelich GmbH. + # copyright <2009-2018> Forschungszentrum Juelich GmbH. # Compatibility with Qt4 and Qt5 greaterThan(QT_MAJOR_VERSION, 4):QT += widgets TEMPLATE = app -TARGET = JuPedSim +TARGET = JPSeditor CONFIG += qt xml gui; CONFIG += c++11 QMAKE_CXXFLAGS += -std=c++11 QMAKE_CXXFLAGS += -static -QMAKE_CXXFLAGS += -static-libgcc -QMAKE_CXXFLAGS += -static-libstdc++ +#QMAKE_CXXFLAGS += -static-libgcc +#QMAKE_CXXFLAGS += -static-libstdc++ FORMS += \ forms/mainwindow.ui \ @@ -97,7 +97,8 @@ SOURCES += \ INCLUDEPATH += D:/boost_1_59_0/boost_1_59_0 -RESOURCES += forms/Ressource.qrc +RESOURCES += \ + Resources/resources.qrc RC_FILE = icons/jpseditor.rc #osx fix diff --git a/src/GraphicView.cpp b/src/GraphicView.cpp index 55327a74b5bef2a150f9a545be45715ad60ad613..372305eaa39be0a6f09d83441322168f3f7a6770 100644 --- a/src/GraphicView.cpp +++ b/src/GraphicView.cpp @@ -1,8 +1,8 @@ /** * \file GraphicView.cpp - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. @@ -940,7 +940,13 @@ void jpsGraphicsView::disable_drawing() jpsLineItem* jpsGraphicsView::addLineItem(const qreal &x1,const qreal &y1,const qreal &x2,const qreal &y2,const QString &type) { - QPen pen = QPen(Qt::black,4); + /* + * add Lineitem when prase a XML file + */ + + qDebug() << "Enter jpsGraphicsView::addLineItem"; + QPen pen = QPen(Qt::black,2); + pen.setCosmetic(true); current_line=Scene->addLine(x1,y1,x2,y2,pen); @@ -987,7 +993,8 @@ jpsLineItem* jpsGraphicsView::addLineItem(const qreal &x1,const qreal &y1,const } current_line=nullptr; - + + qDebug() << "Leave jpsGraphicsView::addLineItem"; return newLine; } @@ -1122,9 +1129,8 @@ bool jpsGraphicsView::show_hide_roomCaption(QString name, qreal x, qreal y) return false; } } - // if caption does not exit yet: - + // if caption does not exit yet: current_caption=Scene->addText(name); current_caption->setX(x+translation_x); diff --git a/src/GraphicView.h b/src/GraphicView.h index a9aa6cd54fb8708e33c7cea8f014da3f6982dc34..71217a804d8ca6a8a278be638f7557afe3701300 100644 --- a/src/GraphicView.h +++ b/src/GraphicView.h @@ -1,8 +1,8 @@ /** * \file GraphicView.h - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/UndoFramework/action.cpp b/src/UndoFramework/action.cpp index 2c4754b52039d2728ddc2dcdf8d5feb18a60c901..84fa241f1584594eea4303ab1c43b848cfac7e65 100644 --- a/src/UndoFramework/action.cpp +++ b/src/UndoFramework/action.cpp @@ -1,8 +1,8 @@ /** * \file action.cpp - * \date Mar 07, 2016 - * \version v0.8.1 - * \copyright <2009-2016> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/UndoFramework/action.h b/src/UndoFramework/action.h index 575c3535bec1dec7ea5ee3b36bcfad3cb36cf30e..4968cd2edac9958e742407abf6be6fbf95a26ecf 100644 --- a/src/UndoFramework/action.h +++ b/src/UndoFramework/action.h @@ -1,8 +1,8 @@ /** - * \file action.h - * \date Mar 07, 2016 - * \version v0.8.1 - * \copyright <2009-2016> Forschungszentrum Jülich GmbH. All rights reserved. + * \file action.h + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/UndoFramework/actionstack.cpp b/src/UndoFramework/actionstack.cpp index 0ffbc9a590dbd7389f2eb66d499eecbb0ea92d31..8e51f4da62c8b1bd90ab268a48d88009552f0527 100644 --- a/src/UndoFramework/actionstack.cpp +++ b/src/UndoFramework/actionstack.cpp @@ -1,8 +1,8 @@ /** * \file actionstack.cpp - * \date Mar 07, 2016 - * \version v0.8.1 - * \copyright <2009-2016> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/UndoFramework/actionstack.h b/src/UndoFramework/actionstack.h index 7454ad8e5b444bfc7a03018a521612559751640a..fb0eb1e86bc1c81e91e3da523716158f9db61671 100644 --- a/src/UndoFramework/actionstack.h +++ b/src/UndoFramework/actionstack.h @@ -1,8 +1,8 @@ /** - * \file actionstack.h - * \date Mar 07, 2016 - * \version v0.8.1 - * \copyright <2009-2016> Forschungszentrum Jülich GmbH. All rights reserved. + * \file actionstack.h + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/UndoFramework/lineaction.cpp b/src/UndoFramework/lineaction.cpp index 0418545c40a1a785d7b557c4e2b5e376465c26e7..7b4e35d86e348cdc02fb077cf2c7038db6eec2d5 100644 --- a/src/UndoFramework/lineaction.cpp +++ b/src/UndoFramework/lineaction.cpp @@ -1,8 +1,8 @@ /** * \file lineaction.cpp - * \date Mar 07, 2016 - * \version v0.8.1 - * \copyright <2009-2016> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/UndoFramework/lineaction.h b/src/UndoFramework/lineaction.h index e43d2c7217d7ec621cd8e0a38a775188766b580f..09ab18416aafae63b512a812e0c476fc780d4b8e 100644 --- a/src/UndoFramework/lineaction.h +++ b/src/UndoFramework/lineaction.h @@ -1,8 +1,8 @@ /** - * \file lineaction.h - * \date Mar 07, 2016 - * \version v0.8.1 - * \copyright <2009-2016> Forschungszentrum Jülich GmbH. All rights reserved. + * \file lineaction.h + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/datamanager.cpp b/src/datamanager.cpp index 75d12836226db51e9dbfca604203f00997853c3b..6432947cfceac8ba902d7385c3fdde4d5e4a8bbb 100644 --- a/src/datamanager.cpp +++ b/src/datamanager.cpp @@ -1,8 +1,8 @@ /** * \file datamanager.cpp - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. @@ -91,6 +91,7 @@ void jpsDatamanager::remove_room(jpsRoom *room) int roomID=room->get_id(); roomlist.removeOne(room); delete room; + room = nullptr; //change IDs of other room with ID greater than roomID for (jpsRoom* otherroom:roomlist) if (otherroom->get_id()>roomID) @@ -115,6 +116,7 @@ void jpsDatamanager::remove_all_rooms() for (int i=0; i<roomlist.size(); i++) { delete roomlist[i]; + roomlist[i] = nullptr; } roomlist.clear(); dtrace("Leave jpsDatamanager::remove_all_rooms"); diff --git a/src/datamanager.h b/src/datamanager.h index f8209fa66fa47646b835e0c8085896b3380e3590..5cd951032a49e8fb60a6d29622d6e835c033f4c4 100644 --- a/src/datamanager.h +++ b/src/datamanager.h @@ -1,8 +1,8 @@ /** * \file datamanager.h - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/graphicscene.cpp b/src/graphicscene.cpp index 8103a71086ffde4c926b1d024cc1c4f878a31f70..84f3eed1f82619a6c108bf383aecb80099c6a945 100644 --- a/src/graphicscene.cpp +++ b/src/graphicscene.cpp @@ -1,8 +1,8 @@ /** * \file graphicscene.cpp - * \date Mar 07, 2016 - * \version v0.8.1 - * \copyright <2009-2016> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/graphicscene.h b/src/graphicscene.h index 9c0ca118692a7f80e07833559df311fa01b66876..f107a7597e8962bc2f7bd38e804b5b578a979127 100644 --- a/src/graphicscene.h +++ b/src/graphicscene.h @@ -1,8 +1,8 @@ /** * \file graphicscene.h - * \date Mar 07, 2016 - * \version v0.8.1 - * \copyright <2009-2016> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/jpsLineItem.cpp b/src/jpsLineItem.cpp index e4edc88f426ec18692344ef52132ff6b428db962..3659f19aea0aa7b45d445d5f0937f72bc9923faf 100644 --- a/src/jpsLineItem.cpp +++ b/src/jpsLineItem.cpp @@ -1,8 +1,8 @@ /** * \file jpsLineItem.cpp - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/jpsLineItem.h b/src/jpsLineItem.h index 63edd632da4ab3aef667796e070ab4a351458a09..9d7a0f141104706e24f250fc15c65047a3f9d132 100644 --- a/src/jpsLineItem.h +++ b/src/jpsLineItem.h @@ -1,8 +1,8 @@ /** * \file jpsLineItem.h - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/jpsconnection.cpp b/src/jpsconnection.cpp index 5006ae75f9ce8871a7ce5e742036951845bbe3c8..cc20965f5e91aa2a304ad046fb5de413baa6f67f 100644 --- a/src/jpsconnection.cpp +++ b/src/jpsconnection.cpp @@ -1,8 +1,8 @@ /** * \file jpsconnection.cpp - * \date Mar 07, 2016 - * \version v0.8.1 - * \copyright <2009-2016> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/jpsconnection.h b/src/jpsconnection.h index c81436605b46e8f80b92c551ea845abff62983c3..fa6cb16529a93258e392d07adde900a9216429cc 100644 --- a/src/jpsconnection.h +++ b/src/jpsconnection.h @@ -1,8 +1,8 @@ /** * \file jpsconnection.h - * \date Mar 07, 2016 - * \version v0.8.1 - * \copyright <2009-2016> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/jpscrossing.cpp b/src/jpscrossing.cpp index a694cdc2ac53b788e45cb87ba2aec0235f04046b..ccc1fee18fe60f01441f9a638b4fe00f6b43a274 100644 --- a/src/jpscrossing.cpp +++ b/src/jpscrossing.cpp @@ -1,8 +1,8 @@ /** * \file jpscrossing.cpp - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/jpscrossing.h b/src/jpscrossing.h index 2ecdc73e5f7672059c3ce032a7df63fbdaeca274..54f280af2b031bb0d9d5fe5496009de425280f92 100644 --- a/src/jpscrossing.h +++ b/src/jpscrossing.h @@ -1,8 +1,8 @@ /** * \file jpscrossing.h - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/jpsexit.cpp b/src/jpsexit.cpp index d87a71baf4941ad48c7f168dda1cab7947701e0a..d0dc0212cf59baf1b7bf83e907aa4e7b6a089428 100644 --- a/src/jpsexit.cpp +++ b/src/jpsexit.cpp @@ -1,8 +1,8 @@ /** * \file jpsexit.cpp - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/jpsexit.h b/src/jpsexit.h index 2945066c6a7bb0e19d926e2000c47b0de5b0aea9..dbdf2213641775179515d24748cee3fbedd0103a 100644 --- a/src/jpsexit.h +++ b/src/jpsexit.h @@ -1,8 +1,8 @@ /** * \file jpsexit.h - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/jpslandmark.cpp b/src/jpslandmark.cpp index b94bde7d22288fe62a50c752332636640f8d0b7f..1ceac9187467f6d885abd7d1947d5b873850d880 100644 --- a/src/jpslandmark.cpp +++ b/src/jpslandmark.cpp @@ -1,8 +1,8 @@ /** * \file jpslandmark.cpp - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/jpslandmark.h b/src/jpslandmark.h index 35b9602056320db4093c3564a4da306841efa7b3..b3fbfbd6d4ea1f99563a75ab73f20925c1238fe2 100644 --- a/src/jpslandmark.h +++ b/src/jpslandmark.h @@ -1,8 +1,8 @@ /** * \file jpslandmark.h - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/jpsobstacle.cpp b/src/jpsobstacle.cpp index 8f1778917bd3a16272c8921866e34aa1a8a184d8..1bf5c6a8734b314b1bb8923a380ed01e15df095b 100644 --- a/src/jpsobstacle.cpp +++ b/src/jpsobstacle.cpp @@ -1,8 +1,8 @@ /** * \file jpsObstacle.cpp - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/jpsobstacle.h b/src/jpsobstacle.h index 469d200f992ac9cdc5e63e91a7a4446bf2a52888..00992285de7a154d1704590ebc06e12df0191f4d 100644 --- a/src/jpsobstacle.h +++ b/src/jpsobstacle.h @@ -1,8 +1,8 @@ /** * \file jpsObstacle.h - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/main.cpp b/src/main.cpp index 3a022c601e4b775b5f1b5bc88f7a024a593cd8af..5e9721b104e6933ce95a716a332e5850e6f954b8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,8 +1,8 @@ /** * \file main.cpp - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/mainWindow.cpp b/src/mainWindow.cpp index 9f704816c457d6def81033dd4956a578ada8a10a..eaa98015e2ea2572722b2d93cb29f44f50f1b648 100644 --- a/src/mainWindow.cpp +++ b/src/mainWindow.cpp @@ -1,8 +1,8 @@ /** * \file mainWindow.cpp - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. @@ -34,6 +34,8 @@ #include <QFileDialog> #include <QMessageBox> #include <QShortcut> +#include <QDesktopServices> +#include <QUrl> MWindow :: MWindow() { @@ -116,10 +118,10 @@ MWindow :: MWindow() { //Signals and Slots // Tab File connect(actionBeenden, SIGNAL(triggered(bool)),this,SLOT(close())); - connect(action_ffnen,SIGNAL(triggered(bool)),this,SLOT(openFile())); + connect(action_ffnen,SIGNAL(triggered(bool)),this,SLOT(openFileDXF())); connect(action_ffnen_xml,SIGNAL(triggered(bool)),this,SLOT(openFileXML())); connect(action_ffnen_cogmap,SIGNAL(triggered(bool)),this,SLOT(openFileCogMap())); - connect(actionSpeichern,SIGNAL(triggered(bool)),this,SLOT(saveFile())); + connect(actionSpeichern,SIGNAL(triggered(bool)),this,SLOT(saveAsXML())); connect(actionSpeichern_dxf,SIGNAL(triggered(bool)),this,SLOT(saveAsDXF())); connect(actionSettings,SIGNAL(triggered(bool)),this,SLOT(Settings())); //connect(action_ffnen_CogMap,SIGNAL(triggered(bool)),this,SLOT(openFileCMap())); @@ -305,7 +307,7 @@ void MWindow::ShowOrigin() mview->ShowOrigin(); } -void MWindow::openFile(){ +void MWindow::openFileDXF(){ QString fileName=QFileDialog::getOpenFileName(this,tr("Open DXF"),"",tr("DXF-Drawings (*.dxf)")); //QFile file(fileName); @@ -425,7 +427,7 @@ void MWindow::OpenLineFile() file.close(); } -void MWindow::saveFile(){ +void MWindow::saveAsXML(){ QString fileName = QFileDialog::getSaveFileName(this,tr("Save XML"),"",tr("XML-Files (*.xml)")); _filename=fileName; if (fileName.isEmpty()) return; @@ -499,20 +501,17 @@ void MWindow::SaveCogMapXML() void MWindow::info(){ - - - + /* + * JPSeditor version information + * */ QString info = "\ - JPSeditor (version 0.8.1) is a tool\n\ + JPSeditor (version 0.8.4) is a tool\n\ to create and process geometries for\n\ JuPedSim.\n\ - 2017. All rights reserved."; - - + 2018. All rights reserved."; QMessageBox messageBox; messageBox.information(0,tr("About..."),info); - } void MWindow::anglesnap() @@ -616,10 +615,8 @@ void MWindow::send_xy() endpoint.setX(x); endpoint.setY(y); - if(x != 0 ) - { - mview->take_endpoint_from_xyEdit(endpoint); - } + mview->take_endpoint_from_xyEdit(endpoint); + x_edit->clear(); } @@ -764,3 +761,18 @@ void MWindow::on_actionCopy_triggered() actionCopy->setChecked(true); mview->start_Copy_function(); } + +void MWindow::on_actionOnline_Help_triggered() +{ + QString JPSeditor = "http://www.jupedsim.org/jpseditor/"; + QDesktopServices::openUrl(QUrl(JPSeditor)); +} + +void MWindow::on_actionClear_all_Rooms_and_Doors_triggered() +{ + dmanager->remove_all(); + rwidget->show_rooms(); + rwidget->show_crossings(); + rwidget->show_exits(); + rwidget->show_obstacles(); +} diff --git a/src/mainWindow.h b/src/mainWindow.h index 5088584454f20569f28d0d1e7c532572d653ba54..9203d7d89661da74689b8126bfbf67fdda3d0cd6 100644 --- a/src/mainWindow.h +++ b/src/mainWindow.h @@ -1,8 +1,8 @@ /** * \file mainWindow.h - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. @@ -79,11 +79,11 @@ private: protected slots: //parseFiles - void openFile(); + void openFileDXF(); void openFileXML(); void openFileCogMap(); void OpenLineFile(); - void saveFile(); + void saveAsXML(); void saveAsDXF(); //cogmap @@ -134,8 +134,6 @@ protected slots: //gather data void GatherData(); - - //CMap //void RunCMap(); //void UpdateCMap(); @@ -146,6 +144,8 @@ protected slots: private slots: void on_actionCopy_triggered(); + void on_actionOnline_Help_triggered(); + void on_actionClear_all_Rooms_and_Doors_triggered(); }; diff --git a/src/rooms.cpp b/src/rooms.cpp index 5963792af24eea0fdb9c8442e193a744b795efda..3add0e8bf713ff2f2edfd53ec91f9e37433e56f6 100644 --- a/src/rooms.cpp +++ b/src/rooms.cpp @@ -1,8 +1,8 @@ /** * \file rooms.cpp - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. @@ -32,7 +32,7 @@ #include <fstream> #include <QGraphicsLineItem> #include "jpscrossing.h" - +#include <QDebug> #include "dtrace.h" @@ -169,6 +169,14 @@ QVector<QPointF> jpsRoom::get_vertices() const QPointF jpsRoom::get_center() { + qDebug() << "Enter jpsRoom::get_center"; + IdentifyInnerOuter(); // write outer_polygon + + if(outer_polygon.size()==0){ + QPointF origin(0,0); + return origin; + } + QVector<QPointF> vertices = RoomAsSortedPolygon(outer_polygon); qreal sum_x=0; qreal sum_y=0; @@ -182,8 +190,10 @@ QPointF jpsRoom::get_center() mean.setX(sum_x/vertices.size()); mean.setY(sum_y/vertices.size()); + qDebug() << "Leave jpsRoom::get_center"; return mean; } + void jpsRoom::highlight(const QString& color) { dtrace("Enter jpsRoom::highlight. highlighted=<%d>", highlighted); @@ -298,7 +308,8 @@ QVector<QPointF> jpsRoom::RoomAsSortedPolygon(const QVector<QLineF>& lines) cons { dtrace("Enter jpsRoom::RoomAsSortedPolygon"); QVector<QLineF> clines=lines; - QVector<QPointF> points = {}; + QVector<QPointF> points = {}; + if(lines.size() == 0) { dtrace("\t empty lines!!"); @@ -306,6 +317,7 @@ QVector<QPointF> jpsRoom::RoomAsSortedPolygon(const QVector<QLineF>& lines) cons return points; } + points.push_back(lines.first().p1()); points.push_back(lines.first().p2()); @@ -354,18 +366,25 @@ qreal jpsRoom::GetArea() const void jpsRoom::IdentifyInnerOuter() { - + qDebug() << "Enter jpsRoom::IdentifyInnerOuter"; QList<QLineF> lines; - for (jpsLineItem* lineItem:wall_list) - { - lines.append(lineItem->get_line()->line()); - } - for (jpsCrossing* crossing:_doorList) - { - lines.append(crossing->get_cLine()->get_line()->line()); + + if (wall_list.isEmpty()==false){ + for (jpsLineItem* lineItem:wall_list) + { + lines.append(lineItem->get_line()->line()); + } + for (jpsCrossing* crossing:_doorList) + { + lines.append(crossing->get_cLine()->get_line()->line()); + } + } else{ + outer_polygon = {}; + return; } + QVector<QVector<QLineF>> polygons; while (!lines.empty()) @@ -440,7 +459,7 @@ void jpsRoom::IdentifyInnerOuter() inner_polygons=polygons; - + qDebug() << "Leave jpsRoom::IdentifyInnerOuter"; } diff --git a/src/rooms.h b/src/rooms.h index 2c4e0bb46edc8b23e20263a75eb694b685efffb0..34a6bb0d020e588d1f4a3ce9a58ea80eacedc671 100644 --- a/src/rooms.h +++ b/src/rooms.h @@ -1,8 +1,8 @@ /** * \file rooms.h - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/roomwidget.cpp b/src/roomwidget.cpp index 222bdea2fb205f2c545cd33c599133ef9a9b80c0..1f5e960bb4b988827517ab3fd72e115a41259c6c 100644 --- a/src/roomwidget.cpp +++ b/src/roomwidget.cpp @@ -1,8 +1,8 @@ /** * \file roomwidget.cpp - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. @@ -30,7 +30,7 @@ #include "ui_roomwidget.h" #include "rooms.h" #include <iostream> - +#include <QDebug> #include "./AutomaticRoomIdentification/roomdefinition.h" #include "./AutomaticRoomIdentification/roomidentification.h" @@ -84,7 +84,7 @@ roomWidget::roomWidget(QWidget *parent, jpsDatamanager *dmanager, jpsGraphicsVie connect(ui->list_rooms,SIGNAL(itemClicked(QListWidgetItem*)),this,SLOT(showWallsAndType())); connect(ui->listWalls,SIGNAL(itemClicked(QListWidgetItem*)),this,SLOT(selectWall())); connect(ui->remove_button,SIGNAL(clicked(bool)),this,SLOT(removeWall())); - connect(ui->caption,SIGNAL(clicked(bool)),this,SLOT(shhi_roomCaption())); + connect(ui->caption,SIGNAL(clicked(bool)),this,SLOT(switchRoomCaption())); connect(ui->highlight_all,SIGNAL(clicked(bool)),this,SLOT(HighlightAllRooms())); //connect(ui->highlight,SIGNAL(clicked(bool)),this,SLOT(highlight_room())); connect(ui->classBox,SIGNAL(activated(int)),this,SLOT(ChangeRoomType())); @@ -222,11 +222,19 @@ void roomWidget::new_room() void roomWidget::delete_room() { dtrace("Enter roomWidget::delete_room"); - if (ui->list_rooms->currentItem()!=0L) + if (ui->list_rooms->currentItem()!=nullptr) { int cRow=ui->list_rooms->currentRow(); + +// QString roomName = datamanager->get_roomlist()[cRow]->get_name(); +// QPointF roomCenter = datamanager->get_roomlist()[cRow]->get_center(); +// graphview->show_hide_roomCaption(roomName,roomCenter.x(),roomCenter.y()); + + switchRoomCaption(); + datamanager->remove_room(datamanager->get_roomlist()[cRow]); ui->list_rooms->setCurrentRow(-1); + this->show_rooms(); } dtrace("Leave roomWidget::delete_room"); @@ -242,6 +250,7 @@ void roomWidget::change_elevation() } dtrace("Leave roomWidget::change_elevation"); } + void roomWidget::change_roomname() { dtrace("Enter roomWidget::change_roomname"); @@ -251,12 +260,12 @@ void roomWidget::change_roomname() int crow=ui->list_rooms->currentRow(); datamanager->get_roomlist()[crow]->change_name(ui->chname_edit->text()); - shhi_roomCaption(); + switchRoomCaption(); this->show_rooms(); } else { - shhi_roomCaption(); + switchRoomCaption(); int crow=ui->list_rooms->currentRow(); datamanager->get_roomlist()[crow]->change_name(ui->chname_edit->text()); this->show_rooms(); @@ -799,25 +808,28 @@ void roomWidget::disable_roomSelectionObs() dtrace("Leave roomWidget::disable_roomSelectionObs"); } -bool roomWidget::shhi_roomCaption() // @todo: This updates the caption for - // obstacles too! Not clean! +bool roomWidget::switchRoomCaption() { - dtrace("Enter roomWidget::shhi_roomCaption"); - bool show; + qDebug() << "Enter roomWidget::switchRoomCaption"; + + bool show; + if (ui->list_rooms->currentItem()!=0L) { int cRow=ui->list_rooms->currentRow(); QString roomName = datamanager->get_roomlist()[cRow]->get_name(); QPointF roomCenter = datamanager->get_roomlist()[cRow]->get_center(); show = graphview->show_hide_roomCaption(roomName,roomCenter.x(),roomCenter.y()); + if(show) ui->caption->setText("Hide Caption"); else ui->caption->setText("Show Caption"); - dtrace("Leave roomWidget::shhi_roomCaption with show=%d", show); + return show; } - dtrace("Leave roomWidget::shhi_roomCaption with false"); + + qDebug() << "Leave roomWidget::switchRoomCaption with false"; return false; } diff --git a/src/roomwidget.h b/src/roomwidget.h index 45d4851ed606041c043278e77d03f17920404729..630f0cf3b46399bb278671dcc467cb05c27e05d9 100644 --- a/src/roomwidget.h +++ b/src/roomwidget.h @@ -1,8 +1,8 @@ /** * \file roomwidget.h - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. @@ -88,7 +88,7 @@ protected slots: void add_room_to_obs(); void enable_roomSelectionObs(); void disable_roomSelectionObs(); - bool shhi_roomCaption(); + bool switchRoomCaption(); bool shhi_roomCaption_obs(); void highlight_room(); void HighlightAllRooms(); diff --git a/src/widgetlandmark.cpp b/src/widgetlandmark.cpp index 4e4a402a73d8964ea3b682ee0c8b71dfee8422b0..64277f3ec652fb601d863bba1a25f6dfe4e011e4 100644 --- a/src/widgetlandmark.cpp +++ b/src/widgetlandmark.cpp @@ -1,8 +1,8 @@ /** * \file widgetlandmark.cpp - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/widgetlandmark.h b/src/widgetlandmark.h index 057b44ab4066cdb0291560f41fb6f636365cc067..19d8f1201a39819ba4e30eefac6098a3c7dbf224 100644 --- a/src/widgetlandmark.h +++ b/src/widgetlandmark.h @@ -1,8 +1,8 @@ /** * \file widgetlandmark.h - * \date Jun 26, 2015 - * \version v0.8.1 - * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/widgetsettings.cpp b/src/widgetsettings.cpp index 925cf6d090b82e8a41f5e538bb7383fffd225a72..dd27923fd644eddd7c321812ebf73e2e1768422f 100644 --- a/src/widgetsettings.cpp +++ b/src/widgetsettings.cpp @@ -1,8 +1,8 @@ /** * \file widgetsettings.cpp - * \date Mar 07, 2016 - * \version v0.8.1 - * \copyright <2009-2016> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim. diff --git a/src/widgetsettings.h b/src/widgetsettings.h index a7c5eb8e5822dbf0e1ebc6fdf4b3ba070c2de034..e365fc32a1ffc4a3532346c7b131848a395745d1 100644 --- a/src/widgetsettings.h +++ b/src/widgetsettings.h @@ -1,8 +1,8 @@ /** * \file widgetsettings.h - * \date Mar 07, 2016 - * \version v0.8.1 - * \copyright <2009-2016> Forschungszentrum Jülich GmbH. All rights reserved. + * \date Oct-01-2018 + * \version v0.8.4 + * \copyright <2009-2018> Forschungszentrum Jülich GmbH. All rights reserved. * * \section License * This file is part of JuPedSim.