Skip to content

Commit

Permalink
Implement Qt Gui, remove rEmotion part (will return with a different …
Browse files Browse the repository at this point in the history
…implementation later) (#12)

Some CI problems, should not be mine issue
  • Loading branch information
an-dr committed Jun 8, 2024
1 parent df15472 commit 2c82d0b
Show file tree
Hide file tree
Showing 69 changed files with 1,596 additions and 1,000 deletions.
36 changes: 36 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# *************************************************************************
#
# Copyright (c) 2024 Andrei Gramakov. All rights reserved.
#
# site: https://agramakov.me
# e-mail: mail@agramakov.me
#
#
# This file is a part of a template:
# - https://github.com/an-dr/hello_world_cpp
#
# Official reference: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# GUI configuration tool: https://clang-format-configurator.site
# *************************************************************************

Language: Cpp
BasedOnStyle: LLVM
SpacesBeforeTrailingComments: 2
IndentWidth: 4
AccessModifierOffset: -3
SortIncludes: true
ColumnLimit: 80
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 2
- Regex: '^<.*\.hpp>'
Priority: 2
- Regex: '^<.*>'
Priority: 1
- Regex: '^".*\.h"'
Priority: 4
- Regex: '^".*"'
Priority: 4
- Regex: '.*'
Priority: 5
3 changes: 3 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Checks: 'clang-diagnostic-*,clang-analyzer-*,cppcoreguidelines-*,modernize-*,-modernize-use-trailing-return-type'
FormatStyle: llvm

113 changes: 113 additions & 0 deletions .cmake-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# *************************************************************************
#
# Copyright (c) 2024 Andrei Gramakov. All rights reserved.
#
# site: https://agramakov.me
# e-mail: mail@agramakov.me
#
#
# This file is a part of a template:
# - https://github.com/an-dr/hello_world_cpp
#
# Official reference:
# https://cmake-format.readthedocs.io/en/latest/configuration.html
# *************************************************************************


# -----------------------------
# Options affecting formatting.
# -----------------------------
with section("format"):

# Disable formatting entirely, making cmake-format a no-op
disable = False

# How wide to allow formatted cmake files
line_width = 80

# How many spaces to tab for indent
tab_size = 4

# If true, lines are indented using tab characters (utf-8 0x09) instead of
# <tab_size> space characters (utf-8 0x20). In cases where the layout would
# require a fractional tab character, the behavior of the fractional
# indentation is governed by <fractional_tab_policy>
use_tabchars = False

# If <use_tabchars> is True, then the value of this variable indicates how
# fractional indentions are handled during whitespace replacement. If set to
# 'use-space', fractional indentation is left as spaces (utf-8 0x20). If set
# to `round-up` fractional indentation is replaced with a single tab character
# (utf-8 0x09) effectively shifting the column to the next tabstop
fractional_tab_policy = 'use-space'

# If an argument group contains more than this many sub-groups (parg or kwarg
# groups) then force it to a vertical layout.
max_subgroups_hwrap = 2

# If a positional argument group contains more than this many arguments, then
# force it to a vertical layout.
max_pargs_hwrap = 6

# If a cmdline positional group consumes more than this many lines without
# nesting, then invalidate the layout (and nest)
max_rows_cmdline = 2

# If true, separate flow control names from their parentheses with a space
separate_ctrl_name_with_space = False

# If true, separate function names from parentheses with a space
separate_fn_name_with_space = False

# If a statement is wrapped to more than one line, than dangle the closing
# parenthesis on its own line.
dangle_parens = True

# If the trailing parenthesis must be 'dangled' on its on line, then align it
# to this reference: `prefix`: the start of the statement, `prefix-indent`:
# the start of the statement, plus one indentation level, `child`: align to
# the column of the arguments
dangle_align = 'prefix'

# If the statement spelling length (including space and parenthesis) is
# smaller than this amount, then force reject nested layouts.
min_prefix_chars = 4

# If the statement spelling length (including space and parenthesis) is larger
# than the tab width by more than this amount, then force reject un-nested
# layouts.
max_prefix_chars = 10

# If a candidate layout is wrapped horizontally but it exceeds this many
# lines, then reject the layout.
max_lines_hwrap = 2

# What style line endings to use in the output.
line_ending = 'unix'

# Format command names consistently as 'lower' or 'upper' case
command_case = 'canonical'

# Format keywords consistently as 'lower' or 'upper' case
keyword_case = 'upper'

# A list of command names which should always be wrapped
always_wrap = []

# If true, the argument lists which are known to be sortable will be sorted
# lexicographicall
enable_sort = True

# If true, the parsers may infer whether or not an argument list is sortable
# (without annotation).
autosort = True

# By default, if cmake-format cannot successfully fit everything into the
# desired linewidth it will apply the last, most agressive attempt that it
# made. If this flag is True, however, cmake-format will print error, exit
# with non-zero status code, and write-out nothing
require_valid_layout = False

# A dictionary mapping layout nodes to a list of wrap decisions. See the
# documentation for more information.
layout_passes = {}
19 changes: 0 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,3 @@ jobs:

- name: 🔨 Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

build-vremotion:
runs-on: ubuntu-latest
name: Build VisioneREmotion

steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
token: ${{ secrets.GITHUB_TOKEN }}

- name: 🤖 Install OpenCV
run: sudo apt-get install libopencv-dev libopencv-contrib-dev -y

- name: 🔧 Configure CMake
run: cmake -B ${{github.workspace}}/build -S${{github.workspace}}/src/VisioneREmotion -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: 🔨 Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
[submodule "src/common_components/microlog"]
path = src/common_components/microlog
url = https://github.com/an-dr/microlog.git
[submodule "src/VisioneREmotion/components/CppLinuxSerial"]
path = src/VisioneREmotion/components/CppLinuxSerial
url = https://github.com/gbmhunter/CppLinuxSerial.git
[submodule "src/common_components/eventpp"]
path = src/common_components/eventpp
url = https://github.com/wqking/eventpp.git
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The project architecture is described [here](doc/architecture.md).
- [VisioneR](#visioner)
- [Table of Contents](#table-of-contents)
- [Demo](#demo)
- [Requrements](#requrements)
- [Implementation](#implementation)

## Demo
Expand All @@ -19,6 +20,12 @@ Implementation using the [rEmotion](https://github.com/an-dr/rEmotion) platform:

![demo](doc/README/main_demo.gif)

## Requrements

- opencv
- qt6-base-dev
- qt6-wayland

## Implementation

You can generate a Doxygen documentation by running the following command in the project root directory:
Expand Down
47 changes: 17 additions & 30 deletions VisioneR.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,6 @@
}
]
},
{
"name": "Debug - VisioneREmotion",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/install/VisioneREmotion/VisioneREmotion",
"miDebuggerPath": "gdb",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/install/VisioneREmotion",
"preLaunchTask": "Install",
"setupCommands": [
{ // Display content in STL containers pretty
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"environment": [
{
"name": "GTK_PATH",
"value": ""
}
]
},
{
"name": "Debug - VisionerWebcam",
"type": "cppdbg",
Expand Down Expand Up @@ -116,7 +92,18 @@
},
"dependsOn": "Configure"
},
// Cmake build
{
"label": "compile_command.json",
"type": "shell",
"command": "cp",
"args": [
"${workspaceFolder}/build/${input:Project}/compile_commands.json",
"${workspaceFolder}/build/compile_commands.json",
],
"options": {
"cwd": "${workspaceFolder}",
},
},
{
"label": "Configure",
"type": "shell",
Expand All @@ -126,14 +113,17 @@
"Ninja",
"-B",
"${workspaceFolder}/build/${input:Project}",
"-DCMAKE_BUILD_TYPE=Debug"
"-DCMAKE_BUILD_TYPE=Debug",
],
"group": {
"kind": "build",
"isDefault": true
},
"options": {
"cwd": "${workspaceFolder}/src/${input:Project}"
"cwd": "${workspaceFolder}/src/${input:Project}",
"env": {
"ABCMAKE_EMOJI": "1"
}
},
"problemMatcher": [],
"presentation": {
Expand Down Expand Up @@ -207,9 +197,6 @@
},
{
"value": "VisionerWebcam",
},
{
"value": "VisioneREmotion",
}
]
}
Expand Down
Loading

0 comments on commit 2c82d0b

Please sign in to comment.