Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: GUI #17

Open
wants to merge 35 commits into
base: master-next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
cd58742
[GUI] First sketch
federeghe Nov 20, 2020
7bce918
Merge branch 'master-next' into gui
federeghe Aug 27, 2021
398d157
Merge branch 'master-next' into gui
federeghe Aug 27, 2021
46df15e
init project
Sep 14, 2021
9300c41
edit layout ui
Sep 15, 2021
a2f9558
add qtchart cmakefile
AlterB Sep 15, 2021
827fafa
cmake update
AlterB Sep 17, 2021
4d45344
cmake import chronovise lib update
AlterB Sep 22, 2021
4d6dfef
fix includes in order to export correctly the library
AlterB Sep 22, 2021
b15addd
add radio for input type
AlterB Sep 22, 2021
4c5869f
fix cmake gui finding chronovise lib
AlterB Sep 22, 2021
9db5e2a
fix import of ceres library
AlterB Oct 1, 2021
7a0a68c
add location,shape, scale params to abstract class
AlterB Oct 1, 2021
a0022c0
add save plot button, fix dimensions, fix layout results
AlterB Oct 7, 2021
cc14bb0
add input file slot
AlterB Oct 7, 2021
cb6c363
add reset slot
AlterB Oct 7, 2021
5d70b2e
add utility helper header
AlterB Oct 7, 2021
ca7c639
fix logo and progress bar
AlterB Oct 7, 2021
67e2456
initialization of empty chart and reset
AlterB Oct 7, 2021
42ee035
add fill measurepool
AlterB Oct 7, 2021
6ade6a5
add ui helper functions
AlterB Oct 7, 2021
e0d03d1
fix:add ui helper functions
AlterB Oct 7, 2021
4947251
add compute slot and logic
AlterB Oct 7, 2021
d1e5ea8
add iid combo slot
AlterB Oct 7, 2021
9f79eaf
add config plot slots
AlterB Oct 7, 2021
8bd2c08
add x-asis config slot
AlterB Oct 7, 2021
27d9a6e
add about and save_plot slot && fix reset_results
AlterB Oct 7, 2021
a8924aa
fix reset min-max inputbox
AlterB Oct 7, 2021
29ac83c
fix cmakefile adding other sources
AlterB Oct 7, 2021
0301fe2
add README
AlterB Oct 7, 2021
574b4b2
final change CmakeList chronovise
AlterB Oct 8, 2021
4e7ac0d
fix exception MLE/PoT
AlterB Oct 10, 2021
5bef4d0
fix combobox test
AlterB Oct 10, 2021
ca94e65
fix color combobox hover
AlterB Oct 10, 2021
a4245ce
save plot in SVG
AlterB Oct 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,37 +58,49 @@ execute_process(
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)

)
add_library(chronovise ${SOURCES})

install(TARGETS chronovise
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/"
DESTINATION include/chronovise
FILES_MATCHING PATTERN "*.hpp"
)

target_include_directories(chronovise PUBLIC include)

if(CERES_SOLVER)

#if(CERES_SOLVER)
find_package(Ceres REQUIRED)
include_directories(${CERES_INCLUDE_DIRS})
target_link_libraries (chronovise ${CERES_LIBRARIES})
endif(CERES_SOLVER)
target_link_libraries (chronovise PUBLIC ${CERES_LIBRARIES})

#endif(CERES_SOLVER)

target_compile_options(chronovise PUBLIC -Wall -Wextra -pedantic -DGIT_VERSION=\"${GIT_COMMIT_HASH}\")

if(COVERAGE)
target_compile_options(chronovise PUBLIC --coverage)
endif(COVERAGE)

target_include_directories(chronovise PUBLIC include)


#export library as chronovise into /usr/local/lib
install(TARGETS chronovise
EXPORT chronovise
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)


#install headers file into /usr/local/include/chronovise
install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/"
DESTINATION include/chronovise
FILES_MATCHING PATTERN "*.hpp"
)



add_subdirectory(apps)
add_subdirectory(docs)
add_subdirectory(samples)
add_subdirectory(tests)


1 change: 1 addition & 0 deletions gui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory(ui)
73 changes: 73 additions & 0 deletions gui/ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------

*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash

# qtcreator generated files
*.pro.user*

# xemacs temporary files
*.flc

# Vim temporary files
.*.swp

# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*

# MinGW generated files
*.Debug
*.Release

# Python byte code
*.pyc

# Binaries
# --------
*.dll
*.exe

92 changes: 92 additions & 0 deletions gui/ui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
cmake_minimum_required(VERSION 3.5)

project(ui VERSION 0.1 LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# QtCreator supports the following variables for Android, which are identical to qmake Android variables.
# Check https://doc.qt.io/qt/deployment-android.html for more information.
# They need to be set before the find_package( ...) calls below.

#if(ANDROID)
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
# if (ANDROID_ABI STREQUAL "armeabi-v7a")
# set(ANDROID_EXTRA_LIBS
# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libcrypto.so
# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libssl.so)
# endif()
#endif()

find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)
find_package(Qt5Charts)
find_package(Qt5Svg)




#add_library(chronovise SHARED IMPORTED GLOBAL)
#set_target_properties( chronovise PROPERTIES
# IMPORTED_LOCATION ../../build/libchronovise.a)


find_package(Ceres REQUIRED)


find_library(chronovise chronovise)



set(PROJECT_SOURCES

main.cpp
chronovise_helper.cpp
chronovise_helper.h
mainwindow.cpp
mainwindow.h
mainwindow.ui
utility.h
)




if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(ui
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
else()
if(ANDROID)
add_library(ui SHARED
${PROJECT_SOURCES}
)
else()
add_executable(ui
${PROJECT_SOURCES}
)
endif()
endif()

target_link_libraries(ui PRIVATE chronovise)
include_directories(${CERES_INCLUDE_DIRS})
target_link_libraries (ui PRIVATE ${CERES_LIBRARIES})

target_link_libraries(ui PUBLIC Qt${QT_VERSION_MAJOR}::Widgets Qt5::Charts Qt5::Svg)

set_target_properties(ui PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
)

if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(ui)
endif()
32 changes: 32 additions & 0 deletions gui/ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# chronovise-gui

**chronovise-gui** provides a GUI for the chronovise framework.

What you need
-------------
The UI is written using QT framework, therefore a version of [QT library](https://www.qt.io/offline-installers) must to be installed (version used 5.12) with QtCharts module.

Building
--------

It's needed to install chronovise library.

```bash
$ git clone https://github.com/federeghe/chronovise.git
$ cd chronovise
$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install
```

Once chronovise is installed:

```bash
$ cd gui
$ mkdir build
$ cd build
$ cmake ..
$ make
```
Loading